Implement Deterministic Analysis Pipelines with Offline Support#586
Open
Saura-4 wants to merge 4 commits into
Conversation
Introduce static netlist analysis to parse NgSpice circuit netlists deterministically without relying on LLM reasoning. Extract component values, circuit topology, exact node connectivity, and simulation setup directives into structured streaming Markdown tables.
…cause detection Add structured root-cause identification for simulation failures. Include multi-root-cause extraction, transient loop regex fixes, typo detection via circuit fact injection, and deterministic tip boxes. Integrate netlist and error analysis pipelines into chatbot backend threads and UI.
…im AI Assistant Refactor branding from 'Copilot' to 'eSim AI Assistant' across documentation, config files, knowledge base, and dock titles. Fix window dock lookup failures caused by naming mismatches. Update .gitignore to untrack local config and test projects.
…or troubleshooting Introduce an offline formatting engine allowing users without Ollama or local LLM installations to receive formatted, deterministic static netlist analysis reports and error debugging solutions directly in the UI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement Deterministic Analysis Pipelines with Offline Support
Overview
This PR introduces deterministic preprocessing pipelines for SPICE netlists and NgSpice simulation logs before AI-assisted analysis.
Instead of relying on a language model to interpret raw technical text, the AI Assistant now receives structured circuit information extracted directly from generated netlists and simulator output. Deterministic preprocessing handles tasks such as circuit parsing, component extraction, topology identification, and error analysis, while the LLM is focused on explanation and user interaction.
The same deterministic analysis pipeline is also reused to provide an offline analysis mode, allowing users to access structured circuit analysis and troubleshooting guidance even when an Ollama backend or local LLM is unavailable.
Additionally, this PR standardizes the application branding by renaming eSim Copilot to eSim AI Assistant throughout the project.
Note
This PR includes and extends the work previously proposed in PR #582. The implementation has been rebuilt on top of the latest
eSim-Chat-Bot-Semester-Long-Internship_Autumn-2025branch with a clean commit history and additional offline support.Commit Structure
This PR is organized into four logical commits:
Key Changes
1. Deterministic Netlist Analysis
src/chatbot/netlist_analysis.pyfor deterministic SPICE netlist parsing.2. Deterministic NgSpice Error Analysis
error_patterns.pyerror_log_analysis.pyerror_solutions.py3. Standalone Offline Analysis
offline_formatter.py.4. eSim AI Assistant Standardization
Scope
This PR affects the AI Assistant workflow and related UI integration.
Modified components include:
The following components remain unchanged:
Testing
The implementation was manually verified using representative circuits and common NgSpice error scenarios in both AI-assisted and offline modes.
The deterministic rule set is designed to be extensible and can be expanded to support additional circuit patterns and simulator errors in future updates.
Screenshots
Deterministic Netlist Analysis (AI-Assisted)
The deterministic preprocessing pipeline extracts structured circuit information before passing it to the LLM for explanation.
Figures 1–2: Single AI-assisted netlist analysis response (split across two screenshots due to response length).
Deterministic Error Analysis (AI-Assisted)
Structured error facts are extracted deterministically before being provided to the LLM for explanation and troubleshooting.
Figure 3: AI-assisted deterministic error diagnosis.
Standalone Offline Netlist Analysis
The following response is generated entirely by the deterministic analysis pipeline without invoking an LLM.
Figures 4–5: Single offline netlist analysis response (split across two screenshots due to response length).
Standalone Offline Error Analysis
The following response is generated entirely by the deterministic analysis pipeline without invoking an LLM.
Figures 6–7: Single offline error analysis response (split across two screenshots due to response length).