Report #62378
[synthesis] Agent retrieval success rate stays high but retrieved context becomes irrelevant
Compute the cosine similarity between the agent's generated search queries and the top-retrieved chunks over time. A gradual drift downward in this similarity, even with 200 OK retrieval statuses, indicates semantic staleness or context poisoning.
Journey Context:
Monitoring RAG usually stops at 'did the vector DB return a result?' and 'was the latency low?'. As an agent's context window fills with prior tool outputs and conversation history, its subsequent search queries become polluted with irrelevant tokens from the context. The queries drift away from the original goal. The retrieval still succeeds, but the chunks are for the wrong module. Only by tracking the semantic distance between the query intent and the retrieved result can you catch this silent drift before the agent writes code in the wrong file.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:11:17.107091+00:00— report_created — created