Clarify Before You Draw: Proactive Agents for Robust Text-to-CAD Generation
Authors:
Preprint
Abstract
Large language models have recently enabled text-to-CAD systems that synthesize parametric CAD programs (e.g., CadQuery) from natural language prompts. In practice, however, geometric descriptions can be under-specified or internally inconsistent: critical dimensions may be missing and constraints may conflict. Existing fine-tuned models tend to reactively follow user instructions and hallucinate dimensions when the text is ambiguous. To address this, we propose a proactive agentic framework for text-to-CadQuery generation, named ProCAD, that resolves specification issues before code synthesis. Our framework pairs a proactive clarifying agent, which audits the prompt and asks targeted clarification questions only when necessary to produce a self-consistent specification, with a CAD coding agent that translates the specification into an executable CadQuery program. We fine-tune the coding agent on a curated high-quality text-to-CadQuery dataset and train the clarifying agent via agentic SFT on clarification trajectories. Experiments show that proactive clarification significantly improves robustness to ambiguous prompts while keeping interaction overhead low. ProCAD outperforms frontier closed-source models, including Claude Sonnet 4.5, reducing the mean Chamfer distance by 79.9 percent and lowering the invalidity ratio from 4.8 percent to 0.9 percent. Our code and datasets will be made publicly available.Keywords
All Related Versions
This publication has 10 references indexed in Scilit:
- From Intent to Execution: Multimodal Chain-of-Thought Reinforcement Learning for Precise CAD Code GenerationProceedings of the AAAI Conference on Artificial Intelligence, 2026
- MEML-GRPO: Heterogeneous Multi-Expert Mutual Learning for RLVR AdvancementProceedings of the AAAI Conference on Artificial Intelligence, 2026
- A Survey on Large Language Models for Code GenerationACM Transactions on Software Engineering and Methodology, 2026
- Reliable LLM-based User Simulator for Task-Oriented Dialogue Systems2024
- Text2CAD: Generating Sequential CAD Designs from Beginner-to-Expert Level Text Prompts2024
- Asking the Right Question at the Right Time: Human and Model Uncertainty Guidance to Ask Clarification Questions2024
- Self-Refine: Iterative Refinement with Self-Feedback2023
- About the Introduction of a Dialogue-Based Interaction within CAD SystemsComputer-Aided Design and Applications, 2013
- Comparing 3D CAD Models: Uses, Methods, Tools and PerspectivesComputer-Aided Design and Applications, 2012
- CAD system use and engineering performanceIEEE Transactions on Engineering Management, 1993