A Solver-Aided Hierarchical Language for LLM-Driven CAD Design
Benjamin T. Jones, Felix Hähnlein, Zihan Zhang, Maaz Ahmad, Vladimir Kim & Adriana Schulz · 2025
Read A Solver-Aided Hierarchical Language for LLM-Driven CAD Design by Benjamin T. Jones, Felix Hähnlein, Zihan Zhang, Maaz Ahmad, Vladimir Kim & Adriana Schulz (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2502-09819.txt.
Introduction
Benjamin Jones and five co-authors give language models a better language for computer aided design in this 2025 paper. Models write code fluently, but procedural geometry defeats them. They reason poorly about space. They also lose the thread of long construction plans.
Their language, AIDL, is hierarchical and solver aided. The model describes a design in nested pieces, and a geometric constraint solver handles the spatial reasoning the model cannot do. In few shot tests, the model sees only a handful of examples. Even so, designs in AIDL came closer to the prompt than designs in a common older language. The objects were also easier to edit and reason about afterward.
Catalog record
| CREATOR | Benjamin T. Jones, Felix Hähnlein, Zihan Zhang, Maaz Ahmad, Vladimir Kim & Adriana Schulz |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 46 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2502-09819
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
A Solver-Aided Hierarchical Language for LLM-Driven CAD Design Benjamin T. Jones, Felix Hähnlein, Zihan Zhang, Maaz Ahmad, Vladimir Kim & Adriana Schulz Abstract Large language models (LLMs) have been enormously successful in solving a wide variety of structured and unstructured generative tasks, but they struggle to generate procedural geometry in Computer Aided Design (CAD). These difficulties arise from an inability to do spatial reasoning and the necessity to guide a model through complex, long range planning to generate complex geometry. We enable generative CAD Design with LLMs through the introduction of a solver-aided, hierarchical domain specific language (DSL) called AIDL, which offloads the spatial reasoning requirements to a geometric constraint solver. Additionally, we show that in the few-shot regime, AIDL outperforms even a language with in-training data (OpenSCAD), both in terms of generating visual results closer to the prompt and creating objects that are easier to post-process and reason about. 1 Introduction Parametric Computer-Aided Design (CAD) systems revolutionized manufacturing-oriented design by introducing a paradigm where geometry is created through a sequence of constructive operations. This approach enables both accuracy and precision in modeling and offers flexibility in design editing. Essentially, CAD systems use domain-specific languages (DSLs) to express geometry as a program, with CAD GUIs as end-user programming interfaces. Recent advances in generative AI have significantly enhanced the creation of 2D and 3D geometry, yet achieving the precision, detail, and editability provided by CAD models remains a challenge. To bridge this gap, one promising strategy is to harness the powerful code generation capabilities of pre-trained large language models (LLMs) and the geometry-as-a-program paradigm from CAD. Rather than generating the geometries directly, we generate CAD programs that produce the geometric structures. However, this raises a crucial question: How can we reimagine the traditional CAD DSL principles, which have been designed for a constant visual feedback loop, to craft innovative languages for design in an age where code is generated with support from AIs? In this work, we address this question and propose a new DSL for CAD modeling with LLMs, which we call AIDL: AI Design Language. Through experiments with different existing models and prior work that analyzes their observed behavior, we identify four key design goals for our DSL. Namely, we propose a solver-aided approach that enables LLMs to concentrate on high-level reasoning that they excel at while offloading finer computational tasks that demand precision to external solvers. For CAD, this means that the DSL should enable implicitly referencing previously constructed geometry ( dependencies ) and specifying relationships between parts that can then be solved by the solver ( constraints ). Further, we aim to create semantically meaningful abstractions that leverage the LLM’s proficiency in understanding and manipulating natural language ( semantics ). Finally, we advocate for a hierarchical design approach , which allows for encapsulating reasoning within different model parts and enhancing editability ( hierarchy ). Our analysis of existing CAD DSLs reveals that none achieve all four design goals, and supporting all goals simultaneously presents challenges due to conflicting requirements. For example, the ability to unambiguously reference all intermediate parts of the geometry ( dependencies ) is a known challenge in CAD. While recent work proposes a language that supports unambiguous referencing, it requires semantic complexity ( semantics ). Additionally, while constraints are widely used in specific aspects of CAD design, such as assembly modeling ( constraints ), supporting them in a complex model with hierarchically defined constraints ( hierarchy ) is computationally challenging. Our key insight is that we can address these challenges by both limiting and expanding different language constructs from prior CAD DSLs. While we limit the use of references to constructed geometry, without losing geometric expressivity, we expand the use of constraints to hierarchical groups of geometry, so called structures . We support these novel language constructs with a recursive constraint solver that leverages the hierarchical structure to tractably solve global constraint systems. We present a series of text-to-CAD results in 2D generated with our language, and we evaluate the importance of different aspects of AIDL by comparing it to OpenSCAD, a popular CAD language, and subsets of the AIDL language that has hierarchy or constraints disabled. For these methods, we report CLIP scores of the generated results and conducted a perceptual study on the generated CAD renderings. Our experiments show that AIDL programs are visually on-par with or better than their OpenSCAD counterparts despite the LLM not seeing AIDL code in its training data, while having superior editability, and our ablations demonstrate that introducing hierarchy contributes to local editability, while constraints allow complex multi-part objects to be composed precisely. With AIDL we show that language design alone can improve LLM performance in CAD generation. Figure 1: A 2D CAD program in AIDL, generated using the prompt “old-school telephone”. The LLM generates AIDL code in a hierarchical fashion, adding constraints using naturally named operators. AIDL’s backend solver produces the final CAD shape rendered on the right. 2 Related Work 2.1 CAD Generation The compilation of large CAD datasets in recent years ( Koch et al., 2019 ; Willis et al., 2021b ; Jones et al., 2021 ; Willis et al., 2022 ) has inspired a wealth of research on synthesizing CAD models. These efforts fall into two broad categories; those which generate CAD geometry directly ( Willis et al., 2021a ; Guo et al., 2022 ; Jayaraman et al., 2023 ; Nash et al., 2020 ; Xu et al., 2024 ; Liu et al., 2024 ) , and those which generate a procedure that generates CAD geometry ( Wu et al., 2021b ; Ellis et al., 2017 ; Ellis et al., 2018 ; Ganin et al., 2021 ; Ren et al., 2022 ; Li et al., 2023a ; Xu et al., 2022 ; Lambourne et al., 2022 ; Para et al., 2021a ; Seff et al., 2022 ; Willis et al., 2021b ; Ma et al., 2024 ; Li et al., 2024 ; Khan et al., 2024 ) . A fundamental challenge with these tools is the ability to control the generation. While many methods can be conditioned on an input allowing for reverse engineering applications ( Lambourne et al., 2022 ; Guo et al., 2022 ) , the few methods that directly focus on generation give limited control over their output ( Jayaraman et al., 2023 ; Wu et al., 2021a ; Xu et al., 2024 ; Seff et al., 2022 ) . The highest degree of control is afforded by those that take sketches as input, such as Free2CAD ( Li et al., 2022 ) but these are effectively reverse reverse engineering an existing geometric design rather than enabling high level guidance. The goal of AIDL is to enable control without direct geometric supervision, and to incorporate semantic understanding beyond that of existing CAD programs. We have thus chosen to design our system around general purpose language models rather than CAD specific models, and focus on DSL design rather than the design or training of a generative model. Importantly, all prior works use CAD DSLs that have limitations when it comes to LLM needs, as we discuss in Section 3.1 . 2.2 Code Generation with LLMs Software engineering has been one of