RAG: why your answers are wrong, and how to fix it
An assistant that invents an answer has usually been given the wrong documents — or none. Diagnosing a RAG system starts with knowing what it was given to read.
RGAIX team · · 8 min read
Separate the two halves of the problem
A retrieval-augmented system has two stages: finding the right extracts, then writing from them. A wrong answer comes from one or the other, and the remedies have nothing in common.
The test is simple: display the extracts passed to the model. If they contain the answer and the generated text contradicts it, the problem is in the generation. If they do not contain it, no prompt tuning will save the answer.
The five most frequent causes
- Chunking that separates the question from its answer: the table is in one extract, its caption in another.
- Obsolete documents indexed next to current versions, with no date and no priority.
- Purely semantic search that misses exact references — article numbers, product codes.
- A context so long that the relevant extract is drowned in the middle.
- Access rights ignored: the assistant sees documents the user should not see.
Build an evaluation set before optimising
Thirty real questions, with their expected answer and the document that contains it, are enough to turn impressions into measurements. Without that set, every change feels like an improvement.
Measure two distinct rates: the share of questions for which the right document is retrieved, and the share where the produced answer is correct. The first caps the second.
The fixes that actually change the results
| Symptom | Useful fix | Useless fix |
|---|---|---|
| Exact references not found | Hybrid search: keywords + vectors | Changing the generation model |
| Partial answers | Chunking that respects document structure | Increasing the context size |
| Outdated information | Filter by date and remove old versions | Telling the model to “be up to date” |
| Confident inventions | Require a citation and refuse without a source | Lowering the temperature |
Own the refusal to answer
A business assistant must be able to say it does not know. That is a product decision before it is a setting: would you rather have a plausible answer or an honest silence? In a professional context, the second option is almost always the right one.
Requiring a verifiable citation for every claim makes refusal natural: no source, no answer. It is also what lets the user check in one click rather than trust.
A RAG system is not tuned in the prompt: it is tuned in what you give it to read, and in what you allow it not to answer.
Related pages
Private AI, training & automation
Business AI you can control and operate.
Discover the service ↗READ NEXTPrivate AI: what “sovereign” means technically
The word covers four very different requirements. Telling them apart avoids paying for a constraint you do not have — or forgetting one that matters.
Read the article ↗READ NEXTAutomating a process: where humans must stay in the loop
Automating what is repetitive is easy. Deciding what stays validated by a person is the real design work.
Read the article ↗Let’s talk about what is blocking you.
An emergency, a profile to find or a project to structure: let’s start with your need.
