LLMs, GenAI, RAG, agents, evaluation · insight-1548
Add hard-negative passages to RAG tests, such as the superseded rule or the neighbouring route
- Evidence type
- empirical finding
- Difficulty
- medium
- Roles
- Applied AI, Data scientist
- Industries
- aviation, insurance
Summary: situation, action, reason, boundary
Situation
RAG tests give the generator only the gold passage plus unrelated filler, and the system passes, then fails in production on look-alike text.
Action
For each test question add near-miss passages from the same corpus: the previous version of the rule, the neighbouring route or product, a similar exception, and score whether the answer follows the right one.
Reason
Research on RAG context composition finds that top-ranked documents related to the query but containing no answer hurt accuracy, which random documents did not.
Boundary
Corpora with versions, near-duplicate policies or parallel product lines.
Symptom or risk
Related passages that do not answer the question mislead the generator, but random filler never exercises that failure.
Exceptions
Corpora with little overlap between documents, where near-misses are rare.
Trade-offs
Building near-miss cases takes domain knowledge and curation.
Pitfalls
Concluding from the random-document result that noise is harmless; it was specific to the setup studied.
Lessons and concepts
Claims and their sources
Cuconasu et al. report that related-but-irrelevant top-ranked documents reduced LLM effectiveness in RAG, whereas adding random documents raised accuracy by up to 35% in their setup.