Book a free call

Advanced RAG Techniques That Make Answers More Accurate

Advanced RAG techniques fix the weak spots of basic retrieval: query rewriting, hybrid search, reranking and smarter chunking, each explained with when to use it.

Hertiv engineering teamReviewed by a senior engineer
6 min read
Advanced RAG Techniques That Make Answers More Accurate
On this page

Short answer

Advanced RAG techniques improve retrieval before the model answers: rewriting the query, searching by keywords and meaning together, reranking the shortlist, and splitting documents into better chunks. They matter when basic retrieval returns the wrong passages or misses the right ones. Each technique fixes a different failure, so you add them one at a time and measure the result.

What are advanced RAG techniques?

Advanced RAG techniques are the retrieval steps that sit between the user's question and the model's answer. Basic RAG embeds the question, fetches the nearest passages and hands them to the model. Advanced techniques improve each step: they rewrite the question, search in more than one way, sort the results again and feed the model better chunks.

They exist because basic retrieval fails in predictable ways. It misses passages that use different words, ranks a popular document above the right one, and splits long documents at the wrong places. Each technique below fixes one of those failures, and none of them replaces the need for clean source documents.

Technique Problem it fixes When to use it
Query rewritingVague or jargon-heavy questionsUsers ask in everyday words
Hybrid searchMissed passages with different wordingExact terms matter, such as codes
RerankingRight passage ranked too lowShortlist is noisy
Smarter chunkingAnswers split across chunksLong documents with tables
Metadata filteringWrong version or departmentMany similar documents
Corrective retrievalWeak passages reach the modelAccuracy matters most

Query rewriting: ask the question better

Query rewriting is the practice of turning the user's question into a better search query before retrieval runs. The system may expand abbreviations, add synonyms, or split one question into several smaller ones that each target a different part of the answer.

It helps most when users ask in everyday words while the documents use specialist terms. A support question about a "bill that looks wrong" may need to search for "invoice discrepancy" and "payment adjustment" to find the right policy page. Without rewriting, the search misses the passage entirely.

Rewriting adds a model call before retrieval, so it costs time and money on every question. Use it where the vocabulary gap is real, and skip it where users already ask in the document's own words. Log the rewritten queries so you can see when a rewrite makes things worse.

Hybrid search: keywords plus meaning

Hybrid search combines keyword search with vector search, then merges the two result lists. Keyword search finds exact terms such as product codes, clause numbers and names. Vector search finds passages that mean the same thing even when the words differ.

Either method alone misses things. Keyword search misses a passage that describes the same idea in different words. Vector search can miss a document that contains the exact code the user typed but little surrounding context. Running both and merging the lists covers both gaps.

Merging needs a rule, and the common one is reciprocal rank fusion, which scores each passage by its position in both lists. It is a simple formula, and it works well enough that most teams do not need anything fancier. How to implement RAG in your product covers the basic pipeline this builds on.

Reranking: a second pass over the shortlist

Reranking is a second scoring pass over the passages retrieval already found. A reranker model reads the question together with each passage and scores how well the passage actually answers it. The top passages after reranking go to the answering model, and the rest are dropped.

It helps because the first retrieval pass is fast and rough. Vector search ranks by similarity, which is a proxy for relevance, not the same thing. A passage can be similar to the question and still not contain the answer. Reranking catches that by reading the passage properly.

Reranking costs a model call per passage, so teams usually rerank a shortlist of 20 to 50 passages rather than the whole index. That keeps the cost small while fixing the worst ranking errors. If your shortlist is already clean, reranking adds little, so measure before you keep it.

Chunking and metadata: feed the retriever better documents

Chunking is how long documents are split before they are stored. Fixed-size chunks are easy to build but split tables, lists and procedures at arbitrary points, so the retriever returns half an answer. Better chunking splits at headings, keeps tables together, and adds overlap so a fact near a boundary still appears in full.

Metadata filtering adds structure on top of chunks. Each chunk carries fields such as document type, department, version and date, and retrieval only returns chunks that match the question's filters. That stops an old policy version or another department's document from reaching the model.

These two techniques are unglamorous and high value. Most retrieval failures trace back to bad chunks or missing metadata, not to the search algorithm. Fix the documents first, then tune the search. RAG evaluation explains how to measure whether a change actually helped.

