What retrieval owes the generator
RAG works when retrieval keeps a clear contract with the generator: here are the chunks, here is where each came from, here is a confidence signal. Skip any of those and the LLM either hallucinates or refuses to cite.
Three signals every retrieval result should carry
- Text — the chunk content, exactly as embedded.
- Source — file path, URL, doc id, chunk index. Anything that lets the generator (and the user) trace back.
- Score — similarity or rerank score so you can drop low-confidence hits before they reach the prompt.
The minimum-viable RAG loop
question -> embed -> retrieve top-k -> filter by score -> stuff into prompt -> generate -> render with citations
Everything else (query rewriting, multi-query, reranking, summarization) is an optimization. Get the loop running first; optimize what the eval set says is broken.