cs.AIMay 19, 2026

Memory-Augmented Reinforcement Learning Agent for CAD Generation

Authors: Yin XiaolongLiu YuShen JiahangLu XingyuNi JingzheFan FengxiaoSang Fan

Organizations: Zhejiang University · Ocean University of China

Abstract

Automatic generation of computer-aided design (CAD) models is a core technology for enabling intelligence in advanced manufacturing. Existing generation methods based on large language models (LLMs) often fall short when handling complex CAD models characterized by long operation sequences, diverse operation types, and strong geometric constraints, primarily because reasoning chains break and effective error-correction mechanisms are lacking. To address this problem, this paper proposes a memory-augmented reinforcement learning framework for CAD generation agents. The framework encapsulates the underlying geometric kernel into a structured toolchain callable by the agent and builds a closed-loop mechanism of design intent understanding, global planning, execution, and multi-dimensional verification. It also designs a dual-track memory module consisting of a case library and a skill library, and proposes a dynamic utility retrieval algorithm. By introducing reinforcement learning into retrieval and policy optimization, the agent can effectively avoid retrieval traps in which examples are semantically similar but geometrically infeasible, enabling online self-correction and continual evolution without additional large-scale annotated data. Experiments show that the proposed method significantly improves both the success rate and geometric consistency on complex CAD model generation tasks.

Explore similar work

Aug 1, 2026cs.AI

CADIR: A Cross-Backend Editable Intermediate Representation for Agentic CAD Generation

Large language models have made it possible to generate executable computer-aided design (CAD) programs from natural-language descriptions or images. However, existing methods represent modeling processes as backend-specific sequential scripts with implicit dependencies or as static geometry, making it difficult to simultaneously preserve construction history, stable topological references, and feature-level editability across different CAD systems. We present CADIR, an agent-friendly executable intermediate representation for CAD generation and cross-backend editing. Built on the OCCT geometry kernel via OCP, CADIR provides explicit, compositional modeling operations and fine-grained execution diagnostics. During program execution, CADIR records modeling operations, parameter dependencies, constraints, and topology selections in a construction graph. To enable reliable cross-backend reconstruction, we introduce Geometric Signature Matching, which identifies corresponding edges and faces despite parameter changes and backend differences, allowing adapters to reconstruct native editable feature histories in FreeCAD, SolidWorks, and Fusion 360. Building on this representation, we further propose a construction-graph retrieval method for text and image queries that supports both full-graph and subgraph retrieval, enabling agents to leverage complete models and modeling substructures. Extensive experiments demonstrate that CADIR achieves higher geometric fidelity and execution reliability than existing CAD representations, that construction-graph retrieval further improves model generation quality, and that cross-backend editing enables reliable model reconstruction and post-reconstruction editing across multiple CAD environments.
Yu Liu, Jingzhe Ni, Yiming Chen +4
May 19, 2026cs.CV

Physics-in-the-Loop: A Hybrid Agentic Architecture for Validated CAD Engineering Design

Large Language Models (LLMs) can generate Computer-Aided Design (CAD), yet lack physical comprehension required for reliable engineering design. Instead of attempting to implicitly learn physical laws from data, we propose a Hybrid Agentic-Physical Architecture that embeds validated knowledge-based engineering tools directly into the decision making loop of autonomous AI agents. In this framework, engineering design is formulated as a closed-loop, sequential decision making process guided by explicit physical verification. Based on a load case, dedicated agents iteratively plan, generate, evaluate, and revise engineering designs using knowledge-based tools as a feedback signal. We introduce a benchmark dataset and metrics for assessing functional validity in generative CAD. Our system generates more complex and physically verified designs, with a 4.2 increase in structural complexity and improving compile rate by 3.5% compared to similar agentic methods. The codebase, prompts and dataset will be made publicly available to support reproducibility and future research.
Elias Berger, Muhammad Usama, Jan Mehlstäubl +2
Jul 6, 2026cs.AI

Foundation Models for Automatic CAD Generation

Recent advances in Large Language Models (LLMs) and Vision-Language Models (VLMs) enable the automatic generation of parametric 3D designs from natural-language specifications. This chapter presents an empirical study of foundation models for automatic Computer-Aided Design (CAD) generation of mechanical parts, using a unified evaluation pipeline and a curated benchmark of 97 engineering design problems. We introduce LLMForge, a multi-model text-to-CAD framework integrating JSON-schema validation, analytic feature scoring, mesh synthesis, and multi-round iterative refinement, studied under two critique regimes. IterTracer uses a Phong-shaded ray-trace renderer with analytic visual metrics (silhouette IoU, hole visibility, edge clearance, aspect-ratio conformance) for lightweight geometry-aware feedback across rounds. IterVision replaces the analytic scorer with a VLM semantic critic (Qwen2.5-VL-72B) that evaluates rendered views via chain-of-thought visual reasoning, assessing spatial coherence and design intent. On a benchmark spanning four canonical geometry families (plates with holes and bolt circles, multi-feature boxes, flanged cylinders, and L-brackets), we evaluate seven foundation models: DeepSeek-V3.2, Qwen3-235B-A22B, Llama-3.3-70B, Gemma-3-27B, GLM-4.5, MiniMax-M2.1, and INTELLECT. Under IterTracer, the four highest-ranked models form a tight cluster (overall mean in [0.885, 0.890]) with 98.97% mesh success, showing that compact instruction-tuned models can match substantially larger systems. VLM-based critique in IterVision yields 100% watertight mesh generation on the leading model while surfacing systematic difficulty on rotationally symmetric geometries such as cylinders, where visual and semantic scoring diverge most. We discuss benchmark design, failure modes, CAD-oriented prompting, and implications for industrial workflows and scalable automated mechanical design.
J de Curtò, Victoria Guillén, I. de Zarzà