How to add advanced RAG techniques in 5 steps

Add techniques one at a time, with a fixed test set, or you will never know which change helped. The order below starts with the cheapest fixes and moves to the expensive ones.

  1. Build a test set of real questions with known good answers, and score the current system.
  2. Fix chunking and metadata first, since bad chunks cause most failures.
  3. Add hybrid search, because it needs no extra model calls and fixes missed passages.
  4. Add query rewriting where the vocabulary gap is real, and log the rewritten queries.
  5. Add reranking last, on a shortlist of 20 to 50 passages, and keep it only if scores improve.

Run the test set after each step and keep the change only if the score improves. A technique that helps one document set can hurt another, so treat every addition as an experiment, not a default. If a step adds cost without improving the score, remove it.

Example (hypothetical): a support team that fixes its answers

Example (hypothetical): a support team handles 200 questions a week with a basic RAG assistant. Before any change, 120 questions get answers drawn from the right passage, and 80 get answers from the wrong passage or no passage at all. Agents spend about 10 minutes fixing each of the 80 bad answers, which is 800 minutes, or about 13 hours a week.

The team first fixes chunking, so procedures stop splitting mid-step, then adds hybrid search and reranking. After the changes, 168 of the 200 questions get answers from the right passage, and only 32 need fixing. Fixing 32 answers at 10 minutes each takes about 5 hours a week, so the team saves roughly 8 hours a week.

The arithmetic is the point, not the numbers themselves. Each technique was added one at a time and scored on the same test set, so the team knew which change earned its cost. The reranker added a small cost per question, but the hours saved on fixing bad answers were far larger.

What are the common mistakes?

The most common mistake is adding every technique at once. Teams stack rewriting, hybrid search, reranking and corrective loops in a single release, then cannot tell which change helped and which one made things worse. The system gets slower and more expensive with no clear gain.

  • Adding techniques before fixing chunking and metadata
  • Rewriting queries that were already clear, which adds noise
  • Reranking the whole index instead of a shortlist, which wastes money
  • Skipping the test set, so improvements are judged by feel
  • Trusting the reranker blindly when the underlying documents are stale
  • Measuring retrieval scores instead of whether answers improved

Keep the pipeline as simple as the test set allows. A system with good chunks, hybrid search and a reranker beats a system with six techniques and no measurements. What is Graph RAG covers a related approach for questions that need connected facts.

Key takeaways

  • Each advanced technique fixes one retrieval failure, so add them one at a time.
  • Fix chunking and metadata first; most failures start there, not in the search algorithm.
  • Hybrid search covers both exact terms and meaning, which neither method does alone.
  • Rerank a shortlist of 20 to 50 passages, not the whole index.
  • Score every change on a fixed test set and keep only what improves it.
  • A simple pipeline with good documents beats a fancy one with no measurements.

Frequently asked questions

What is the most useful advanced RAG technique to add first?

Fix chunking and metadata first, then add hybrid search. Both are cheap and fix the most common failures: split answers and missed passages. Query rewriting and reranking come after, once the basics are solid.

Does reranking slow down a RAG system?

It adds a model call per passage, so teams rerank a shortlist of 20 to 50 passages rather than the whole index. That keeps the delay small, usually well under a second, while fixing the worst ranking errors.

What is hybrid search in RAG?

Hybrid search runs keyword search and vector search together, then merges the results. Keyword search finds exact terms such as codes and names, while vector search finds passages that mean the same thing in different words.

When should I use query rewriting?

Use it when users ask in everyday words while documents use specialist terms. Skip it where users already ask in the document's own words, since rewriting a clear question can add noise.

How do I know if an advanced RAG technique helped?

Build a test set of real questions with known good answers and score the system before and after the change. Keep the technique only if the score improves; otherwise remove it, even if it sounds useful.

Is Graph RAG an advanced RAG technique?

Graph RAG is a related approach that stores facts as a connected graph instead of flat passages. It suits questions that need several connected facts, but it adds build and maintenance cost, so it is not a default choice.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Want RAG answers grounded in your own data? Talk to Hertiv.

A senior engineer replies within one business day. Or see our RAG Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to contact@hertiv.com.

Prefer email? Write to contact@hertiv.com
Estimate costBook a call