# Why your AI cites the wrong document

> A retrieval post-mortem: how near-duplicate rows, stale context that still ranks and a generic tag made a confident answer cite the wrong source.

Canonical page: https://www.greatarrow.ai/guides/why-your-ai-cites-the-wrong-document · updated 2026-11-09

## The problem: a confident answer with a citation that does not hold up

You asked an assistant a plain question. It answered in complete sentences and pointed at a source. You clicked through and the source was real, but wrong. It was an older version, or a summary of the thing rather than the thing, or a row that says nearly what you needed and not quite.

This is worse than no answer. A bare guess looks like a guess. A guess with a citation looks checked.

Most of these failures are not model failures. The model used what it was handed. The retrieval layer put the wrong row at rank one, and nothing downstream could tell. Below are four ways that happens, each taken from something that actually broke in a memory system we run, followed by the line between a citation and a guess.

## The ticket list that kept getting cited

This is the version that cost us the most time.

An assistant in one of our workspaces was asked for the full list of open tickets, with IDs, descriptions and last-updated times. It had two tools: read-only semantic search over stored notes, and web search. No ticket tracker was connected.

Search returned several near-duplicate copies of one stakeholder summary. The summary described an audit that closed about 15 tickets. It listed commit hashes and milestone dates. It contained no ticket IDs, no per-ticket descriptions and no timestamps. One stored note said the summaries had been reconstructed from four records, three of them near-verbatim duplicates. Others noted that the same request had been made eight or more times and hit the same wall each time.

The easy move was to build a table out of the summary and cite the memories. Every row would have had a source. None of those sources would have been a ticket.

The assistant declined. It said it could not retrieve what was not there, offered the commit evidence it did have, confirmed one ticket as still open and blocked on an outside party, and said the fix was to connect the real tracker. That was the correct answer. It refused to launder a summary into a source.

The failure underneath is plain: a summary had been re-cited so often that it was starting to look like data. Each further citation would have added another copy for the next search to find.

## Failure one: near-duplicates vote as if they were independent evidence

