When Words Change the Model: Sensitivity of LLMs for Constraint Programming Modelling

Alessio Pellegrino, Jacopo Mauro
11/18/2025
cs.AIcs.LG

No confident code implementation found for this paper.

Abstract

One of the long-standing goals in optimisation and constraint programming is to describe a problem in natural language and automatically obtain an executable, efficient model. Large language models appear to bring this vision closer, showing impressive results in automatically generating models for classical benchmarks. However, much of this apparent success may derive from data contamination rather than genuine reasoning: many standard CP problems are likely included in the training data of these models. To examine this hypothesis, we systematically rephrased and perturbed a set of well-known CSPLib problems to preserve their structure while modifying their context and introducing misleading elements. We then compared the models produced by three representative LLMs across original and modified descriptions. Our qualitative analysis shows that while LLMs can produce syntactically valid and semantically plausible models, their performance drops sharply under contextual and linguistic variation, revealing shallow understanding and sensitivity to wording.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{pellegrino2025when,
  title  = {When Words Change the Model: Sensitivity of LLMs for Constraint Programming Modelling},
  author = {Alessio Pellegrino and Jacopo Mauro},
  year   = {2025},
  eprint = {2511.14334},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2511.14334v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2511.14334.svg)](https://codeofpaper.com/paper/2511.14334)

Discussion