Improving Retrieval Quality
Naive RAG retrieves documents with a single step: embed the user's query, find the nearest neighbors in the vector store, done. This works, but it has predictable failure modes. A short or ambiguous query embeds to a vague vector that doesn't land near anything useful. A query phrased differently from the source documents (different vocabulary, different level of detail) can miss documents that are actually relevant, since embedding similarity captures meaning but isn't immune to wording mismatches. And a single similarity search has no way to combine information spread across several documents, or to catch an exact match on a code, an ID, or a rare term that a semantic embedding tends to blur.