From basic retrieval to precision
Chunking
Instead of embedding whole documents, you split them into chapters, sections, or paragraphs. The vector database stores both document-level and chunk-level embeddings. This allows retrieval to be more precise — finding the right section, not just the right document.
HyDE: Hypothetical Document Embeddings
A clever technique: use the LLM to generate a fake answer to the user's question, embed that fake answer, and use it to search the vector database. The fake answer's embedding is often closer to the real document than the original short query would be.
The breadth of RAG research
Between 2020 and 2025, dozens of RAG variations were published: re-ranking retrieved documents, speculative RAG, hybrid search combining keyword and semantic retrieval, and more. The field is moving fast.
Is RAG future-proof?
If context windows grow to infinity, does RAG become irrelevant? Probably not. The search engine analogy holds: even if you could read the entire web, you would still want a search engine to narrow down where to look. Targeted retrieval is faster, cheaper, and provides sources.
If you embed an entire 200-page document as one vector, what information do you lose?