NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

VeriInteresting: An Empirical Study of Model Prompt Interactions in Verilog Code Generation

Luca Collini, Andrew Hennesee, Patrick Yubeaton, Siddharth Garg, Ramesh KarriarXiv 2026

TL;DR

This paper presents a large-scale empirical study evaluating 18 language models to understand how model scale, domain specialization, and prompt engineering interact during Verilog code generation. The authors discover that standard software-centric prompting strategies hit a hard "capacity ceiling" in hardware design, and complex structured prompts can catastrophically degrade the performance of highly specialized, fine-tuned models.

What Problem Does This Paper Address?

While large language models (LLMs) have significantly boosted productivity in software engineering, hardware design using Hardware Description Languages (HDLs) like Verilog has not seen comparable gains. Verilog generation is fundamentally different from writing Python or C++; it requires managing concurrency, strict timing constraints, and long-context signal connectivity. A single subtle error can lead to catastrophic failures during chip fabrication.

Furthermore, because hardware designs are high-value, closed-source intellectual property (IP), open-source training data is scarce. This makes local deployment and inference-time prompt engineering critical for hardware teams. However, there has been a lack of systematic research into how different prompting strategies interact with different model sizes and domain-specific fine-tuning regimes.

Methods

The authors design a controlled factorial experiment spanning:

  • 18 Language Models: Including 7 commercial frontier models (e.g., GPT-5, Gemini 3, Claude Sonnet 4) and 11 open-source models (including general-purpose Qwen2.5, code-specialized Qwen2.5-Coder, and Verilog-specialized models like VeriReason and VeriThoughts).
  • 10 Prompting Configurations: Combining baseline prompts, structured prompting (enforcing consistent output schemas via DSPy), prompt refinement (rewriting specifications), chain-of-thought (CoT) reasoning, and in-context learning (ICL) with exemplars.
  • Automated Prompt Optimization: Utilizing Genetic-Pareto (GEPA) prompt evolution to iteratively optimize system prompts based on task feedback.

Datasets

The framework evaluates models across two complementary benchmarks with distinct verification protocols:

  1. VERILOG EVAL V2: A simulation-based benchmark containing 156 tasks from the HDLBits platform, evaluated using the Icarus Verilog simulator against test vectors.
  2. VERITHOUGHTS: A formal verification benchmark that uses the Yosys open synthesis suite to perform logical equivalence checking (LEC) against a golden reference design, ensuring correctness across all possible input states.

Key Insights and Ideas

  • The "Capacity Ceiling": Prompt engineering cannot substitute for foundational hardware knowledge. If a base model lacks the latent representations to understand complex Electronic Design Automation (EDA) concepts, advanced prompting and evolutionary optimization (GEPA) yield only marginal improvements.
  • Fragility of Specialized Models: Highly specialized models fine-tuned via Reinforcement Learning (like the VeriThoughts family) rigidly overfit to specific output formats. Subjecting these models to complex structured prompting or CoT reasoning causes "catastrophic forgetting" of their instruction-following capabilities, severely degrading performance.
  • Benchmark Divergence: Model performance does not automatically generalize across evaluation types. Models fine-tuned using simulation feedback (like VeriReason) perform well on simulation benchmarks but lag behind on formal verification benchmarks, highlighting the necessity of multi-benchmark evaluation in hardware workflows.

Key Results

  • Scale vs. Specialization: For local open-source deployments, increasing model scale remains the most reliable driver of baseline performance. Specialized fine-tuning is highly effective, but its benefits can taper off if the model size does not match the data volume.
Scaling and specialization trends across Verilog benchmarks.
  • Prompt Sensitivity: Structured prompting generally helps general-purpose and code-specialized models (like Qwen-Coder) but actively harms Verilog-specialized models. For instance, structured prompting caused a massive drop in performance for the VT-14 model.
Heatmap showing the change in Pass@10 performance across different prompting strategies.
  • Brittle Refinement: Prompt refinement (asking the model to rewrite the specification before generating code) proved to be the least stable intervention, frequently introducing specification drift and failure modes that outweighed its benefits.

Limitations and Future Work

The study acknowledges certain boundaries, such as fixing the decoding temperature to a single value (0.6) and focusing on aggregate reliability metrics rather than a deep taxonomy of specific hardware error modes (e.g., clocking or reset semantics).

To move past the inference-time "capacity ceiling," the authors outline three future directions:

  1. Data-Mixing Strategies: Fine-tuning specialized hardware models with a mix of strict HDL tasks and diverse general-purpose instruction data to preserve formatting robustness.
  2. Hardware-Native Optimization: Shifting prompt optimization algorithms away from plain text and aligning them structurally with EDA intermediate representations (IR).
  3. System-Level Benchmarks: Developing more rigorous benchmarks that test multi-module integration, bus protocol compliance (e.g., AXI/APB), and timing constraints rather than isolated single modules.

Summary updated

BibTeX
@misc{collini2026veriinteresting,
  author = {Luca Collini and Andrew Hennesee and Patrick Yubeaton and Siddharth Garg and Ramesh Karri},
  title = {{VeriInteresting: An Empirical Study of Model Prompt Interactions in Verilog Code Generation}},
  year = {2026},
  eprint = {2603.08715},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.08715},
}
Figure