Clarify Before You Draw: Proactive Agents for Robust Text-to-CAD Generation
Bo Yuan, Zelin Zhao, Petr Molodyk, Bin Hu, Yongxin Chen
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. However, existing fine-tuned models tend to reactively follow the user’s instructions and hallucinate dimensions when the text is ambiguous. To address this, we propose a proactive agentic framework for text-to-CadQuery generation, named as 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 based 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% and lowering the invalidity ratio from 4.8% to 0.9%. Our code and datasets are made publicly available on https://github.com/BoYuanVisionary/Pro-CAD.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 59420d9e-780c-4667-833f-02eff03fd3c9Builds on20
- Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan et al.NeurIPS 2023 · 4,972 citations
- DeepCAD: A Deep Generative Network for Computer-Aided Design ModelsRundi Wu, Chang Xiao, Changxi ZhengICCV 2021 · 290 citations
- Text2CAD: Generating Sequential CAD Designs from Beginner-to-Expert Level Text PromptsMohammad Sadil Khan, Sankalp Sinha, Talha Uddin Sheikh, Didier Stricker et al.NeurIPS 2024 · 148 citations
- Hierarchical Neural Coding for Controllable CAD Model GenerationXiang Xu, Pradeep Kumar Jayaraman, Joseph George Lambourne, Karl D. D. Willis et al.ICML 2023 · 88 citations
- Seek-CAD: A Self-refined Generative Modeling for 3D Parametric CAD Using Local Inference via DeepSeekXueyang Li, Jiahao Li, Yu Song, Yunzhong Lou et al.ICLR 2026 · 30 citations
Related papers
- Multi-Agent CAD Code GenerationYang Liu, Daxuan Ren, Yijie Ding, Jianmin Zheng et al.SIGGRAPH 2026
- Towards High-Fidelity CAD Generation via LLM-Driven Program Generation and Text-Based B-Rep Primitive GroundingJiahao Li, Qingwang Zhang, Qiuyu Chen, Guozhan Qiu et al.ICML 2026 · 7 citations
- CAD-Coder: Text-to-CAD Generation with Chain-of-Thought and Geometric RewardYandong Guan, Xilin Wang, Ximing Xing, Jing Zhang et al.NeurIPS 2025 · 64 citations
- Automated CAD Modeling Sequence Generation from Text Descriptions via Transformer-Based Large Language ModelsJianxing Liao, Junyan Xu, Yatao Sun, Maowen Tang et al.ACL 2025 · 8 citations
- From Intent to Execution: Multimodal Chain-of-Thought Reinforcement Learning for Precise CAD Code GenerationKe Niu, Haiyang Yu, Zhuofan Chen, Mengyang Zhao et al.AAAI 2026 · 5 citations
