Back to Breakage & Emergency Room
Memory & Hallucination

Why RAG Retrieves Outdated Documents Even After You Update Them

The 0.94 similarity trap: why vector databases have zero concept of time or validity.

Direct 40-Word Diagnosis

Standard RAG retrieves outdated documents because vector databases measure semantic similarity, not temporal validity. A superseded policy with high cosine similarity (0.94) easily beats a newer policy with different wording. Exogram enforces temporal validity checks before context reaches the model.

What Actually Happens in Production

A multinational airline updated its cabin pet policy in August 2026. However, its customer support AI continued quoting the 2024 policy because the old document matched customer search keywords with 0.94 similarity in the vector database, causing dozens of passengers to be turned away at the gate.

Why Writing “Please Don't Do This” in Your Prompt Fails

Instructing an LLM to "always quote the latest policy" fails when the retrieval pipeline only feeds the 2024 document into the prompt. The model cannot choose a newer document it was never given.

The Fix: Putting a Real Lock on the Door

Exogram attaches temporal admissibility and active-status tags to documents in an immutable SQLite ledger. Vector chunks that are expired or superseded are filtered out before context enters the model prompt.

python-guard.pyRuns locally in 0.07ms
from exogram import ExogramRetriever
retriever = ExogramRetriever(index='company_kb')

# Retrieve only documents with active temporal validity
valid_context = retriever.query_admissible(
    query='pet travel restrictions in cabin',
    must_be_valid_at='current_timestamp',
    exclude_superseded=True
)

Frequently Asked Questions

Why do not vector databases delete old documents automatically?

Unless manually purged, old and new embeddings coexist in the index. Vector algorithms have no native understanding of dates or superseding versions.

Does Exogram replace my vector database?

No. Exogram sits as a temporal validity filter on top of Pinecone, Chroma, Qdrant, or pgvector.

Lock down your bots in 5 minutes

Give your AI agents freedom to do real work without the fear they will break your software or empty your wallet.