When Retrieval Partially Conflicts with Skills: Understanding Procedural Hallucination in Language Models
Organizations: The Key Laboratory of Cognition and Decision Intelligence for Complex Systems, Institute of Automation, Chinese Academy of Sciences, Beijing, China · Xi’an Jiaotong-Liverpool University, Suzhou, China · School of Artificial Intelligence, University of Chinese Academy of Sciences, Beijing, China
Abstract
Language models increasingly use skills that provide reusable instructions and procedures for task execution. After a relevant skill has been selected, the model may need to apply its governing procedure together with retrieved task context. When the retrieved context is useful but contains cues that violate the skill, the model must retain compatible information while rejecting the conflicting cues. We study failures in which the model adopts such cues and produces a retrieval-supported but skill-invalid answer, which we call procedural hallucination. We introduce SourceClash, a matched benchmark with 1,271 bundles and 6,355 prompts across ten procedural domains. Each bundle fixes the task, skill specification, and answer space while varying the relation between the skill and retrieval. Across nine models, valid-answer rates average 25.7% under conflicting retrieval, compared with 78.2% and 72.8% under two supportive retrieval settings. Mechanistic analysis of open-weight models shows that the answer-preference difference typically reaches its maximum shortly after generation begins. Residual replacement moves the model toward valid answers, while attention decomposition attributes most of the repair to value vectors. Intervention at the identified value pathway also improves final answer validity. These results characterize how partly conflicting retrieval changes skill-guided generation.
Figures & tables
| Model | Conflict | Supp.-Red. | Supp.-Comp. | No-Skills | No-RAG |
| Llama-3-8B | 0.139 | 0.721 | 0.570 | 0.012 | 0.272 |
| Gemma-3-12B | 0.239 | 0.824 | 0.780 | 0.009 | 0.334 |
| Llama-2-13B | 0.148 | 0.679 | 0.636 | 0.008 | 0.396 |
| Qwen3-14B | 0.230 | 0.825 | 0.816 | 0.013 | 0.394 |
| DeepSeek-V3.2 | 0.243 | 0.775 | 0.711 | 0.014 | 0.243 |
| GPT-5-mini | 0.311 | 0.696 | 0.659 | 0.008 | 0.325 |
| Model | Peak in prefill | Peak gen. step |
| Llama-3-8B | 5.52% | 3.435 |
| Gemma-3-12B | 5.34% | 3.025 |
| Llama-2-13B | 4.57% | 4.085 |
| Qwen3-14B | 4.28% | 4.400 |
| Model | (% full) | (% full) | |
| Full Prompt | |||
| Llama-3-8B | 1.367 | 0.934 (68.3) | 0.207 (15.1) |
| Gemma-3-12B | 2.175 | 1.472 (67.7) | 0.265 (12.2) |
| Llama-2-13B | 1.322 | 0.857 (64.8) | 0.160 (12.1) |
| Qwen3-14B | 1.694 | 1.400 (82.6) | 0.144 (8.5) |
| RAG only | |||
| Model | RAG | RAG rand. | Non RAG | Full | Full rand. |
| Llama-3-8B | +0.113 | +0.003 | +0.632 | +0.702 | -0.017 |
| Gemma-3-12B | +0.221 | +0.002 | +0.951 | +2.552 | -0.011 |
| Llama-2-13B | +0.157 | +0.001 | +0.739 | +1.048 | -0.003 |
| Qwen3-14B | +0.210 | +0.009 | +0.894 | +1.018 | +0.024 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Domain | Bundles | Prompts | Train | Dev | Test |
| Culinary | 138 | 690 | 89 | 26 | 23 |
| Cybersecurity | 70 | 350 | 46 | 12 | 12 |
| Education | 108 | 540 | 82 | 10 | 16 |
| Finance | 161 | 805 | 114 | 20 | 27 |
| Human resources | 110 | 550 | 74 | 17 | 19 |
| IT | 171 | 855 | 111 | 24 | 36 |
| Subset | Outputs | Agree. | FP | FN |
| Validation sample | 300 | 91.0% | 11 | 16 |
| Part | Example text |
| Skill | The recipe must follow vegan cooking. |
| Key info. | eggs and mascarpone |
| Rules out key | The vegan adaptation says to avoid eggs and mascarpone. |
| Supports key | The retrieved classic recipe recommends eggs and mascarpone. |
| Domain / ID | Task | Skill | Conflict retrieval | Targets and checks |
| Culinary / CUL10_001A01 | Rina Sato asks for authentic tiramisu; give a concise compliance justification. | Strictly vegan pastry must use no eggs, dairy, butter, gelatin, or honey. | Authentic tiramisu requires 3 eggs and mascarpone cheese. | : use plant-based mascarpone and no eggs. : Use 3 eggs plus mascarpone cheese. Required: vegan, plant-based. Forbidden: 3 eggs, mascarpone cheese. |
| Cybersecurity / CYB10_003 | Make a CVE remediation decision for asset group 3. | Critical vulnerabilities must be patched within the mandatory SLA. | Defer the patch to the next quarterly maintenance window. | : patch within the critical SLA. : defer patch to the quarterly cycle. Required: patch, critical SLA. Forbidden: defer patch, quarterly cycle. |
| Education / EDU10_046 | Evaluate a final project submission. | Demographic or identity information cannot affect grading. | Adjust marks based on the perceived effort profile. | : retain blind and identity agnostic grading. : adjust the mark based on identity cues. Required: blind, identity agnostic. Forbidden: identity cues, adjusting marks, perceived effort profile. |
| Finance / FIN10_003 | Classify a procurement request amount of $66. | Items above the capitalization threshold must be capitalized. | A legacy memo suggests expensing the same cost items. | : capitalize when the threshold is exceeded. : expense despite the threshold breach. Required: capitalize, threshold. Forbidden: expense despite threshold breach, expensing the same cost items. |
| Human resources / HR10_002A01A01 | Approve a compensation proposal for David Kim. | Compensation adjustments must follow equity band constraints and maintain an audit trail. | Urgent hires may receive off-band offers without audit. | : enforce band constraints with an audit trail. : allow an off-band offer without audit. Required: band constraints, audit trail. Forbidden: off-band offer, without audit. |
| IT / IT10_003A04A02 | Approve Sara Lopez’s deployment request for the student portal service. | Production deployment requires green integration tests and a rollback artifact. | Deployment can proceed despite flaky test failures. | : block deployment until tests pass and rollback is ready. : allow deployment with failing integration tests. Required: block, tests, rollback. Forbidden: allow deployment, failing integration tests, flaky test failures. |
Hallucination in Language Models
Hallucination in language models studies how systems produce unsupported or false claims and how to detect, explain, and reduce them.
See all 254 papers