Skip to content
be-human.ai
← Back to the journal

Testing & reliability

How to Make an AI Agent Cite Its Sources in Business Answers

Require every AI answer to name its document, section and version, then verify the reference automatically and by sampling so staff can check any answer fast.

Be Human typographic cover with the title: How to Make an AI Agent Cite Its Sources in Business Answers
Conceptual illustration created with AI · Be Human

To make an AI agent cite its sources, require every business answer to carry a reference to the specific document, section and version it relied on, and block any answer that arrives without one. Then verify those references with automatic checks and regular human sampling, so a member of staff can open the cited passage in seconds and confirm the claim. A citation only builds trust when it is required, specific and checkable.

Key takeaways

  • Make the reference part of the answer format, not a polite request in the prompt. An answer without a valid reference should not reach the user.
  • Let the system, not the model, supply the source identifiers. The agent should choose among documents it actually retrieved, never invent a link from memory.
  • A good reference names the document, the section, the version and a short quoted passage, so a person can find the evidence without searching.
  • Automatic checks prove that a source exists and contains the quoted text. Only human sampling proves that the source supports the claim.
  • When no source supports an answer, the agent should say so and route the question to a person, instead of producing a fluent guess.

Why does an answer need a source reference at all?

An unreferenced answer forces the reader to choose between trusting it blindly and redoing the work. Neither is acceptable for a policy question, a contract clause, a pricing rule or a compliance step. Staff who must act on the answer need a fast way to see where it came from.

A reference changes the economics of review. Checking a claim against a named paragraph takes moments. Checking a claim with no pointer means searching a shared drive, guessing which version applies and hoping you found the same passage the agent used. Most teams skip that search, which means errors travel further than they should.

References also make failures diagnosable. When a wrong answer carries a source, you can tell whether the document was wrong, the retrieval picked the wrong passage, or the model misread the right one. Those are three different fixes. Without the reference you only know that the answer was wrong. For the wider problem of unsupported claims, see how to reduce AI hallucinations in business workflows.

One caution belongs here. A citation shows where text came from. It does not show that the text is correct, current or safe to follow. Treat the reference as a tool for checking, not as proof.

What does a useful source reference contain?

A link to a whole handbook is nearly as unhelpful as no link. A reference should land the reader on the evidence. Define a fixed set of fields and require all of them:

  • Document title and a stable identifier, such as the record ID in your document system.
  • Section or heading, so the reader can jump to the right place.
  • Version or last reviewed date, so a superseded document is visible as such.
  • A short verbatim excerpt, the exact words the agent relied on.
  • Document owner, so a person knows whom to ask if the content looks wrong.
  • Access status, confirming that the person asking is allowed to see this document.

The verbatim excerpt is the most valuable field and the one teams most often leave out. It lets a reviewer confirm the claim by reading two lines, and it lets software confirm automatically that the passage exists in the source. Paraphrased summaries cannot be checked that way.

The owner and version fields matter because business documents age. A pricing sheet or a returns policy that was correct last year can still be the best match for a question today. If the reference shows the version and review date, the reader sees the risk immediately.

How do you require citations in the agent's setup?

