Design-Specification Tiling for ICL-based CAD Code Generation

· Source: cs.SE updates on arXiv.org · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Expert, extended

Summary

Design-Specification Tiling (DST) is a novel in-context learning (ICL) exemplar selection strategy that significantly improves Computer-Aided Design (CAD) code generation by large language models (LLMs). Addressing the scarcity of domain-specific training data and limitations of existing similarity or diversity-based ICL methods, DST introduces "knowledge sufficiency" as a principled objective. It quantifies this sufficiency using a surrogate tiling ratio, extracting multi-granular design components via n-grams and measuring the proportion of query components covered by selected exemplars. The method demonstrates that maximizing this objective constitutes submodular maximization, providing a polynomial-time greedy algorithm with a (1-1/e)-approximation guarantee. Experiments on the Text2CAD dataset, comprising 151K samples, show DST consistently outperforms baselines across LLMs like Qwen3-30B-A3B, DeepSeek-V3, and Claude 4.5-Haiku, achieving higher Valid Syntax Rate (VSR) and Intersection over Union (IoU), and lower Chamfer Distance (CD) and Edge Chamfer Distance (ECD).

Key takeaway

For AI Scientists and Machine Learning Engineers developing domain-specific code generation systems, you should consider implementing Design-Specification Tiling (DST) for in-context learning. This approach ensures selected exemplars collectively cover complex design requirements, leading to more accurate and syntactically valid CAD code. By adopting DST, you can achieve superior performance with fewer exemplars, optimizing computational resources and improving model reliability for intricate tasks.

Key insights

Knowledge sufficiency, quantified by design-specification tiling, optimizes ICL exemplar selection for CAD code generation.

Principles

Method

DST extracts multi-granular n-gram components, calculates a tiling ratio as a knowledge sufficiency surrogate, then uses a greedy submodular maximization algorithm for exemplar selection.

In practice

Topics

Best for: Research Scientist, AI Scientist, Machine Learning Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by cs.SE updates on arXiv.org.