# Citations & re-training

> How citations are produced, how to debug "the agent answered wrong", and when to re-sync a source.

import Screenshot from "../../../components/docs/Screenshot.astro";

Every answer the agent gives in a public channel includes citations — clickable references back to the specific chunk(s) that produced the answer. Citations aren't decoration: they're the fastest debugging tool you have.

## How citations work

When a visitor asks a question, Owlish embeds the question, retrieves the top-N most semantically similar chunks from the agent's attached folders, and includes those chunks in the model's context with attribution. The model is instructed to cite which chunk it used. The citation chip you see in the chat is that attribution rendered as a link.

<Screenshot label="Web widget · Citation chip" description="An agent answer in the widget with a small citation badge below the message linking back to the source page." />

## Debugging "the agent answered wrong"

The citation tells you which chunk was used, which lets you ask the right question:

- **Cited the wrong source?** The right source either isn't in the attached folders, or wasn't ranked high enough by retrieval. Check folder attachment first; if the source is there, look for thin or generic content in the right source that's losing to richer content elsewhere.
- **No citation at all?** The agent answered from its general training, not your knowledge. Tighten the persona to require citations, and add a [Direct Response](/docs/knowledge-base/direct-response) for the missing answer.
- **Cited correctly but answered wrong?** The chunk content itself is wrong or stale. Edit or re-sync the source.

## How re-sync works

Owlish re-syncs website sources automatically on the schedule you set when adding them (daily, weekly, monthly). The agent picks up new content on the next message after the re-sync finishes — no redeploy.

Two cases require action from you:

- **Source content changed and you don't want to wait for the schedule.** Re-upload the file (for files) or update the schedule to a tighter interval (for websites).
- **You changed allow / exclude patterns on a website source.** The new patterns apply on the next scheduled re-sync.

You don't need to re-sync after persona changes, model swaps, or folder-attachment changes — those don't touch the chunks. Direct Response entries are also live immediately; they don't go through ingestion.

## Next steps

- **[Knowledge base overview](/docs/knowledge-base/overview)** — refresher on folders, sources, and chunks.
- **[Tone and fallbacks](/docs/agents/tone-and-fallbacks)** — the persona side of getting answers right.

---

Source: https://owlish.bot/docs/knowledge-base/citations