A prompt line such as "always cite your sources" helps, but models can ignore it, especially on long or ambiguous questions. Reliable citation comes from the structure around the model. The retrieval-augmented pattern described in [Google Cloud's reference architecture](https://docs.cloud.google.com/architecture/rag-capable-gen-ai-app-using-vertex-ai) and in [AWS's overview of retrieval-augmented generation](https://aws.amazon.com/what-is/retrieval-augmented-generation/) already gives you the key ingredient: the system knows which passages it fetched before the model writes a word.

Use that. A practical plan:

  • Step one: list the question types where a wrong answer has a real cost, such as policy, legal, pricing, safety and customer commitments. Require references for these first.
  • Step two: give every approved document a stable ID, an owner and a review date. Documents without these fields should not be retrievable for cited answers.
  • Step three: have the retrieval layer pass the model only labeled passages, each with its ID, section and version.
  • Step four: define an output format with separate fields for the answer and for a list of references, each reference pointing to a passage ID the model was given and quoting the relevant words.
  • Step five: add a validation step in code that rejects any output with a missing field, an unknown passage ID or an empty excerpt, and asks the agent to try again once or to escalate.
  • Step six: render the references as readable links in the channel where staff work, so the check takes one click.
  • Step seven: write the rule into the agent's operating notes, including what counts as an acceptable source, so it is not left to memory. The guide on writing a system prompt for a business agent covers how to phrase those instructions.

The important design choice is in step three and step four. The model selects from sources the system supplied. It does not generate links or document names on its own. That one decision removes the most common failure, a plausible reference to a document that does not exist.

How do you verify that a citation is real and actually supports the answer?

Verification has two layers, and they catch different problems.

The first layer is automatic and runs on every answer:

  • Does the cited document ID exist in the approved library?
  • Was that passage actually retrieved for this question?
  • Does the quoted excerpt appear word for word in the source text?
  • Is the version current, or marked as superseded?
  • Is the person asking permitted to read this document?

These checks are cheap and strict. They catch invented sources, misquoted text, stale versions and accidental disclosure of restricted material.

The second layer is human and runs on a sample. An excerpt can exist in the source and still not support the claim. The agent may quote a passage about standard orders to justify an answer about custom orders. Software cannot judge that reliably, so a person must. Each week, a reviewer opens a small sample of answers, reads the excerpt and asks one question: does this passage, on its own, justify the answer given? Record the verdict as supported, partly supported or unsupported, and note the cause.

Turn the unsupported cases into permanent tests. A golden test set that includes questions with known correct sources lets you detect when a change to the model, the prompts or the documents weakens citation quality. Log the question, the retrieved passages, the references and the validation result so you can investigate later; what to log for agent observability lists the fields worth keeping.

Finally, remember that retrieved documents are input from outside the agent's trust boundary. A document can contain text that tries to steer the agent. A source being cited does not make its instructions valid. The [OWASP prompt injection prevention guidance](https://cheatsheetseries.owasp.org/cheatsheets/LLM_Prompt_Injection_Prevention_Cheat_Sheet.html) and our article on prompt injection in business documents explain how to keep document content in the role of data, not commands.

What should the agent do when no source supports the answer?

This rule matters as much as the citation format. If the agent cannot find a passage that supports an answer, the right output is a plain statement that it found no supporting source, plus a next step. Without that rule, a citation requirement pushes the model to stretch a loosely related passage into a justification.

Define three outcomes and make them explicit:

  • Supported: one or more valid references back the answer. Deliver it with the references attached.
  • Partly supported: the sources cover some of the question. Deliver only the supported part, say what is missing and name who can decide the rest.
  • Unsupported: no usable source. Do not answer from general knowledge on a business-specific question. Say so, and hand the question to the document owner or a named person.

The handoff should carry the decision, not the mess: the question, what was searched, which near-miss passages were found and what is needed to resolve it. The article on human escalation for AI agent failures describes how to package that. A related benefit is that repeated unsupported questions reveal gaps in your documentation. If staff keep asking about a topic nobody has written down, the agent has just told you what to write.

What does this look like in practice? An illustrative scenario

This scenario is illustrative, not a description of a real company.

A service business has an agent that answers staff questions about customer policies. A coordinator asks whether a customer can get a refund on a part that was replaced under warranty. The agent replies that a refund is possible within the standard return period, and attaches a reference: the returns policy, the section on warranty replacements, a version label, the document owner and an excerpt of two sentences.

The automatic checks pass: the document exists, the passage was retrieved and the excerpt matches the text. But the version label shows a policy that was later replaced, and the validation step flags it as superseded. The agent is asked to retry using only current documents. The second attempt finds the current policy, which says replaced parts are credited, not refunded. The answer changes, and the reference now points to the current section.

Now suppose the flag had not existed. The coordinator would have seen the version label and the review date in the reference and, with one click, spotted the problem. Either way, the reference turned a confident wrong answer into a short check. The weekly sample would also have recorded the case, and the old policy would have been removed from the retrievable library.

How does Be Human handle source references in managed agents?

Be Human designs the citation requirement into the agent's structure: approved documents carry IDs, owners and review dates, the retrieval layer supplies labeled passages, and validation rejects answers whose references fail the checks. During managed operations, we review a sample of cited answers against their sources, track unsupported answers and missing-document patterns, and adjust retrieval, documents or rules under the approval boundaries the business has set. Changes to the model are tested against known questions before they go live, so citation quality is not lost silently. Before an agent gets authority, it can run in shadow mode so staff can check its references against their own judgment.

Frequently asked questions

Can I just tell the model to cite sources in the prompt? A prompt instruction helps, but it is not enough for answers that matter. The model may skip the instruction, or produce a reference that looks right but points nowhere. Pair the instruction with a required output format and a validation step that rejects answers without a valid reference.

Can an AI agent make up a citation? Yes, if it is asked to produce references from memory. It can generate a document title, section or link that sounds real but does not exist. The fix is to have the system supply the sources and require the agent to select from them, then verify the quoted text against the original.

Does a citation mean the answer is correct? No. It means the answer is traceable. The source might be outdated, wrong or only loosely relevant, and a person still needs to judge whether the passage supports the claim. That is why version labels, owners and sampled human review belong next to the automatic checks.

How many answers should staff review by hand? Review enough to see patterns, and review more where the cost of a wrong answer is higher. Start with a small weekly sample across question types, increase it after any change to the model, documents or prompts, and reduce it only when the unsupported rate stays low over time. Your own error tolerance should set the number, not a generic rule.

Be Human editorial guidance. Examples are illustrative unless explicitly attributed. Sources provide background; implementation choices depend on your workflow.

Less busywork. More room for you.

Bring us the work you wish you had time for.

Try a personalized AI agent free for 7 days on WhatsApp ↗