Hybrid retrieval runs several searches and fuses their rankings. The standard method is reciprocal rank fusion, described in [Cormack and colleagues' paper](https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf), where each ranked list gives every result a vote of 1/(k+rank). Our pipeline uses k = 60 across a vector arm, a keyword arm and an entity arm.

Three copies of the same summary take three ranks and three slots in the context window. They crowd out the one row that disagrees. Agreement among copies is not corroboration.

A memory-quality audit on a production store counted zero duplicates by content hash and zero by source reference. It concluded that near-duplicate detection was unnecessary. That number is true and answers a narrow question: no two rows are byte-identical. Near-verbatim copies differ by a few words and hash differently. The audit and the ticket episode measure different things, and I am not claiming the audit was wrong. I am saying a zero on exact hashes tells you nothing about whether your top five results are five phrasings of one claim.

The pipeline does diversify at query time, using MMR with λ = 0.7 and one slot per memory. That reduces redundancy among the hits. It does not tell you which copy is the origin. For that, every row needs a source reference, and the citation has to point at the origin, not the retelling.

## Failure two: stale context that still ranks

An embedding has no calendar. A white paper on this problem puts it bluntly: the pricing decided in March and the pricing decided in July both sit in the index with identical confidence, and whichever embeds closer to the question wins. A document deleted upstream keeps answering questions for another year unless something removes it.

We found a concrete version of this in a retrieval audit. Negative-feedback auto-archive set an `archived` flag but left the chunks live, and no search arm filtered on that flag. 1,004 archived memories were still being returned. Worse, each hit re-embedded and un-archived a memory the user had voted down. The fix was an `archived = false` condition on the vector, keyword and hydration queries.

The mirror image is just as real. A retention job archives at 90 days, reading `memories.last_accessed_at`. Opening a document updated a different column, `document_accesses.accessed_at`. A document someone opened every week, but never reached through memory search, looked untouched and aged toward archival anyway.

So stale rows keep ranking and live rows age out. Both come from the index keeping its own idea of time, which is not the one you use.

## Failure three: a generic tag outranked the right document

Boosts are where metadata quietly outvotes content. The keyword arm used to sum a full-text score and tag matches flat. A full-text score from `ts_rank_cd` sits near 0.006 on short texts, so any tag match dwarfed it. One generic tag, 'audit', was on 1,903 memories in a single workspace. A freshly written memory was missed by a query made of its own title words. It ranked 13th, behind 12 tag-only hits.

The fix, recorded in GreatArrow.ai's retrieval notes, is that a text match now scores 1 plus its rank, while each exact tag adds 0.1, capped at 0.5 per memory. On 30 title-as-query probes in production, the target was rank one for 26, up from 25, and the mean rank fell from 246 to 132.

Read that honestly. Four of thirty probes still miss rank one, and a mean of 132 means some land far down the list. It is a better ordering, not a solved one.

Boosts also cut the other way. Tags carry a 1.24x search boost, and an audit found 10,774 active memories, 23% of the total, with no tags at all. They had been ingested before a keyword-tag fallback existed. An untagged row is quietly disadvantaged, and nobody sees it.

## Failure four: the search broke and said nothing

An embedding provider rate-limits. A query times out. The system returns an empty list. The user cannot tell a broken index from an empty company, so they conclude the data was never there.

The subtler version returns results. If the reranker fails, you still get documents, just in fusion order. They look the same and sound as confident.

The defence is labelling. GreatArrow.ai tags hits when the embedding gateway is down (`degraded: "lexical-only"`) and when every reranking venue fails (`degraded: "rerank-skipped"`). Input-order scores that were made up in that fallback are marked, so diversification never reads them as relevance. If the entity arm fails, it returns an empty list and never blocks the search.

The label only helps if your interface shows it. A degraded ranking presented without a flag is a false green.

## A citation versus a guess

**A citation proves where an answer came from, not that it is right.** It earns trust only if a stranger could follow it and land on the origin.

Three questions separate the two:

- **Is it the origin?** If the hit is a summary of other records, say so, and cite what it summarises. If there is no origin, the answer is a guess with a footnote.
- **Is it current?** Was it superseded, archived or deleted upstream? Does the recency your system uses match the recency you care about?
- **Did the search run in full?** Check for degraded labels before you trust the ordering.

One more caution: in the audit above, 28% of active memories were verified. That is a fact about the corpus, not a defect. It means a citation should say whether the row it points to was verified.

When any of the three fails, the useful answer is a specific gap: what is missing, and what would fill it. The ticket episode is the model. 'Connect the tracker' beats a polished table. The guides on [answers from company data with citations](/guides/ai-access-company-data-with-citations) and [tasks you can check afterwards](/guides/give-an-agent-a-task-you-can-check-afterwards) cover the same habit from two sides.

## What to check this week

None of this needs new tooling. It needs an afternoon and a willingness to see a bad number.

1. **Run a title probe.** Take 30 notes you wrote recently, query each with its own title, and record where it ranks. Any target below the top few means a boost or tag is outvoting content.
2. **Chase a changed fact.** Pick something that was decided twice and search for it. See whether the old decision still ranks, and whether the answer says which one is current.
3. **Retire a test row.** Archive or delete one, then confirm it vanishes from every retrieval path, not only the main one.
4. **Break the search on purpose.** Force a timeout or revoke an embedding key in a test environment. Does your interface say degraded, or does it say nothing?
5. **Follow a citation to the end.** Choose an answer that cites a summary and walk back to the origin. If you cannot reach one, treat the answer as a guess.

There is a trade-off. Fusion, reranking, diversification and labelling all add latency and moving parts. If you have a few hundred stable documents and someone who knows them, keyword search and a human check may be the better call. The machinery pays off when the corpus is large, changes constantly and is written by many sources, because that is when nobody can eyeball the top five and spot the wrong one.

## Questions

### Why does my AI cite an old version of a document?

Embeddings do not encode which version replaced which. If a March decision and a July decision both sit in the index with the same confidence, whichever embeds closer to your question wins. You need supersession or recency handled explicitly.

### Does deduplication fix wrong citations?

Only partly. A content-hash check finds byte-identical rows. Near-verbatim copies of a summary hash differently, so they survive and can fill several of your top results. Diversification at query time helps, but only the origin record settles which copy is the source.

### How can I tell whether a search silently failed?

Look for a label on the results. An empty list is ambiguous: it can mean a broken index or an empty company. A fallback that tags each hit as degraded, for example lexical-only or rerank-skipped, lets you and the model see that the ranking is weaker than usual.

### Is a citation proof that the answer is right?

No. A citation shows where an answer came from. You still have to check that the cited row is the origin rather than a retelling, that it is current, and that the search ran in full.

### When is this much retrieval machinery overkill?

With a small, stable set of documents that someone on your team knows well, plain keyword search plus a human check is often the better trade. Fusion, reranking and diversification pay off when the corpus is large, changes often and is written by many sources.
