Part 06 · 5 min read · Published

RAG Done Right: Where the Real Quality Comes From

Most RAG fails at retrieval and blames the model. Semantic chunking, hybrid search, re-ranking — and why owning the pipeline matters.

TL;DR

  • The model is not the product; the retrieval is. Most "RAG" fails at retrieval and blames the model — and the fix (semantic chunking, hybrid retrieval, re-ranking, governed context) is only possible because you own the pipeline.

Here's a pattern I see repeatedly. A team wires a model to a vector store, ships it, and the answers are… plausible. Sometimes right. Sometimes confidently wrong. And when they're wrong, the instinct is to blame the model — "you need a bigger one." But in the large majority of cases the model got fine context and the retrieval was the weak link. The model did what it was told; it was told the wrong thing.

This matters for a sovereign stack because it's the difference between an expensive toy and a system your business can rely on. You can't fix bad retrieval by swapping models — you have to fix the retrieval. And because it's all in-perimeter, you actually can fix it, iterate on it, and see the effect. That's a real sovereignty advantage: the feedback loop is yours.

Five levers, in the order of how often they're gotten wrong

1. Chunking is a design decision, not a default. Fixed blocks are how most "RAG" quietly degrades: a paragraph straddling the boundary loses meaning, a table split in half becomes noise, an FAQ that's really independent Q&A pairs gets chopped into meaningless slices. Good chunking is semantic and structural — it respects headers, document type, and the way your content is actually organised. A long procedure splits on step boundaries; a legal document on clause; a knowledge base on the natural units a human would pull. This is where domain knowledge beats cleverness — and where a "we used the default chunk size" answer should make a CTO pause.

2. Vector search alone is not enough. Pure vector search is great for "what does this mean" but can miss exact terms — a part number, a clause reference, a date, a proper noun. Hybrid retrieval pairs vector search with keyword search (the classic lexical, BM25-style method) and merges the two result sets — typically with a ranking-fusion technique like Reciprocal Rank Fusion, which blends ranks robustly without needing to normalise incompatible scores. This single change fixes a large share of "it should have known that" failures. It's cheap, in-perimeter, and entirely under your control — which means you can tune the blend to your data, something a black-box API will not let you do.

3. Re-ranking is the cheap quality win. First-pass retrieval (the bi-encoder that scores each document against the query separately) is fast but coarse. A re-ranker (a cross-encoder) re-scores the top-k candidates by looking at the query and each document together, and reorders them before you burn tokens sending context to the model. A small, fast re-ranker on the top 30–100 candidates routinely lifts answer quality more than doubling the context window — and it's a model you run. One of the highest-leverage, lowest-cost improvements in the whole stack, and almost never in a "we connected it to a vector DB" setup.

4. Context assembly is where policy lives. Before the model sees the context, the orchestrator checks it against the classification from Article 5. Can this user actually see this record? Should this PII be redacted before it reaches the prompt? Is the retrieved set within the user's entitlements? This is the step that turns "retrieval" into "governed retrieval" — and it's invisible in most vendor setups, which is exactly why it belongs in yours. It's the point where the retrieval plane and the security plane (Article 9) are the same mechanism.

5. Cite what you used. A sovereign answer doesn't just sound grounded — it shows its sources. Every claim can be traced back to the document it came from. For a CEO, that's a trust feature. For a regulator, that's your audit trail. And it's only possible because the retrieval happened in a place you control and logged. An answer that can't point to its source is an answer you can't defend.

You can't improve retrieval you don't measure

Retrieval is a product you iterate on, not a one-time integration. The minimum healthy signal set:

  • Retrieval quality — is the right document in the top-k? (Hit rate / recall@k on a labelled query set.)
  • Groundedness — is the answer actually supported by the retrieved context, or is the model filling gaps?
  • Context relevance — did you retrieve relevant context, even if the answer missed?

The first two separate "plausible" from "reliable." You build a small labelled set of real queries with the known-correct source, run it against the pipeline, and watch it improve as you tune chunking, blend, and re-ranking. That loop is the whole value of doing this in-perimeter: you can see the needle move. A rented black box gives you the answer and nothing else — no retrieval score, no context you can inspect, no lever you can turn.

Diagram — retrieval pipeline with the evaluation loop that tunes chunking, blend, and re-rank
Diagram — retrieval pipeline with the evaluation loop that tunes chunking, blend, and re-rank · Open interactive diagram

Caption: Most "RAG" fails at retrieval and blames the model. The loop at the bottom is only turnable because you own the pipeline.

Next: the orchestration layer — where your business logic, your guardrails, and your audit trail actually live.

Next article · Part 07

The Orchestration Layer: Where Control Lives →