← All patterns
RAG & Retrieval
Getting the right context in front of the model — and knowing when there isn't any.
5 patterns
Hybrid Search with Reranking
Combine lexical and vector retrieval to cast a wide net, then let a cross-encoder decide what actually goes in the prompt.
9 minaka BM25 + vector fusion
Contextual Chunk Augmentation
Prepend document-level context to each chunk before embedding it, so an isolated passage still knows what it is about.
8 minaka contextual retrieval
Query Rewriting and Decomposition
Transform the user's question into the queries your index can actually answer — resolved, expanded, and split into parts.
9 minaka multi-query retrieval
Corrective Retrieval Loop
Grade what you retrieved before you generate from it, and retrieve again — differently — when it is not good enough.
9 minaka CRAG
Grounded Citation and Refusal
Make every claim traceable to a retrieved span, and make "the documents don't say" a first-class, testable output.
9 minaka attributed generation