A Solver-Aided Hierarchical Language for LLM-Driven CAD Design
Benjamin T. Jones, Felix Hähnlein, Zihan Zhang, Maaz Ahmad, Vladimir Kim, Adriana Schulz
TL;DR
This paper tackles the difficulty of generating precise procedural CAD with large language models by introducing AIDL, a solver-aided, hierarchical CAD DSL designed for LLM-driven design. AIDL offloads spatial reasoning to a geometric constraint solver while providing dependencies, semantics, and modular hierarchy, enabling LLMs to focus on high-level design intent. The authors demonstrate that AIDL enables accurate, editable 2D CAD programs and achieves competitive visual fidelity and better editability than OpenSCAD in few-shot scenarios, with ablations showing the value of hierarchy and constraints. The work presents a neurosymbolic approach that combines a purpose-built language with a recursive solver, improving controllability and reliability for AI-assisted CAD workflows and suggesting a pathway for more robust AI-assisted design tooling in practice.
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.
