mlsanityData to 24 Nov 2026

Tracing Hallucinations in LLM Reasoning for UML Class Diagram Generation: An Empirical Taxonomy and Mitigation Study

arXiv 2610.30946 ↗Submitted 22 Oct 2026cs.SE cs.CLcited by 0

On the map: LLM reasoning → Hallucination detection and mitigation

Abstract (arXiv)

Large Language Models (LLMs) can generate UML class diagrams from natural language requirements, but hallucinations may compromise the correctness and completeness of the resulting diagrams. Existing evaluations mostly assess the final diagram, without examining the intermediate traces of reasoning-capable LLMs, which can reveal where these hallucinations arise. We develop an empirical taxonomy of eleven hallucination sub-types organised into three dimensions: Prompt Faithfulness (deviations between requirements and reasoning), Code Faithfulness (discrepancies between reasoning and generated PlantUML code), and Reasoning Quality (problems within the reasoning). The taxonomy was derived from 60 manually annotated DeepSeek-R1 traces, applied to 120 further DeepSeek-R1 traces through a dual-LLM annotation pipeline, and examined on 20 DeepSeek-V4-Pro traces. Code Faithfulness was the most frequent dimension for DeepSeek-R1 in both datasets, whereas Prompt Faithfulness dominated for DeepSeek-V4-Pro, suggesting model-dependent failure patterns. In the manually annotated traces, reasoning-trace length showed no significant monotonic association with hallucination frequency, whereas requirement complexity was negatively associated with it, particularly for Prompt Faithfulness errors. In a mitigation experiment on 13 Golden UML ModelSet cases with three Qwen3-based models, adding Prompt Faithfulness and Reasoning Quality constraints to the generation prompt raised the pooled mean F1 score by 4.0 percentage points, whereas a post-hoc Code Faithfulness review provided no consistent further benefit. Relationship modelling remained the lowest-scoring element throughout. These results suggest that localising hallucinations within the generation process can inform targeted, prompt-based mitigation. Whether these findings generalise beyond the DeepSeek and Qwen3 model families remains to be tested.

Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Hallucination detection and mitigation, one of 17 directions in LLM reasoning. Builds on 21 of its 38 references that are in the map. Submitted 22 Oct 2026.

Builds on

21 of 38 references.

Closest ancestors · 1

Same direction, newest first

  1. 2025Detection and Mitigation of Hallucination in Large Reasoning Models: A Mechanistic Perspective19 May

Other references · 20

  1. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,845
  2. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 9,360
  3. 2022Survey of Hallucination in Natural Language Generationcited by 2,143
  4. 2024A Survey on LLM-as-a-Judgecited by 1,528
  5. 2022Competition-Level Code Generation with AlphaCodecited by 1,510
  6. 2023Language Models Don't Always Say What They Think: Unfaithful Explanations in Chain-of-Thought Promptingcited by 1,324
  7. 2020On Faithfulness and Factuality in Abstractive Summarizationcited by 919
  8. 2023SelfCheckGPT: Zero-Resource Black-Box Hallucination Detection for Generative Large Language Modelscited by 863
  9. 2021Retrieval Augmentation Reduces Hallucination in Conversationcited by 716
  10. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 423
  11. 2021The Curious Case of Hallucinations in Neural Machine Translationcited by 164
  12. 2019Taxonomy of Real Faults in Deep Learning Systemscited by 100
8 more
  1. 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigationcited by 98
  2. 2025DeepSeek-R1 Thoughtology: Let's think about LLM Reasoningcited by 98
  3. 2025Evaluating Step-by-step Reasoning Traces: A Surveycited by 68
  4. 2024CodeJudge: Evaluating Code Generation with Large Language Modelscited by 52
  5. 2024Model Generation with LLMs: From Requirements to UML Sequence Diagramscited by 15
  6. 2024From Image to UML: First Results of Image Based UML Diagram Generation Using LLMscited by 13
  7. 2026Toward Epistemic Stability: Engineering Consistent Procedures for Industrial LLM Hallucination Reductioncited by 2
  8. 2025CPR: Mitigating Large Language Model Hallucinations with Curative Prompt Refinementcited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026KDCM: Reducing Hallucination in LLMs through Explicit Reasoning Structures
  2. 2026Prior Bias in Vision Language Models on UML Diagram Interpretation
  3. 2026Reasoning Error from Known Fact: Step-Level Self-Consistency Group Relative Policy Optimization for LLM
  4. 2026Class Model Generation from Requirements using Large Language Models ↗
  5. 2026Why Do LLMs Fail at OCL Generation? A Graph Reasoning Perspective
  6. 2026Refusing the Impossible: A Taxonomy and Benchmark for Code Hallucination in Large Language Models ↗
  7. 2026PRISM: Probing Reasoning, Instruction, and Source Memory in LLM Hallucinations
  8. 2025NOMAD: A Multi-Agent LLM System for UML Class Diagram Generation from Natural Language Requirements