Advanced RAG
The first version of a retrieval system always works on the demo question and then fails on a real one. Someone asks about "the policy change last year" and the search returns three documents about the policy and none about the change. Advanced RAG is the set of fixes that grew out of that failure — applied before and after retrieval, rather than to the model.
Before the search- Query rewriting turns a conversational question into something a retriever can match, resolving pronouns and expanding abbreviations.
- Query decomposition splits a multi-part question into separate searches whose results are merged.
- Hybrid search runs keyword (BM25) and vector search together, so exact product codes and loose paraphrases both land.
- Chunking on headings and sentence boundaries, with overlap, stops a passage being cut in half mid-argument.
Retrieval returns 50 candidates ranked by a cheap similarity score. A cross-encoder reranker then reads each candidate against the actual question and keeps the best handful — affordable because it only ever runs on the shortlist. Ordering matters too: the strongest passages go at the start and end of the prompt, since models attend unevenly to the middle of a long context.
What it buysThe generator is never better than the passages handed to it, so these stages decide whether an answer is grounded or invented. Advanced RAG is still a fixed pipeline, which is what separates it from modular and agentic variants where the system itself decides what to fetch and when to fetch again. LlamaIndex and LangChain ship most of these stages as components.
Advanced RAG improves retrieval-augmented generation by adding fixed pre- and post-retrieval stages rather than changing the model: query rewriting and decomposition, hybrid keyword-plus-vector search, boundary-aware chunking, and a cross-encoder reranker that reorders candidates before they enter the prompt. It matters because a generator cannot exceed the quality of the passages it receives, and naive single-shot retrieval is where most grounding failures and invented answers begin.
A basic search tool takes your question literally and hands over whatever looks similar. Advanced RAG is what you get when you add the habits of a good librarian. Before searching, the system tidies up your question — working out what "it" refers to, splitting a two-part question in two, and looking for both the exact words and the general meaning. After searching, it skims the candidate documents and keeps only the few that genuinely answer you, placing the best ones where the model is most likely to notice them. The model is unchanged; the material it reads is far better chosen.