Skip to main content
Back to blog

Grounding AI Agent Answers with RAG Citations

Ungrounded agent answers are a compliance and support liability. Here is the Devotel Orbit loop — knowledge-base scope plus a citation directive in the agent's guardrails, links to sources returned in answers, per-turn visibility in transcripts, and a grounding-rate audit dashboard — plus how it pairs with the Prompt Template Library and model presets.

Orbit Editorial Team

An AI agent's answer becomes grounded when the operator scopes a knowledge base to the agent, instructs the model to mark its sources, and verifies on live traffic that the answer carries those markers. Grounding is a verification loop, not a tuning hope: configure the retrieval perimeter and citation directive in the agent's guardrail settings, surface the cited links to callers and operators, then audit the grounding rate per turn on the dashboard and fix the knowledge gaps the audit exposes. This guide walks through that loop as shipped in Devotel Orbit — the guardrail configuration, the audit surface, the prompt templates and presets it pairs with, the guardrail patterns that keep answers traceable, and where to read the numbers.

Why grounded answers matter

An ungrounded answer is one the model constructed from its training weights rather than from your knowledge base. For a customer-facing agent that answers with an uncited price, a fabricated SKU, or a return window your policy never offered, every invented statement lands as a support ticket, a refund, or — for supported-shipping-carrier or coverage claims — a misrepresentation you now own. The retrieval-augmented generation (RAG) fix is well established: retrieval selects the sources the answer may draw on, and the citation marker makes the draw visible. The first half limits what the model may say; the second half lets you prove what it said actually came from your content. Neither half is sufficient alone — a retrieval scope without citation markers leaves you unable to distinguish a grounded answer from a lucky guess, and markers without a controlled scope cite whichever document the model decided to trust.

Where grounding configuration lives

In Orbit, grounding is configured on each agent's guardrail surfaces, the same place conversation guardrails and safe-handling rules are set: pick which knowledge-base collections the agent may retrieve from (product docs, policy pages, pricing sheets — no scope means no retrieval at all), and turn on the citation directive that instructs the model to mark the sources behind each answer. The scope sets the perimeter — the agent can only draw from the collections you attached — and the directive asks the model to tag which entries it used, so an answer either carries its markers or visibly does not. Default both off and a fluent answer ships unverifiable.

How citations are surfaced

The directive produces source markers on each answer (formatted like [KB-1]), and each marker resolves to the knowledge-base document and passage that fed it. Callers on chat channels see the answer with links to the documents it drew from, which converts "the bot said so" into "here is the page it read." In the dashboard conversation view, each agent's answer line keeps the marker inline, so an operator reviewing a transcript can tell a grounded turn from an ungrounded one per turn, without sampling. That per-turn visibility is what makes the audit surface below meaningful — the audit counts the same markers the transcript shows.

Auditing the grounding rate

Configuration tells the model what to do; the audit tells you whether it did it on live traffic. The RAG Grounding Citations page in the dashboard (Agents → RAG Grounding Citations) rolls up the voice-turn coverage against the same markers: a grounding rate per agent over a selected time window, a list of ungrounded turns to triage, and the trend line that shows whether a knowledge-base fix actually moved the rate. The remediation loop runs config → audit → fix → re-audit: an ungrounded-turn cluster on one topic usually means the knowledge base lacks the entry, the entry exists but retrieval never reaches it, or the directive is muted by an overbearing system prompt — each diagnosed from the ungrounded list, then re-measured after the fix. Treat grounding rate as a quality metric on the per-agent scorecard, alongside resolution and fallback.

Pairing with the Prompt Template Library and model presets

Grounding survives a fork or a preset swap only if the directive survives. The Prompt Template Library (Agents → Prompt Template Library) holds curated, versioned system-prompt starters that every tenant shares; forking one resolves your variable values into a system prompt that seeds the create-agent wizard. Because the library carries the citation directive as part of the starter, a forked prompt keeps citation behavior by default — and because versions are pinned, you can tell which iteration of the prompt produced a given grounding rate. The same applies to model presets: the preset pins the model itself, so a grounding-rate regression after a preset change isolates the variable that changed. Fork the template, fill its variables, confirm the directive is present, then verify on the audit page before you ship.

Guardrail patterns that keep answers traceable

Grounding degrades in predictable ways. Five patterns keep it intact:

  1. Cite the confirmed supplier before answering fulfillment questions. If the answer is about stock, SKUs, or shipping carriers, the answer must cite the confirmed catalogue or policy entry — not invent a SKU from weights. The audit's ungrounded-turn list is precisely where invented-SKU risk shows up first.
  2. Scope deliberately; audit before widening. A broad collection list grounds more turns with less relevant sources. Start narrow, read the ungrounded list, add the collection that covers the gap.
  3. Keep the directive when forking a template. Edited system prompts that rewrite the starter often drop the citation instruction silently; the audit catches that drop within the first live window.
  4. Set a fallback for uncovered questions. If retrieval returns nothing, the agent should hand off or say it does not know — a controlled admission beats an ungrounded guess.
  5. Review ungrounded-turn clusters weekly. Repeated ungrounded answers on one topic are a knowledge-base gap, and the fix is content, not prompt tuning.

Frequently asked questions

What is a grounded answer in an AI agent?

A grounded answer is one whose statements trace to selected knowledge-base sources, with a citation marker resolving to the document and passage behind each claim. The agent retrieves within its configured scope and marks what it used; an answer without markers is treated as ungrounded regardless of how fluent it reads.

How do I see grounding citations for a running agent?

Open Agents → RAG Grounding Citations in the dashboard. The page shows the grounding rate per agent over a time window, the ungrounded turns to triage, and the trend over time, computed from the same citation markers visible in the transcript.

Do prompt templates preserve the citation directive when I fork one?

Yes — the Prompt Template Library carries curated, versioned starters, and forking one resolves your variables into a system prompt that includes the directive. Because versions are pinned, you can attribute a grounding-rate change to the template version that produced it; re-check the audit page after any fork or edit.

What counts as an ungrounded turn in the audit?

A turn in which the agent's answer carries no citation markers — the model answered from parametric knowledge rather than retrieved sources. Ungrounded turns are listed for triage so you can decide whether the knowledge base lacks the entry, retrieval misses it, or the directive was muted by a prompt edit.

Grounding AI Agent Answers with RAG Citations — Orbit by Devotel