Table of Contents
Fetching ...

CircuitLM: A Multi-Agent LLM-Aided Design Framework for Generating Circuit Schematics from Natural Language Prompts

Khandakar Shakib Al Hasan, Syed Rifat Raiyan, Hasin Mahtab Alvee, Wahid Sadik

TL;DR

CircuitLM introduces a multi-agent pipeline that translates natural language circuit requests into structured, visual CircuitJSON schematics by grounding generation in a local, canonical component knowledge base. The five-stage workflow (Identification, Retrieval, Reasoning, Generation, Visualization) combines LLM reasoning with retrieval-augmented grounding to mitigate pin hallucinations and electrical violations, reinforced by the Dual-Metric Circuit Validation (DMCV) framework that jointly assesses library compliance and electrical logic. Key contributions include the CircuitJSON format, the grounding knowledge base, the DMCV evaluation method, and an open-source artifact suite for reproducibility. The results show strong electrical validity and library adherence across multiple frontier LLMs on 100 embedded-system prompts, underscoring practical potential for reliable, prototyping-oriented circuit design by non-experts, with future work aimed at industrial-grade expansion and iterative evaluation loops.

Abstract

Generating accurate circuit schematics from high-level natural language descriptions remains a persistent challenge in electronics design, as large language models (LLMs) frequently hallucinate in granular details, violate electrical constraints, and produce non-machine-readable outputs. We present CircuitLM, a novel multi-agent LLM-aided circuit design pipeline that translates user prompts into structured, visually interpretable CircuitJSON schematics through five sequential stages: (i) LLM-based component identification, (ii) canonical pinout retrieval, (iii) chain-of-thought reasoning by an electronics expert agent, (iv) JSON schematic synthesis, and (v) force-directed SVG visualization. Anchored by a curated, embedding-powered component knowledge base. While LLMs often violate electrical constraints, CircuitLM bridges this gap by grounding generation in a verified and dynamically extensible component database, initially comprising 50 components. To ensure safety, we incorporate a hybrid evaluation framework, namely Dual-Metric Circuit Validation (DMCV), validated against human-expert assessments, which achieves high fidelity in microcontroller-centric designs. We evaluate the system on 100 diverse embedded-systems prompts across six LLMs and introduce DMCV to assess both structural and electrical validity. This work bridges natural language input to deployable hardware designs, enabling reliable circuit prototyping by non-experts. Our code and data will be made public upon acceptance.

CircuitLM: A Multi-Agent LLM-Aided Design Framework for Generating Circuit Schematics from Natural Language Prompts

TL;DR

CircuitLM introduces a multi-agent pipeline that translates natural language circuit requests into structured, visual CircuitJSON schematics by grounding generation in a local, canonical component knowledge base. The five-stage workflow (Identification, Retrieval, Reasoning, Generation, Visualization) combines LLM reasoning with retrieval-augmented grounding to mitigate pin hallucinations and electrical violations, reinforced by the Dual-Metric Circuit Validation (DMCV) framework that jointly assesses library compliance and electrical logic. Key contributions include the CircuitJSON format, the grounding knowledge base, the DMCV evaluation method, and an open-source artifact suite for reproducibility. The results show strong electrical validity and library adherence across multiple frontier LLMs on 100 embedded-system prompts, underscoring practical potential for reliable, prototyping-oriented circuit design by non-experts, with future work aimed at industrial-grade expansion and iterative evaluation loops.

Abstract

Generating accurate circuit schematics from high-level natural language descriptions remains a persistent challenge in electronics design, as large language models (LLMs) frequently hallucinate in granular details, violate electrical constraints, and produce non-machine-readable outputs. We present CircuitLM, a novel multi-agent LLM-aided circuit design pipeline that translates user prompts into structured, visually interpretable CircuitJSON schematics through five sequential stages: (i) LLM-based component identification, (ii) canonical pinout retrieval, (iii) chain-of-thought reasoning by an electronics expert agent, (iv) JSON schematic synthesis, and (v) force-directed SVG visualization. Anchored by a curated, embedding-powered component knowledge base. While LLMs often violate electrical constraints, CircuitLM bridges this gap by grounding generation in a verified and dynamically extensible component database, initially comprising 50 components. To ensure safety, we incorporate a hybrid evaluation framework, namely Dual-Metric Circuit Validation (DMCV), validated against human-expert assessments, which achieves high fidelity in microcontroller-centric designs. We evaluate the system on 100 diverse embedded-systems prompts across six LLMs and introduce DMCV to assess both structural and electrical validity. This work bridges natural language input to deployable hardware designs, enabling reliable circuit prototyping by non-experts. Our code and data will be made public upon acceptance.
Paper Structure (27 sections, 3 equations, 11 figures, 2 tables)

This paper contains 27 sections, 3 equations, 11 figures, 2 tables.

Figures (11)

  • Figure 1: Example of a circuit schema generated by CircuitLM from one of our benchmark prompts.
  • Figure 2: An overview of the CircuitLM framework.
  • Figure 3: Input output data of component identification agent
  • Figure 4: Components pin out information is retrieved by using the component's name from the database
  • Figure 5: Workflow of the chain of thought agent, it takes the user's prompt and the retrieved components list and generates a reasoning for building the circuit
  • ...and 6 more figures