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

Context & memory

Retrieval Errors: Why a Superintelligent Agent Cites the Wrong Policy

Trace an AI agent's wrong answer to a retrieval miss, a stale document or a duplicate source, then fix each cause with a clear, repeatable check.

Be Human typographic cover with the title: Retrieval Errors: Why a Superintelligent Agent Cites the Wrong Policy
Conceptual illustration created with AI · Be Human

A wrong answer from an AI agent is usually a retrieval problem before it is a reasoning problem. The agent can only reason over the passages that reach its context, so when it cites the wrong policy, the first question is which passages it received and whether the correct one was among them. Most wrong answers trace back to one of three causes: a retrieval miss, a stale document or a duplicate source, and each cause has a different fix.

Key takeaways

  • A wrong answer is evidence. Log the question, the retrieved passages and the cited source before you change anything.
  • A retrieval miss means the correct text existed but never reached the agent. Check chunking, metadata and wording first.
  • A stale document means the index still holds an outdated version. Remove it from the index, not only from the shared folder.
  • A duplicate source means two or more conflicting copies compete for the same answer. Keep one owned record and retire the rest.
  • Every fix needs a test question that would have caught the error, so the same mistake does not return quietly.

Why a capable agent still cites the wrong policy

Language models are good at reading what they are given and poor at knowing what they were not given. When a policy question arrives, a typical agent searches the company knowledge base, takes a small set of passages and writes an answer from them. If the correct clause is missing from that set, the answer can still sound fluent and well organized. That makes the error harder to notice than an obvious failure. The mistake often stays invisible in the conversation and only appears when someone compares the cited text with the current policy.

This is why blaming the model is rarely the right first step. Google Cloud's reference architecture for retrieval-augmented generation treats retrieval and generation as separate stages of the application. That separation is useful for debugging, because each stage can be inspected on its own. If the retrieved passages are wrong, changing the model will not repair the answer, and it may hide the real cause for a while.

Step 1: Capture the wrong answer with its evidence

Before anyone edits a document or a prompt, collect the evidence for the single answer that went wrong. Without it, teams tend to fix the most visible symptom and leave the cause in place. For each reported error, record:

  • The exact question as asked, the role or channel it came from, and the time it was asked.
  • The answer the agent gave and the source it cited, including any version or date shown in the citation.
  • The passages retrieved for that question, in the order they were returned, with their source identifiers.
  • The correct answer, confirmed by the policy owner, and the document where that answer lives.
  • Whether any memory notes or earlier conversation context were loaded alongside the retrieved passages.

This is ordinary observability practice applied to an agent. OpenTelemetry's observability primer describes traces and logs as a way to follow what a system did in each step, and that is exactly what you need to reconstruct one answer after the fact.

Which of the three causes is it?

Use the evidence to sort the error into one category. The categories are simple, and each one points to a different owner and a different fix.

  • Retrieval miss: the correct passage exists in the knowledge base, but it is not among the passages retrieved for the question. The agent answered from what it had.
  • Stale document: the cited passage is the one that was retrieved, but the company has since changed the rule and the index still holds the old text.
  • Duplicate source: two or more retrieved passages cover the same rule with different wording or values, and the agent picked the one that ranked higher.
  • Knowledge gap: no passage in the knowledge base covers the question at all. Log it as an open question rather than treating it as a retrieval error.

To decide between them, run the same question yourself against the knowledge base. If the correct passage appears in your search but not in the agent's retrieved set, it is a miss. If several versions of the rule appear, it is a stale or duplicate problem. If nothing relevant appears, it is a gap, and the open question belongs in a log that a named owner reviews. The knowledge gap logging guide describes how to keep those entries useful.

Fixing a retrieval miss

A miss is usually a packaging or wording problem. The passage is in the index, but it may be split badly, labeled poorly or phrased differently from the way staff ask questions. Work through these checks in order, and rerun the question after each change while inspecting the retrieved set, not only the final answer.

  • Check whether a policy clause was split across chunks. A limit in one chunk and its exception in the next can be retrieved separately, so the agent sees half the rule. Keep whole clauses together wherever the document structure allows it.
  • Check the metadata: title, department, document type and effective date. Good metadata lets retrieval narrow the candidates before ranking, so unrelated material does not compete.
  • Compare the staff question with the document's vocabulary. If people say "the approval threshold" and the policy says "authorization limit," add the mapping to the glossary the agent reads.
  • Confirm that the corrected passage now appears in the top results for the original question and for two or three paraphrases of it.

