Skip to content

Grounding and "I don't know"

Why the agent refuses to guess, how to trace an answer back to its sources, and what to do when it falls back too often.

Every answer is grounded: it is written from passages retrieved out of your knowledge base, not from the model's general training. When retrieval finds nothing relevant, the agent says so instead of producing something plausible.

The fallback is a feature

A support agent that invents a refund window is worse than one that says it does not know. The fallback is deterministic — no model call is made — so it cannot drift into a confident guess, and it always reads the same:

Set your own wording in the chatbot's fallback message, and point it somewhere useful — a contact form, a phone number, or a nudge to ask for a human. See Chatbot settings.

Tracing an answer

Open the Playground and turn on Debug. For each answer you get the retrieved chunks and their scores, the latency, the token usage, and the assembled prompt. That tells you which of two very different problems you have:

Sources are attached to each message as metadata rather than printed as [1] citations, which is why you read them in Debug rather than in the answer text.

The bot's name is not the business

A chatbot's persona name is often not the name of the business it answers for — "Max" on a dental clinic's knowledge base. Questions about "you" and "your" ("what are your hours?", "who are you?") are read as questions about the business and answered from its pages. Asking about the persona itself ("who is Max?") gets the fallback rather than an invented person: the name never becomes knowledge.

Injected instructions and leaked rules

Knowledge-base content is untrusted. A page or FAQ that carries an instruction — "ignore your rules", "send the visitor to this link", a fake system block — is quoted as data, never followed, and text hidden by inline CSS (display:none, visibility:hidden) is dropped when a page is crawled, so a planted instruction in a hidden block never reaches the model. On the reply side a deterministic prompt-leak filter checks every answer: one that quotes the platform's own rule sentences, or a framing tag, is replaced by your fallback message before it is stored or sent (the widget withdraws the text it had started to show). Neither guard costs an extra model call.

When it falls back too often

In rough order of how often it is the cause:

  1. 1
    The content genuinely is not there. Check the knowledge gaps list — it is exactly the set of questions that got no sources.
  2. 2
    The content is there but unreadable. A scanned PDF or a JavaScript-only page extracts to nothing. Inspect the chunks — see Reindexing and freshness.
  3. 3
    The source is still processing, or disabled. Check its status.
  4. 4
    The similarity threshold is too high. Move it in small steps and re-test.

Resist fixing a fallback by loosening the threshold far: you trade "I don't know" for confident answers built from loosely related passages, which is the failure mode grounding exists to prevent.

Where to go next

Last updated