SPARC: A Multi-Agent System for Electrical Circuit Question Answering

Mushtari Sadia1, Zhenning Yang1, Umme Habiba Lamia2 Nishat Shawrin2 Ang Chen1 Amrita Roy Chowdhury1
1University of Michigan
2Bangladesh University of Engineering and Technology

Abstract

Electrical circuit diagram QA tasks require complex mathematical reasoning, which remains challenging for multimodal LLMs. We present SPARC, a multi-agent system that answers questions over circuit diagrams by grounding reasoning in executable physics-based simulations. SPARC uses LLM agents to synthesize, execute, and analyze simulation programs, improving accuracy and reliability by design. It achieves 83% accuracy, with up to a 58% absolute improvement over baselines, while enabling systematic error diagnosis.

Challenges in circuit QA

Figure 1: SPARC System

Challenges in circuit QA with SPICE: Given a diagram, a netlist and a question, the system must (1) determine number of simulations required; (2) construct or update a SPICE program with correct component values, possibly inferred from text; (3) select analyses (4) select measurements; and (5) interpret outputs to produce answer.

SPARC System Overview

Figure 2: SPARC System

In the simulation setup stage, the planner agent constructs an initial state \( \textsf{S} \) containing the circuit diagram \( D \), a netlist \( N \), a natural-language question \( Q \), and a base SPICE program \( P_{0} \), then analyzes \( Q \) to determine the number of simulations \( k \), producing simulation-specific states \( \{\textsf{S}_{i,0}\} \). In the simulation execution stage, each simulation proceeds independently by iteratively constructing an executable SPICE program \( P_{i} \) through patch generation and repair using three agents, followed by execution with ngspice (an open-source SPICE circuit simulator) and updating the state with output logs from \( P_{i} \). Upon successful execution of all simulations (denoted by \( \textsf{S}^{*}_{i} \)), the simulation analysis stage post-processes the \( k \) simulation outputs to derive the final answer.

Key Contributions:

  • We introduce SPARC, a multi-agent system for electrical circuit QA that synthesizes, executes, and analyzes SPICE programs, grounding LLM reasoning in physics-based simulations and enabling reliability through verifiable computation.
  • We augment existing benchmarks and introduce two datasets pairing circuit diagrams with complex question–answer pairs requiring mathematical analysis, including manual netlist annotation and an automated QA generation pipeline.
  • We show through extensive experiments that SPARC achieves 83% accuracy and up to 58% absolute improvement over baselines. Notably, it delivers the largest gains for weaker models, demonstrating how SPARC's design narrows the gap to stronger models.
  • We further improve reliability by introducing a structured error taxonomy that localizes failures to specific pipeline stages, enabling systematic diagnosis and interpretability.

Results

Result 1
Result 2

Conclusions

We have presented SPARC, a system that answers electrical circuit questions by grounding reasoning in executable, physics-based simulations. Its execution-guided design yields higher accuracy and reliability than end-to-end LLM baselines, demonstrating the effectiveness of simulator-native reasoning for complex circuit QA.

BibTeX

@misc{sadia2026sparcmultiagentelectricalcircuit,
      title={SPARC: A Multi-Agent System for Electrical Circuit Question Answering},
      author={Mushtari Sadia and Zhenning Yang and Umme Habiba Lamia and Nishat Shawrin and Ang Chen and Amrita Roy Chowdhury},
      year={2026},
      eprint={2606.20643},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2606.20643},
}