📄️ History summarization
Pre-retrieval starts with the conversation you already have — not with the database. Large Language Models have context windows measured in tens or hundreds of thousands of tokens. That sounds generous until you remember what a RAG prompt actually contains: a system instruction, retrieved document chunks, the current question, and the full prior conversation. Every follow-up turn makes that prompt larger. Even when the hard limit is not hit yet, long histories dilute attention — the model has more room to lose the thread of what matters.
📄️ Document fetch check
Still in pre-retrieval — still no database hit required if the answer is "no." Multi-turn RAG is not the same problem as single-shot Q&A. In a single shot you always retrieve. In a conversation, the user's next message might be:
📄️ HyDE (Hypothetical Document Embeddings)
There is a structural mismatch at the heart of dense retrieval that most RAG tutorials gloss over. During indexing you embed document chunks — passages that look like answers, explanations, definitions, policy paragraphs. At query time you embed a question. Cosine similarity then compares those two representations as if they lived in the same semantic neighborhood.