---
title: 'CADPrompt: Prompts in CAD and Diagnosis'
url: https://www.emergentmind.com/topics/cadprompt
type: topic
---

# CADPrompt: Prompts in CAD and Diagnosis

Searching arXiv for recent papers on CADPrompt and closely related usages of the term.
CADPrompt is a term used in recent arXiv literature for several related, but non-identical, prompt-centered paradigms at the intersection of computer-aided design, computer-aided diagnosis, and foundation models. In its most specific and widely standardized usage, CADPrompt is “the first CAD code generation benchmark dataset,” introduced together with CADCodeVerify for evaluating natural-language-to-CADQuery generation on 200 expert-annotated samples [2410.05340]. In other works, the term or its immediate derivatives denote geometry-conditioned prompting with CAD renderings for instance segmentation, prompt-driven medical anomaly detection, and prompt-based interfaces that wrap computer-aided diagnosis systems in language or multimodal reasoning layers [2602.20551] [2411.07546] [2302.07257].

## 1. Terminological scope and core usages

In the cited literature, CADPrompt is used in several distinct ways rather than as a single universally fixed framework. The most stable meaning is a benchmark for text-to-CAD code generation, but later papers also use the term to denote prompt modalities derived from CAD geometry and, more broadly, prompt-mediated computer-aided diagnosis workflows [2410.05340] [2510.11631] [2602.20551].

| Usage of CADPrompt | Main artifact | Representative papers |
|---|---|---|
| Benchmark dataset | 200 natural language prompts paired with expert-annotated CADQuery code | [2410.05340], [2510.11631], [2604.10992] |
| Geometry-conditioned prompt | Canonical multi-view CAD renderings used as prompt input to SAM3 | [2602.20551] |
| CAD-style prompting in medical imaging | Positive and negative text prompts steering lesion attention and false-positive suppression | [2411.07546] |
| Prompt-mediated CAD interface | LLM or VLM layer that summarizes CAD outputs and supports report generation or interaction | [2302.07257], [2511.00381], [2509.15226] |
| Prompt evaluation protocol | Pre-registered randomized component-level testing of prompt interventions in clinical AI | [2606.22318] |

This suggests that CADPrompt functions less as a single algorithmic object than as a family of prompt-centric design patterns. The family shares a common thesis: prompts are treated as operational control surfaces for symbolic CAD generation, geometry-aware segmentation, or medically oriented decision support.

## 2. CADPrompt as a benchmark for text-to-CAD code generation

The benchmark formulation originates in CADCodeVerify, which introduces CADPrompt as “the first benchmark for CAD code generation, consisting of 200 natural language prompts paired with expert-annotated scripting code for 3D objects” [2410.05340]. The dataset is built from 200 3D CAD objects sampled from DeepCAD, with human-written step-by-step natural language descriptions and expert-authored Python/CADQuery scripts verified against the source STL geometry using Blender and a geometric solver [2410.05340].

CADPrompt samples are explicitly natural-language-to-program tasks. The input is a textual construction prompt, and the target is executable CADQuery code that compiles to a 3D solid. Prompts emphasize constructive workflows such as sketching primitives, extrusions, negative extrusions, cutouts, symmetry, and relative placement constraints. The descriptions intentionally omit precise numeric parameters, because the benchmark is intended to test qualitative design interpretation rather than rote parameter transcription [2410.05340].

The benchmark also quantifies prompt, mesh, and code complexity. For language prompts, word counts span 9–188 words with an average of approximately 50.1, sentences span 1–11 with an average of approximately 3.4, and CADQuery scripts span 6–46 lines with an average of approximately 16.6. Meshes range from 6 to 540 vertices and from 8 to 1092 faces, with “simple” and “complex” subsets defined by median structural complexity [2410.05340]. EvoCAD reiterates the benchmark scale as 200 samples in total and uses CADPrompt as the central evaluation set for symbolic CAD generation with CADQuery programs compiled into 3D solids [2510.11631].

Evaluation on CADPrompt is geometry-aware and compilation-aware. CADCodeVerify uses Point Cloud distance, Hausdorff distance, Intersection over Ground Truth, and success rate, with non-compiling outputs assigned worst-case geometric scores after normalization to the unit cube [2410.05340]. EvoCAD extends this evaluation with topology-aware metrics based on the Euler characteristic,
$$
\chi = V - E + F,
$$
and defines
$$
T_{err} = |\chi(O) - \chi(\hat{O})|,
$$
together with
$$
T_{corr} = \mathds{1}_{\chi(O)}(\chi(\hat{O})),
$$
to capture whether the generated object has the correct number and connectivity of holes on the watertight subset of CADPrompt [2510.11631]. This directly targets a failure mode already visible in the benchmark: geometrically close but topologically incorrect parts.

## 3. Systems built around the CADPrompt benchmark

