Clarify Before You Draw: Proactive Agents for Robust Text-to-CAD Generation

Bo Yuan, Zelin Zhao, Petr Molodyk, Bin Hu, Yongxin Chen
2/3/2026
9 citations
cs.LG

Official code: BoYuanVisionary/Pro-CAD (15 stars, Python, last commit 2026-04-30).

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.

Show full abstract

However, existing fine-tuned models tend to reactively follow the 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 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.

View on arXivView PDF

Code Implementations(1)

This is the official repo of paper: Clarify Before You Draw: Proactive Agents for Robust Text-to-CAD Generation

150PythonJan 29, 20267 months ago

Similar Papers

Cite this paper

@article{yuan2026clarify,
  title  = {Clarify Before You Draw: Proactive Agents for Robust Text-to-CAD Generation},
  author = {Bo Yuan and Zelin Zhao and Petr Molodyk and Bin Hu and Yongxin Chen},
  year   = {2026},
  eprint = {2602.03045},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.03045v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.03045.svg)](https://codeofpaper.com/paper/2602.03045)

Discussion