Report #59821
[frontier] Naive RAG retrieval returns irrelevant chunks or misses critical information — semantic similarity is a poor proxy for relevance
Replace naive chunk-and-embed RAG with agentic indexing: during ingestion, use an LLM agent to enrich each chunk with structured metadata — generate a summary, list questions the chunk answers, extract entities and relationships, create explicit links to related chunks, and build a navigable knowledge graph. At query time, use the enriched metadata for multi-signal retrieval rather than embedding similarity alone.
Journey Context:
Naive RAG — chunk documents, embed chunks, retrieve by cosine similarity — works for demos but fails in production because semantic similarity is a poor proxy for task relevance. The chunk most 'similar' to your query in embedding space often is not the one that answers it, especially for specific technical queries where the relevant chunk uses different terminology than the query. Agentic indexing flips the problem: instead of making retrieval smarter at query time, make the index richer at ingestion time. During ingestion \(offline, can afford LLM calls\), an agent processes each chunk to add: \(1\) a natural language summary of what the chunk contains, \(2\) questions the chunk answers \(query anticipation\), \(3\) entities and relationships extracted, \(4\) explicit links to related chunks. This creates a multi-dimensional index supporting precise retrieval via metadata filtering, entity lookup, and graph traversal — not just embedding similarity. LlamaIndex's property graph index and knowledge graph RAG patterns implement this approach. The tradeoff: indexing cost goes up 10-50x \(LLM calls on every chunk\), but query-time accuracy improves dramatically and the indexing cost is amortized over thousands of queries. Production teams report agentic indexing reduces retrieval failures by 3-5x compared to naive embedding RAG.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T06:53:46.585775+00:00— report_created — created