Editor’s introduction
The study evaluates SchGen, a large language model designed to generate printed circuit board schematics from natural-language inputs. It compares different code representations, finding that a semantic grounding approach—using named pins and editing primitives—outperforms geometry-heavy or abstract formats in accuracy and functional correctness. The model achieves higher netlist accuracy and functional validity than alternative representations, particularly when connections are verified through named pin matching rather than direct coordinate placement. The evaluation uses expert review of generated schematics against reference designs, accepting electrically equivalent solutions. The study underscores that effective representation design is essential for LLMs to succeed in complex hardware generation tasks.
Introduction
Printed circuit boards (PCBs) are foundational to nearly all electronic hardware, from consumer electronics to Internet-of-Things devices and embodied AI hardware. As new applications proliferate, the demand for customized PCB designs is accelerating, while the design workflow remains largely manual, requiring substantial domain expertise to operate electronic design automation (EDA) tools. Given a user’s design request, engineers create the PCB board following the steps of: (1) Schematic Design: Select circuit components (symbols) and specifying their interconnections (wires) which outputs a netlist file; (2) Layout: Based on the netlist file, determine the placement of components on the metal layers and add metal wires/via holes; (3) Fabrication: Produce the final Gerber file and send to factory to produce. Among them, Schematic design is the critical and challenging step that defines the hardware architecture. And we ask the question: how should schematic construction be represented to support reliable generation by language models?
Recent works start to explore circuit schematic generation from natural-language requests using agent framework. PCBSchemaGen emphasizes constraint-guided iterative verification. CircuitLM combines component retrieval and staged reasoning to generate custom CircuitJSON. These training-free systems improve generation through domain knowledge prompting, structured intermediate formats, and inference-time orchestration. However, they provide limited analysis of how representation affects the joint generation of component placement, spatial schematic layout, and net-level electrical connectivity. In particular, the effects of such representation choices for model training remain unstudied.
To address the representation challenge, we introduce a semantically grounded executable representation of schematic construction which expresses component placement through offsets from local anchors and electrical connections through component references and pin names. To address data scarcity, we develop an agentic pipeline that reconstructs open-source PCB designs as editable KiCad schematics, synthesizes corresponding natural-language requests, and converts each design into executable construction programs to form a dataset.
On top of the code representation, we build SchGen, a model for generating editable KiCad schematics from natural-language requests. Using the dataset, we fine-tune two open-weight backbones, GPT-OSS-20B and Qwen3.8. We also provide the representation’s API specification and examples to general LLMs for prompted generation, which allows us to examine representation choices under both supervised fine-tuning and prompting.
We evaluate SchGen across two fine-tuned backbones and prompted general-purpose LLMs, measuring execution success, netlist accuracy, spatial layout quality, and expert-assessed functional correctness. Representation ablations show that the proposed representation achieves the highest performance among the evaluated representations for both fine-tuned models with much smaller size compared to frontier models. Further generalization studies demonstrate that on an out-of-distribution dataset, fine-tuned SchGen still maintains its advanced ability and achieves the highest performance.
Our contributions are threefold: (1) We introduce Code-L1, an executable schematic representation combining anchor-relative placement with named-pin connectivity, which we use for SchGen training. (2) We construct a dataset of 2,105 schematics spanning 1,390 unique designs, paired with synthesized natural-language requests and executable construction programs through an agent-assisted pipeline with human correction. (3) We evaluate representation choices across two fine-tuned backbones and prompted general-purpose LLMs, demonstrating improved netlist accuracy over alternative representations, meanwhile the finetuned small models achieve higher pass rate and netlist accuracy than general-purpose LLMs.
PCB Schematic Design Process
The PCB schematic design process conventionally depends on electronic design automation (EDA) software, including proprietary tools like,,, and open-source alternatives like. While these tools support similar schematic content and editing operations, they rely on different file formats. Throughout this paper, we use the KiCad schematic format because it is open source. A schematic contains three main item types: (1) component symbols representing physical circuit components such as chips, resistors, capacitors, (2) power symbols representing rails such as VCC for power source, GND for ground, (3) net labels that represent named net connections. Labels with the same name are treated as electrically connected, and are commonly used to define module interfaces so that modules connect automatically via shared label names. Each component symbol has one or more pins corresponding to the part’s physical terminals; power symbols and net labels typically expose a single pin for wiring. We reference pins by an ID or a concise name (e.g., VCC, GND, GPIO1), and draw wires between pins to specify electrical connections.
The schematic design workflow typically starts by selecting the required symbols, then placing them to form a readable layout, and finally wiring the pins to realize the intended circuit. This process is critical as it decides hardware composition and electrical connections between every component, but it is also tedious as it involves placing dozens of symbols and connecting up to hundreds of pins. However, current design automation mostly focuses on the next stage, PCB layout and routing, while schematic design still heavily relies on labor-intensive, manual workflows. SKiDL uses programs to describe circuit components and electrical connections for netlist generation.
Generative AI for Hardware Design
Built on hierarchically abstracted Boolean logic representations, e.g., Verilog and VHDL, recent studies have explored language model-based digital IC design. For analog IC design, CktGNN first represents the circuit topology as graph structures, formulating a graph generation task to enable the design of various topologies. AnalogCoder presents a training-free LLM agent through Python code generation, while LaMAGIC fine-tunes a masked language model. AnalogGenie presents a comprehensive dataset to enable LLM pre-training for circuit topology generation.
Related work also studies translation between existing circuit representations. Netlistify and Image2Net recover netlists from schematic images, while Schemato converts netlists into LTSpice schematic files. These tasks support circuit digitization and visualization, but begin with an existing design whose connectivity is specified or recoverable from the input. Generating a schematic from a natural-language request additionally requires determining components and connections that satisfy the stated requirements. A cited study proposes a feedback-based iterative framework for PCB schematic design, while introduces an agentic framework for LLM-aided circuit design. Our evaluation studies Code-L1 under both prompting and supervised fine-tuning.
Hardware Design Datasets
The development of AI-based hardware generation depends on training on large-volume and high-quality datasets. Cited researchers provide datasets for analog circuits, but do not apply to PCB schematic design. A cited study provides a comprehensive benchmark designed to systematically evaluate LLMs, but it includes mostly PCB-related visual question answering which cannot be used for the design task. Datasets for circuit topology generation and schematic conversion provide useful circuit structures or paired representations, but are not necessarily paired with natural-language requirements and executable schematic construction programs. To supply the paired forms for supervised request-to-schematic generation, we have constructed a dataset of 1,390 unique schematic designs curated from open-source hardware designs on SparkFun Electronics under the CC BY-SA 4.0 license.
Approach
SchGen generates editable PCB schematics by translating natural-language requests into executable construction programs. We first propose the code representation named Code-L1 (Level 1), which specifies component placement and electrical connectivity through schematic editing operations. We then present a pipeline for constructing paired requests, schematics, and programs, followed by the use of this representation for supervised fine-tuning and prompted generation.
Code Representation for PCB Schematics
To tackle the challenges above, our goal is to find a new learning-efficient representation. Our approach is inspired by the observation that human engineers typically follow a systematic process when drawing schematics that can be abstracted into a series of editing operations backed by clear rationales. We summarize two key insights from the above process: (1) The schematic design can be abstracted as a series of editing operations, including adding symbols, placing labels, and connecting pins; (2) The placement of symbols and labels is typically relative to a local reference based on functional correlations; the wire connections follow clear rationales based on the pin names that encode the pin functionalities. Specifically, engineers first place central symbols that represent the core circuit components, then arrange other symbols around them based on their functional connections. Then, the pins are connected according to the connections between circuit component pins, e.g., VCC pins and GND pins are connected to power source and ground symbols, respectively.
add_schematic_symbol places a symbol with the given name from a symbol library on the assigned location with optional rotating and mirroring operations, meanwhile assigning a unique reference name and an optional value string. add_label places net labels with given text on specific locations and orientation, meanwhile allowing specifying label types (e.g., input, output, bidirectional) and a unique label reference ID. get_pin_location gets the location of a specific pin, queried by symbol reference name and the pin name. For power symbols and net labels that have one pin only, the pin name is set as default to ‘1’. connect_pins connects two pins according to the symbol reference names and pin names of the two pins. Finally, write_out_all_wires writes out all wires to a KiCad schematic file with specified connections.
Agentic Sketch
When sketching the schematics, multi-modal LLMs can make mistakes regarding complex wire connections even after iterations. For example, it is hard for LLMs to determine whether two wires are connected or intersect. Thus, we introduce manual editing to adjust the incorrect schematic designs to ensure their alignment with the online design reference. The agentic sketch can accurately reproduce symbols in KiCad from the image input within 5 rounds of iterations. Combining the two steps, we produce a collection of PCB schematic designs in KiCad format by processing resources from online PCB designs like hardware datasheets and designs on SparkFun.
Fine-Tuning and Prompted Generation
We separately fine-tune GPT-OSS-20B and Qwen3.8-27B to generate schematic construction programs from natural-language requests. Both backbones use the same underlying request–program pairs, but receive backbone-specific synthetic chain-of-thought (CoT) supervision. Specifically, each backbone generates CoT traces for its own training examples, and these traces are incorporated into the corresponding training sequences. The CoT tokens contribute to the supervised training loss, providing explicit supervision for intermediate reasoning alongside schematic program generation.
Experiment Setup
Baselines. To isolate the contribution of each design choice in our representation, we compare SchGen, trained with the proposed Code-L1 representation, against ablation variants: Code-L2 (w/o relative coordinates) and Code-L3 (w/o relative coordinates and pin-name connectivity), each finetuned from GPT-OSS-20B and Qwen3.8-27B on the same dataset. To assess explicit reasoning supervision, we additionally train a CoT masked variant for each backbone. This variant retains the CoT traces in the training sequences but excludes their tokens from the supervised loss. We compare the resulting models with prompted general-purpose LLMs. We also include the raw KiCad schematic file representation, which directly uses the text of the KiCad schematic file as training data. We compare SchGen with GPT-5.5, GPT-5.2, Grok-4, Claude Sonnet 5, Claude Haiku 4.5, and Gemini 3.8 Flash.
Main Results
Effect of CoT supervision. Masking the CoT loss reduces netlist Jaccard from 70.7% to 67.6% for Qwen3.8-27B and from 49.1% to 30.5% for GPT-OSS-20B. Functional correctness decreases from 82.6% to 76.0% and from 60.6% to 14.0%, respectively. Explicit CoT supervision therefore benefits both backbones, with a larger improvement for GPT-OSS-20B. Since reasoning traces remain in the training sequences, this ablation measures the contribution of directly supervising CoT in the reasoning process over schematic connectivity logic.
Conclusion
In this work, we introduced SchGen, a large language model for PCB schematic design generation. By proposing a semantic-grounded code representation, we transform schematic design into a structured sequence of interpretable editing Python code, which allows LLMs to effectively capture both spatial reasoning and functional intent. We further constructed a dataset of schematic designs through an agent–human collaborative pipeline, providing high-quality training data for the new task. Experimental results demonstrate that SchGen substantially outperforms ablation variants and general-purpose models in terms of valid circuit generation, spatial arrangement, and netlist accuracy. These findings demonstrate representation design as the key enabler for hardware design generation.
Component Overlap with the GitHub Dataset
We audit component-symbol overlap between the main dataset, including its training and test splits, and the unseen GitHub dataset. After excluding universal resistor, capacitor, and inductor symbols, the main dataset contains 3,302 component instances across 542 unique component identities, while the GitHub dataset contains 985 instances across 394 unique identities.
The remaining overlaps mostly consist of commonly used symbols in the KiCad library, such as switches and connectors. These results show that most non-universal component identities and instances in the GitHub dataset are absent from the main dataset, supporting evaluation on a largely different component vocabulary. This component-level audit does not, by itself, rule out overlap in circuit structures or reuse of learned circuit patterns.
Expert Evaluation Rubric
Evaluators review the user request, the generated schematic, the reference schematic, and relevant component datasheets when necessary. The reference schematic represents one valid implementation rather than the only acceptable solution; electrically equivalent alternatives that satisfy the request are accepted. Each schematic is assessed using the following three criteria.
Connection Error. Evaluators count required functional pins that are unconnected, connected to an incorrect net, or involved in an unintended short. Electrically equivalent connectivity is accepted regardless of graphical wire routing or net-label naming. Differences in visual appearance alone therefore do not constitute connection errors.
Functional Correctness. Evaluators make a binary judgment of whether the complete schematic can reasonably perform the requested functions. Zero Symbol Error and Connection Error counts are necessary but not sufficient for a positive judgment. Evaluators additionally assess end-to-end functionality using their engineering experience and consult relevant datasheets when necessary. This criterion reflects expert assessment of schematic functionality, rather than measured operation of a fabricated board.
Request Styles and Reconstruction Effort
Reconstruction effort. Approximately 50% of the initial sketches contain errors, most of which are minor connection issues. On average, fewer than five connections per schematic require adjustment. Human correction and verification take around 10% of the original design time. More advanced or fine-tuned sketching models can improve reconstruction fidelity.
Requirement-Driven Hardware Case Studies
Case-study setup. We conduct two hardware-design case studies involving three users. Each case starts from a natural-language device specification. Users decompose the request into functional blocks, use SchGen to generate block-level schematics, and merge them into a complete design. The fabricated boards are then tested for correctness. We also ask three experts to perform comparable complete-board design tasks and record the time consumed.
Library and EDA-Tool Portability
SchGen is a general method for PCB schematic generation based on tool-independent operations: anchor-relative component placement and named-pin connections. We choose KiCad for its free license, open-source implementation, accessible libraries, and file format. The same representation can be transferred to Cadence or Altium by implementing a backend through the target tool’s supported scripting interface or SDK.
At inference time, the available library information, including symbol identifiers and pin definitions, is supplied as context. This context can be replaced with metadata from another library, while the backend resolves the supplied identifiers and pin mappings. With compatible library metadata and a backend implementing the same operations, a new library can be used without retraining the model.


