AI Engineering · August 12, 2026 · 8 min read

RAG That Doesn't Hallucinate: It's Retrieval, Not The Model

Swapping models doesn't fix wrong answers. What decides it is how documents are chunked, tagged with metadata, and re-ranked.

Every time a system's answer misses, the team's first reflex is usually the same: swap the model. But in nearly every case we've handled, the model isn't the broken part. What's broken is the text chunk that reaches the model.

A model can only answer from what it's given. If retrieval pulls three wrong chunks, even the most expensive model will compose a convincing sentence on top of the wrong material. That's what people call hallucination, but it's actually a search problem.

Three things most often fix it: chunking documents along their real structure (chapters, sections, clauses) instead of a fixed character count; enough metadata to filter out stale versions; and re-ranking results before they reach the model.

Most importantly, all of it has to be measured. Collect 200 to 300 real questions with correct answers, and run them every time the configuration changes. Without that, every change only feels better, and feeling isn't a metric.

Last: require the system to cite its sources. Not for show, but because users need a way to verify. A system that can be checked earns trust; one that can't gets abandoned after the first mistake.

Punya masalah yang layak dibedah?

Ceritakan situasinya. Kalau bukan kami yang paling tepat, kami bilang dan tunjukkan arah lain.