Enhancing Large Language Models for End-to-End Circuit Analysis Problem Solving

📅 2025-12-10
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Large language models (LLMs) frequently fail in multimodal engineering tasks—such as circuit analysis—due to source polarity misidentification and reasoning hallucinations. Method: This paper introduces the first end-to-end AI solver system tailored for circuit analysis. It innovatively integrates YOLOv8 with OpenCV for high-accuracy component detection, and establishes an ngspice simulation–driven iterative LLM reasoning correction mechanism enabling human-in-the-loop verification. The system leverages Gemini 2.5 Pro for multimodal understanding and automated .cir netlist generation. Contribution/Results: Evaluated on 83 undergraduate-level circuit problems, the system achieves 97.59% accuracy—outperforming baseline methods by 18 percentage points. It significantly enhances the reliability and practical utility of AI tools in engineering education, addressing critical limitations in multimodal reasoning and domain-specific verification.

Technology Category

Application Category

📝 Abstract
Large language models (LLMs) have shown strong performance in data-rich domains such as programming, but their reliability in engineering tasks remains limited. Circuit analysis -- requiring multimodal understanding and precise mathematical reasoning -- highlights these challenges. Although Gemini 2.5 Pro improves diagram interpretation and analog-circuit reasoning, it still struggles to consistently produce correct solutions when given both text and circuit diagrams. At the same time, engineering education needs scalable AI tools capable of generating accurate solutions for tasks such as automated homework feedback and question-answering. This paper presents an enhanced, end-to-end circuit problem solver built on Gemini 2.5 Pro. We first benchmark Gemini on a representative set of undergraduate circuit problems and identify two major failure modes: 1) circuit-recognition hallucinations, particularly incorrect source polarity detection, and 2) reasoning-process hallucinations, such as incorrect current directions. To address recognition errors, we integrate a fine-tuned YOLO detector and OpenCV processing to isolate voltage and current sources, enabling Gemini to re-identify source polarities from cropped images with near-perfect accuracy. To reduce reasoning errors, we introduce an ngspice-based verification loop in which Gemini generates a .cir file, ngspice simulates the circuit, and discrepancies trigger iterative regeneration with optional human-in-the-loop review. Across 83 problems, the proposed pipeline achieves a 97.59% success rate (81 correct solutions), substantially outperforming Gemini 2.5 Pro's original 79.52% accuracy. This system extends LLM capabilities for multimodal engineering problem-solving and supports the creation of high-quality educational datasets and AI-powered instructional tools.
Problem

Research questions and friction points this paper is trying to address.

Enhancing LLMs for reliable circuit analysis with multimodal inputs
Addressing hallucinations in circuit recognition and reasoning processes
Developing scalable AI tools for engineering education and feedback
Innovation

Methods, ideas, or system contributions that make the work stand out.

Fine-tuned YOLO detector and OpenCV for source polarity recognition
Ngspice verification loop with iterative regeneration for reasoning errors
Integrated pipeline achieving 97.59% success rate in circuit analysis
Liangliang Chen
Liangliang Chen
Georgia Institute of Technology
Machine LearningRoboticsHuman-in-the-loop ControlAI in EducationControl Theory & Application
W
Weiyu Sun
School of Electrical and Computer Engineering, Georgia Institute of Technology, Atlanta, GA 30332 USA
Y
Ying Zhang
School of Electrical and Computer Engineering, Georgia Institute of Technology, Atlanta, GA 30332 USA