CADCodeVerify uses CADPrompt as the sole evaluation benchmark for an iterative generate-compile-repair-refine loop in which a vision-language model generates CADQuery code, receives compiler-error feedback when necessary, renders the resulting object, and then answers automatically generated validation questions about the prompt-object match before revising the code [2410.05340]. The refinement stage is driven by visual feedback rather than direct geometric access to ground truth. On CADPrompt, the method is reported to improve structure, enhance compiled-program success, and reduce Point Cloud distance relative to prior refinement methods [2410.05340].

EvoCAD re-centers the same benchmark around population-based search. For each CADPrompt item, it samples an initial population of CADQuery programs, renders multi-view images, uses GPT-4V or GPT-4o to describe the candidates, and then asks a reasoning model to rank them against the prompt. Selection probabilities are defined by an exponential distribution,
$$
p(r_i, R, \lambda) = \frac{ e^{-\lambda r_i} }{ \sum_{r_j \in R} e^{-\lambda r_j} },
$$
with $\lambda = 0.5$, after which crossover and mutation are performed at the level of CAD code [2510.11631]. On the CADPrompt benchmark, EvoCAD-4o reports the strongest overall performance in the paper’s comparison table, including $T_{corr}=87.2\%$, $T_{err}=0.410$, PCD $=0.0617$, HDD $=0.177$, IoU $=69.9\%$, and DSC $=79.4\%$ on the watertight subset [2510.11631].

ArtiCAD extends the benchmark in a different direction. Its primary problem is articulated assembly design, but CADPrompt is used as a single-part text-to-CAD benchmark to test whether a plan-first, connector-based, multi-agent architecture loses performance on classical text-to-part generation [2604.10992]. ArtiCAD uses FreeCAD Python rather than CADQuery, but evaluates against the same prompt-to-shape objective. Under the Refine-2 protocol, ArtiCAD improves over a Single-VLM Loop baseline on CADPrompt, reporting IoGT mean 0.897 versus 0.873, PCD mean 0.034 versus 0.044, HD mean 0.130 versus 0.148, and compile rate 100% versus 99.5% [2604.10992]. This suggests that CADPrompt has become not only a benchmark but also a transfer test for architectural choices such as evolutionary search and multi-agent decomposition.

## 4. CADPrompt as geometry-conditioned prompting

A second major usage appears in “CAD-Prompted SAM3,” where CADPrompt denotes a prompt modality rather than a benchmark [2602.20551]. The motivating claim is that verbal prompting is limited for uncommon, instance-specific, or difficult-to-describe industrial objects, while image exemplars are confounded by color, texture, and finish. The paper instead proposes to use the CAD model itself as the prompt, instantiated as canonical multi-view renderings of a mesh [2602.20551].

The method renders a CAD mesh $\mathcal{M}$ from $V=12$ canonical views in Blender, samples 25 point prompts inside each rendered foreground mask, encodes each view through SAM3’s image backbone and GeometryEncoder, and treats the resulting embeddings as concept tokens. Query-image tokens $T_I$ and CAD-prompt embeddings $\{E_v\}_{v=1}^{V}$ are fused through SAM3’s FusionTransformer:
$$
T_{\text{fused}} = \text{FusionTransformer}(T_I, \{E_v\}_{v=1}^{V}).
$$
Detection and mask decoding then proceed in a single forward pass, followed by non-maximum suppression [2602.20551]. The training regime is synthetic: approximately 9,000 CAD models from ABC are rendered into randomized industrial scenes in Isaac Sim Replicator, with automated domain randomization over 21 parameters and a two-stage loss schedule using score-weighted mask supervision and one-to-many matching with a presence loss [2602.20551].

The reported gains are strongest precisely where shape, rather than appearance, defines object identity. On a custom 3D-printing dataset, CAD-Prompted SAM3 achieves PQ 0.7385 and F1 0.7636, compared with PQ 0.6057 and F1 0.6271 for Matcher, PQ 0.2846 and F1 0.5035 for PerSAM, and PQ 0.1713 and F1 0.1935 for SAM3 Image Exemplar Prompt [2602.20551]. On T-LESS and ITODD, the method also yields the best reported PQ and F1, including PQ 0.4921 and F1 0.6090 on ITODD [2602.20551]. In this usage, CADPrompt is best understood as geometry-conditioned instance segmentation: the CAD artifact is not the generation target but the prompt itself.

## 5. CADPrompt in medical computer-aided diagnosis

A third line of work uses prompt engineering to modulate computer-aided diagnosis behavior in medical imaging. The most explicit prompt-level formulation appears in CLAP, which the paper describes as a concrete instantiation of “CAD-style prompting” for medical imaging [2411.07546]. CLAP uses BiomedCLIP with an attention-map construction inherited from MedCLIP-SAMv2, generates $A_{positive}$ from lesion-describing prompts and $A_{negative}$ from normal-structure prompts, and combines them through the contrastive attention rule
$$
A_{CLAP} = A_{positive} - A_{negative}.
$$
The resulting map is thresholded as
$$
S = where(A_{CLAP} > \mu + 0.674\sigma),
$$
then inserted into the reconstruction-based EAR anomaly-detection pipeline in place of the original DINO attention map [2411.07546]. On six BMAD benchmarks, the average AUROC is 78.21 for EAR, 77.23 for positive-only language prompting, and 78.89 for CLAP, with notable gains on RESC and CAMELYON16 [2411.07546]. The paper’s interpretation is that positive prompts alone increase false positives, whereas adding explicit normal descriptors suppresses attention over normal anatomy.

