mlsanityData to 14 Oct 2026

Why Do LLMs Fail at OCL Generation? A Graph Reasoning Perspective

arXiv 2609.26122 ↗First posted 6 Aug 2026cs.SE cs.PLcited by 0

On the map: LLM reasoning → Reasoning benchmarks and evaluation

Abstract (arXiv)

Large Language Models (LLMs) are increasingly used to generate Object Constraint Language (OCL) constraints from natural language specifications and UML class diagrams. However, existing work mainly focuses on improving accuracy, with limited understanding of why these models fail. Aims. This study investigates the underlying causes of LLM failures in OCL generation, framing the task as a graph reasoning problem over UML class diagrams. Method. We conduct an empirical evaluation using the PathOCL dataset across six state-of-the-art LLMs. We analyze the impact of UML structural properties (e.g., navigation depth and model complexity), lexical similarity, prompt ordering strategies, and graph-aware prompting on OCL correctness. Results. We find that OCL generation performance significantly degrades with increasing navigation depth and structural complexity. Lexical similarity has limited influence, while textual ordering of UML elements affects performance. Graph-based prompting yields partial improvements but does not eliminate structural reasoning errors. Conclusions. OCL generation is primarily constrained by graph reasoning limitations rather than purely linguistic factors. These results highlight structural reasoning as a key bottleneck for current LLMs in model-driven engineering tasks.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 3 of its 43 references that are in the map. First posted on arXiv 6 Aug 2026.

Builds on

3 of 43 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024DeepSeek-V3 Technical Report27 Dec

Other references · 2

  1. 2024100 instances is all you need: predicting the success of a new LLM on unseen data by testing on a few instancescited by 24
  2. 2025Optimizing Retrieval Augmented Generation for Object Constraint Languagecited by 4

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026Class Model Generation from Requirements using Large Language Models ↗
  2. 2025NOMAD: A Multi-Agent LLM System for UML Class Diagram Generation from Natural Language Requirements
  3. 2025Can LLMs Reason Structurally? Benchmarking via the Lens of Data Structures
  4. 2026OODEval: Evaluating Large Language Models on Object-Oriented Design ↗
  5. 2025Accurate and Consistent Graph Model Generation from Text with Large Language Models
  6. 2026Prior Bias in Vision Language Models on UML Diagram Interpretation
  7. 2026Large Language Model Reasoning Failures
  8. 2024Can Graph Descriptive Order Affect Solving Graph Problems with LLMs?