The trade-off in chunk size is covered in detail in the chunk size guide for knowledge bases. The goal is not the smallest possible chunk. The goal is a passage that carries the full rule.

Fixing stale documents and duplicate sources

Stale and duplicate errors come from the same gap. The index holds more than one answer to the same question, and nothing records which one is current. Fixing them requires a named owner, a version and an explicit removal step.

  • Name the owner of each policy document: the person who approves changes and can confirm what is current.
  • Remove superseded versions from the retrieval index. Moving an old file into an archive folder does not stop the agent from retrieving it if the sync still reads that location.
  • Give each active document a version label and an effective date, and have the agent cite both so staff can check the same text.
  • For duplicates, choose one owned record as the source for each rule, retire the copies and note the retirement in a change log.
  • Re-index after the change, then confirm that the old wording no longer appears in any retrieved passage for the original question.

Two related guides go deeper on the failure modes: how to stop stale context from misleading your agent and how to keep one fact in one owned record.

Illustrative scenario: the old limit that came back

The following scenario is illustrative and does not describe a real company. A finance team publishes a revised travel expense policy in the shared drive. The sync that feeds the agent's knowledge base only adds files, so the previous version stays in the index. A staff member asks the agent which approval applies to a hotel booking. The agent retrieves two passages, one from each version, ranks the older one higher and answers confidently with a citation to the old document.

The trace shows both passages in the retrieved set and a title with the earlier effective date. The team removes the superseded file from the index, adds the effective date as metadata, and writes a test question with the expected answer and the expected source version. The test fails before the fix and passes after it. The team then adds the same test to its scheduled run, so a future sync that reintroduces the old file is caught before a staff member relies on it.

Keeping the fix from quietly failing

A single correction rarely holds on its own. Policies change, new files arrive, and sync jobs can add old content back. Build a small set of real staff questions, each with the expected answer and the expected source version, and run that set after every index change and on a regular schedule. Evaluation guides such as the one in [OpenAI's evals documentation](https://platform.openai.com/docs/guides/evals) describe the same pattern: fixed cases, graded outputs and repeated runs, so that a change can be measured rather than assumed. Review any failing trace within a fixed time, and record the cause category so patterns become visible over months.

Be Human handles this as part of managed operations rather than as a one-time repair. In a first engagement, the role the agent performs, the documents it may retrieve and the approval boundary for index changes are defined in writing. Retrieval traces are kept so a wrong answer can be reconstructed, the test set is maintained with the policy owners, and changes to sources pass through a reviewed step. When an error appears, it is handled as a defined incident with an owner, a cause and a closed test, so the fix does not depend on one person remembering to check. If you are not sure which policy questions an agent should answer first, the free Be Human AI diagnostic can help you find the first task worth handing to an agent.

Frequently asked questions

How do I know whether the agent or the knowledge base is at fault? Compare the retrieved passages with the correct policy before you touch the model or the prompt. If the right text was never retrieved, the problem lies in retrieval, documents or wording. If the retrieved text was correct and the answer still misread it, the trace will show that too, and that is a separate issue to review.

Can I fix retrieval errors by switching to a better model? A different model rarely fixes a missing or outdated source, and a stronger model can make a wrong answer sound more convincing. Fix the evidence first, then evaluate whether the model still misreads correct passages. In some setups, changing the model also changes the embeddings, which means the index must be rebuilt before results are comparable.

How often should I review the knowledge base for stale or duplicate content? Review after every policy change, and run a scheduled check at an interval that matches how often your policies actually change. Assign one owner to each document so that someone is responsible for confirming it is current. The routine matters more than the exact interval you choose.

Is a retrieval error the same as a hallucination? Not quite. A hallucination is an answer that is not grounded in any source at all. A retrieval error is grounded in a real source that happens to be the wrong one, which is why the citation can look credible. Citing the exact document version lets staff check the claim in seconds and spot the mismatch.

Your next step

See where an AI agent fits in your company first.

Take the free Be Human AI diagnostic. A few questions about your work show which task to hand to an agent first, what it needs to know and where a person approves.

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.

Book a call to try a personalized AI agent free for 7 days ↗Or take the free AI diagnostic →