Sentence Window Retrieval is a technique designed to solve a classic RAG dilemma: "How do I give the LLM enough context without confusing it with irrelevant noise ?" 🧠 The Concept In standard RAG, you search for a chunk of text, and whatever you find is exactly what you send to the LLM. In Sentence Window Retrieval, you decouple the Search from the Synthesis: 1. Search (The Needle): You break your document into tiny, highly specific units (usually just 1 or 2 sentences). You use these tiny units to find the exact "needle" in the haystack. 2. Context (The Window): Once you find that specific sentence, you don't just send that one line. Instead, you "roll down the window" to capture the sentences immediately before and after it. Why do we do this? Precision: Small sentences are easier for vector models to match accurately. Large chunks often "blur" multiple topics together, making the search fuzzy. Context: A single sentence often lacks context (e.g., "It was decided then.").…