ChatCAD places the prompt layer above existing CAD models rather than inside the visual backbone [2302.07257]. The framework converts classifier outputs, segmentation outputs, and report-generator outputs into text, concatenates them into prompts, and asks GPT-3 or ChatGPT to revise the report and answer follow-up questions. Three prompt designs are tested for classifier outputs, including raw scores, score-to-severity categories, and a concise presence-only list. On a 300-case MIMIC-CXR subset evaluated with CheXbert, the average F1 rises from 0.368 for CvT2DistilGPT2 and 0.441 for R2GenCMN to 0.591 for GPT-3-based refinement and 0.605 for ChatGPT-based refinement, using Prompt #3 [2302.07257]. Here, the prompt is a bridge from tensor-valued CAD outputs to language-model reasoning.

VisionCAD generalizes the same idea to an integration-free deployment setting [2511.00381]. A camera captures the diagnostic monitor, RTMDet detects the screen, YOLOv5 identifies the medical-image region, Restormer restores image quality, BiomedCLIP routes by modality, and modality-specific diagnostic models feed a report assistant that maps probabilities into phrases such as “Likely to have {disease}” before prompting GPT-4.1 or Gemini-2.5 to produce a report in “Findings: {} Impression: {}” format [2511.00381]. The framework reports F1 degradation typically less than 2% across classification tasks and report-generation metrics within 1% of those derived from original images [2511.00381]. This suggests a deployment-oriented CADPrompt variant in which prompts orchestrate restored images, model outputs, and report generation without PACS integration.

CalibPrompt, finally, addresses confidence reliability in medical vision-language models during prompt tuning [2509.15226]. It augments standard prompt learning with Smoothed Accuracy and Confidence Matching and an Angular Separation loss over class text embeddings. Across four Med-VLMs and five datasets, it is reported to improve ECE, ACE, MCE, and $\text{ECE}^{\text{KDE}}$ without drastically affecting clean accuracy [2509.15226]. In this usage, prompt learning is not merely a task adapter but an uncertainty-control mechanism for computer-aided diagnosis.

## 6. Evaluation problems, limitations, and emerging directions

Across these literatures, a recurring issue is that whole-system performance may obscure the specific effect of the prompt mechanism. PROMPT addresses this directly by treating prompt components as interventions subject to pre-registration, randomization, matched controls, dismantling, and factorial analysis [2606.22318]. In its synthetic orientation experiment, the full prompt achieved 98.6% accuracy, removing the decoding rule reduced accuracy to 50.1%, and a rule-only arm matched the full prompt within a maximum difference of 2.3 percentage points [2606.22318]. The protocol therefore identified the decoding rule as the sole measurable active component in that setting, while also showing that scaffolding without the rule was harmful relative to the vehicle prompt [2606.22318]. For CADPrompt-style systems, this establishes a methodology for distinguishing active prompting components from inert formatting and from apparently “safe” but ineffective instruction blocks.

Limitations also recur across domains. In text-to-CAD, CADPrompt is modest in scale at 200 samples and focuses on single-part constructive objects rather than full industrial assemblies or multi-material designs [2410.05340] [2510.11631]. In geometry-conditioned segmentation, CAD-Prompted SAM3 depends on CAD accuracy, synthetic-to-real transfer, and the absence of explicit 3D pose inference [2602.20551]. In medical prompting, CLAP relies on manual prompt crafting, ChatCAD acknowledges rudimentary prompt design and lack of clinical validation, and VisionCAD remains sensitive to camera quality, subtle findings, privacy concerns, and environmental variability [2411.07546] [2302.07257] [2511.00381].

The most consistent forward direction is automation and formalization. CLAP explicitly states future plans for “developing an automated fine prompting method” [2411.07546]. EvoCAD and ArtiCAD suggest that search-based and multi-agent planning can improve prompt-conditioned CAD generation on CADPrompt [2510.11631] [2604.10992]. CAD-Prompted SAM3 points toward direct mesh, point-cloud, or implicit-surface conditioning rather than rasterized views [2602.20551]. PROMPT suggests that future CADPrompt systems in clinical settings may need prompt components to be evaluated with the same discipline as other clinical interventions [2606.22318].

Taken together, the literature presents CADPrompt not as a single canonical architecture, but as a research program in which prompts become explicit control variables for symbolic design generation, geometry-conditioned perception, diagnostic reasoning, calibration, and interactive reporting. The common thread is operational: prompts are no longer auxiliary textual wrappers, but task-defining mechanisms whose design, optimization, and evaluation materially affect the behavior of CAD systems.

Source: https://www.emergentmind.com/topics/cadprompt