Last updated

Improving Your RAG System

The point: A basic RAG pipeline is easy; a good one takes tuning. Most quality problems come from retrieval — if you fetch the wrong chunks, even the best model gives a wrong answer.

The biggest levers

  • Chunk size & overlap — experiment; add overlap so ideas are not cut in half
  • Better embeddings — a stronger embedding model improves every retrieval
  • Retrieve more, then re-rank — fetch the top 20, then use a re-ranker to pick the best 3
  • Hybrid search — combine vector (meaning) search with keyword search for the best of both
  • Clean your data — garbage documents produce garbage answers

Measure, do not guess

Build a small set of test questions with known answers, and check whether your system retrieves the right chunks and answers correctly. Tune one thing at a time and measure the effect.

💡 Rule of thumb: when a RAG answer is wrong, first check what was retrieved. Nine times out of ten, the fix is in retrieval, not the model.

Ad · responsive