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.
