CADPrompt: Prompts in CAD and Diagnosis
- CADPrompt is a term describing a family of prompt-centric paradigms, including text-to-CAD code generation benchmarks and geometry-conditioned prompt modalities.
- It leverages iterative loops, evolutionary search, and prompt-mediated interfaces to refine CAD outputs and establish diagnostic decision support.
- Evaluation metrics in CADPrompt research assess geometric, topological, and diagnostic accuracies, driving improvements in model performance.
Searching arXiv for 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 (Alrashedy et al., 2024). 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 (Tang et al., 24 Feb 2026, Park et al., 2024, Wang et al., 2023).
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 (Alrashedy et al., 2024, Preintner et al., 13 Oct 2025, Tang et al., 24 Feb 2026).
| Usage of CADPrompt | Main artifact | Representative papers |
|---|---|---|
| Benchmark dataset | 200 natural language prompts paired with expert-annotated CADQuery code | (Alrashedy et al., 2024, Preintner et al., 13 Oct 2025, Shui et al., 13 Apr 2026) |
| Geometry-conditioned prompt | Canonical multi-view CAD renderings used as prompt input to SAM3 | (Tang et al., 24 Feb 2026) |
| CAD-style prompting in medical imaging | Positive and negative text prompts steering lesion attention and false-positive suppression | (Park et al., 2024) |
| Prompt-mediated CAD interface | LLM or VLM layer that summarizes CAD outputs and supports report generation or interaction | (Wang et al., 2023, Li et al., 1 Nov 2025, Basu et al., 18 Sep 2025) |
| Prompt evaluation protocol | Pre-registered randomized component-level testing of prompt interventions in clinical AI | (Hu et al., 21 Jun 2026) |
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” (Alrashedy et al., 2024). 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 (Alrashedy et al., 2024).
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 (Alrashedy et al., 2024).
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 (Alrashedy et al., 2024). 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 (Preintner et al., 13 Oct 2025).
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 (Alrashedy et al., 2024). EvoCAD extends this evaluation with topology-aware metrics based on the Euler characteristic,
and defines
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 (Preintner et al., 13 Oct 2025). 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-LLM 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 (Alrashedy et al., 2024). 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 (Alrashedy et al., 2024).
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,
with , after which crossover and mutation are performed at the level of CAD code (Preintner et al., 13 Oct 2025). On the CADPrompt benchmark, EvoCAD-4o reports the strongest overall performance in the paper’s comparison table, including , , PCD , HDD , IoU , and DSC 0 on the watertight subset (Preintner et al., 13 Oct 2025).
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 (Shui et al., 13 Apr 2026). 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% (Shui et al., 13 Apr 2026). 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 (Tang et al., 24 Feb 2026). 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 (Tang et al., 24 Feb 2026).
The method renders a CAD mesh 1 from 2 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 3 and CAD-prompt embeddings 4 are fused through SAM3’s FusionTransformer:
5
Detection and mask decoding then proceed in a single forward pass, followed by non-maximum suppression (Tang et al., 24 Feb 2026). 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 (Tang et al., 24 Feb 2026).
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 (Tang et al., 24 Feb 2026). 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 (Tang et al., 24 Feb 2026). 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 (Park et al., 2024). CLAP uses BiomedCLIP with an attention-map construction inherited from MedCLIP-SAMv2, generates 6 from lesion-describing prompts and 7 from normal-structure prompts, and combines them through the contrastive attention rule
8
The resulting map is thresholded as
9
then inserted into the reconstruction-based EAR anomaly-detection pipeline in place of the original DINO attention map (Park et al., 2024). 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 (Park et al., 2024). 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 (Wang et al., 2023). 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 (Wang et al., 2023). 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 (Li et al., 1 Nov 2025). 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 (Li et al., 1 Nov 2025). The framework reports F1 degradation typically less than 2% across classification tasks and report-generation metrics within 1% of those derived from original images (Li et al., 1 Nov 2025). 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-LLMs during prompt tuning (Basu et al., 18 Sep 2025). 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 $T_{corr} = \mathds{1}_{\chi(O)}(\chi(\hat{O})),$0 without drastically affecting clean accuracy (Basu et al., 18 Sep 2025). 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 (Hu et al., 21 Jun 2026). 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 (Hu et al., 21 Jun 2026). 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 (Hu et al., 21 Jun 2026). 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 (Alrashedy et al., 2024, Preintner et al., 13 Oct 2025). In geometry-conditioned segmentation, CAD-Prompted SAM3 depends on CAD accuracy, synthetic-to-real transfer, and the absence of explicit 3D pose inference (Tang et al., 24 Feb 2026). 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 (Park et al., 2024, Wang et al., 2023, Li et al., 1 Nov 2025).
The most consistent forward direction is automation and formalization. CLAP explicitly states future plans for “developing an automated fine prompting method” (Park et al., 2024). EvoCAD and ArtiCAD suggest that search-based and multi-agent planning can improve prompt-conditioned CAD generation on CADPrompt (Preintner et al., 13 Oct 2025, Shui et al., 13 Apr 2026). CAD-Prompted SAM3 points toward direct mesh, point-cloud, or implicit-surface conditioning rather than rasterized views (Tang et al., 24 Feb 2026). PROMPT suggests that future CADPrompt systems in clinical settings may need prompt components to be evaluated with the same discipline as other clinical interventions (Hu et al., 21 Jun 2026).
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.