## 1 Introduction  
Recent years have seen significant advancements in large language models (LLMs), contributing to the increased prominence of the artificial intelligence (AI) field. Models trained on extensive datasets exhibit significant proficiency in multiple Natural Language Processing (NLP) tasks, including text generation, summarization, and translation. This advancement has led to the practical application of AI in many domains. Work on backtracking algorithms [1] and network consistency [1] helped constraint programming (CP) to become a basic AI paradigm between 1965 and 1985. Approaches to solving constraint satisfaction problems (CSPs) have become central to CP [1]. Though [PERSON] (1996, cited in [2]) saw CP as reaching the ideal of \"users stating problems and computers solving them\", it remains \"somewhat of an art\" [1] with two ongoing challenges: (1) the need for specialized modeling expertise [3] and (2) its limited accessibility for non-programmers. This work addresses these problems by using artificial intelligence-driven automation to investigate the possibility of autonomously generating constraint code for CSPs using LLMs. Two main directions for integrating CP and LLMs have been investigated recently: (1) using CP to improve LLM capabilities (e.g., factuality checks via constraint-basedattention analysis [4] or hybrid text generation [5]) and (2) leveraging LLMs to improve CP (e.g., automating constraint model generation). Our work is directed at the latter. Section 3 contains a detailed review of past methods. Inspired by developments in transformer architectures [6] and deep learning [7], the artificial intelligence revolution has made transformative progress in code generation possible. While early methods depended on strict rule-based systems [8], current transformer-based LLMs such as ChatGPT (GPT-4) [9] may parse natural language instructions to build functional code, dynamically lowering programming barriers [8]. This area has sparked significant research interest and commercial development, as seen by the development of tools such as AlphaCodium (v1.0) [10] and GitHub Copilot (v1.97) [11]. However, several limitations remain unresolved, particularly regarding programming language coverage. Existing LLMs primarily excel with mainstream high-level languages, offering limited support in specialized domains, low-level languages, and less common programming languages. This gap constrains the utility of LLMs in systems programming and niche applications [8]. CP, in particular, falls into the category of less common programming languages. Potential solutions include advanced transfer learning techniques to adapt knowledge from resource-rich languages [8], as well as collaborations with domain specialists to develop tailored training datasets. Enhancing the multilingual code generation ability of LLMs could significantly expand their practical applications, as noted by the authors of [8]. LLMs have demonstrated emerging cognitive abilities, including deliberate, logical reasoning (System-2 reasoning per [PERSON]'s dual-process theory [12]) [13], and instruction-following capabilities [14; 15], enabling junior developers to generate code through natural language descriptions. Constraint optimization and satisfaction problems (COPs and CSPs) are important in many fields, such as scheduling, planning, and resource allocation. In our study, we focus on pure CSPs, of which COPs are an extension, although the Automatic Constraint Model Generator (ACMG) engine works on COPs as well. Formulating solutions to these problems, called models, can be a challenging and time-consuming task, often requiring specialized domain knowledge and mathematical expertise. Recent developments in large language models have opened up new possibilities for automating the process of generating constraint models [16]. The introduction of the transformer model created an opportunity to address existing challenges in CP, but first, the limitation of low-resource programming languages needs to be solved.