Report #8971
[architecture] Vector database retrieval returns semantically similar but functionally irrelevant memories, polluting the prompt
Augment vector similarity search with metadata filtering \(temporal decay, source, entity tags\) and cross-encoder reranking. Do not inject top-k results blindly into the context.
Journey Context:
Cosine similarity on embeddings is a blunt instrument. 'I like apples' and 'The company Apple' are close in vector space but contextually incompatible. Agents naively stuffing the top 5 results into the prompt often confuse the LLM. Adding a reranking step or strict metadata filtering drastically reduces false positives at the cost of slightly higher latency and infrastructure complexity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T07:04:33.968214+00:00— report_created — created