LLMs have demonstrated strong performance in data-rich domains such as programming, yet their reliability in engineering tasks remains limited. Circuit analysis--requiring multimodal understanding and precise mathematical reasoning--highlights these challenges. Although Gemini 2.5 Pro shows improved capabilities in diagram interpretation and analog-circuit reasoning, it still struggles to consistently produce correct solutions when given both textual problem descriptions and circuit diagrams. Meanwhile, engineering education demands scalable AI tools capable of generating accurate solutions for applications such as automated homework feedback. This paper presents an enhanced end-to-end circuit problem-solving framework built upon Gemini. We first conduct a systematic benchmark on undergraduate circuit problems and identify two key failure modes: 1) circuit-recognition hallucinations, particularly incorrect source polarity detection, and 2) reasoning-process hallucinations, such as incorrect current direction assumptions. To address recognition errors, we integrate a fine-tuned YOLO detector and OpenCV-based processing to isolate voltage and current sources, enabling Gemini to accurately re-identify source polarities from cropped images. To mitigate reasoning errors, we introduce an ngspice-driven verification loop, in which simulation discrepancies trigger iterative solution refinement with optional HITL feedback. Experimental results demonstrate that the proposed pipeline achieves 97.59% accuracy, substantially outperforming Gemini's baseline of 79.52%. Furthermore, on four variations of hand-drawn circuit diagrams, accuracy improves from 56.06%--71.21% to 93.94%--95.45% with statistically significant gains. These results highlight the robustness, scalability, and practical applicability of the proposed framework for engineering education and real-world circuit analysis tasks.
翻译:大规模语言模型在编程等数据丰富领域展现了强大性能,但其在工程任务中的可靠性仍然有限。电路分析——需要多模态理解和精确数学推理——凸显了这些挑战。尽管Gemini 2.5 Pro在电路图解读和模拟电路推理方面能力有所提升,但在同时给定文本问题描述和电路图时,仍难以持续生成正确解。与此同时,工程教育需要可扩展的AI工具,能够为自动作业反馈等应用生成准确解。本文提出了一种基于Gemini的增强型端到端电路问题求解框架。我们首先对本科级电路问题进行了系统性基准测试,识别出两类关键失效模式:1)电路识别幻觉,特别是错误的电源极性检测;2)推理过程幻觉,例如错误的电流方向假设。为解决识别错误,我们集成了微调的YOLO检测器和基于OpenCV的处理流程来隔离电压源和电流源,使Gemini能够从裁剪图像中准确重新识别电源极性。为减轻推理错误,我们引入了ngspice驱动的验证循环,其中仿真偏差会触发迭代解优化,并可选配人机回环反馈。实验结果表明,所提流水线实现了97.59%的准确率,显著优于Gemini基线的79.52%。此外,在四种手绘电路图变体上,准确率从56.06%–71.21%提升至93.94%–95.45%,且具有统计显著性。这些结果突显了所提框架在工程教育和实际电路分析任务中的鲁棒性、可扩展性和实际适用性。