Edit this page

NA-MIC Project Weeks

Back to Projects List

AI driven interface for SlicerTMS

Key Investigators

Project Description

SlicerTMS is a 3DSlicer module for patient-specific transcranial stimulation. It integrates several functions, including neuronavigation, electric field modeling, real-time EEG streaming and recording, and TMS control. These functions involve a complex user interface, and some tasks, such as neuronavigation registration, may need more than one user. To simplify the interface and improve the user experience, we will develop a new version leveraging LLM models and Slicer AI Agent tools. Specifically, we will eliminate LLM hallucinations at the infrastructure level by executing medical software APIs through human-verified Markdown Cookbooks and local Vector RAG technologies. Furthermore, the system establishes a next-generation intelligent environment featuring a self-evolving Auto-Correction engine that tracks and learns directly from clinician adjustment patterns, all while seamlessly supporting the trusted clinical interfaces medical professionals already use.

Objective

Approach and Plan

Progress and Illustrations

=========================================================================
[ PHASE 1: IMPLEMENTED ] Zero-Hallucination Deterministic Flow
=========================================================================
Concept: Direct route bypasses LLM logic for safe, immediate execution.

[ User Input ] ➔ ( e.g., "Load Patient Data", "Open Registration" )
        ↓
[ RAG Router ]    ━━━ ( Semantic Similarity Calculation )
        ↓
        ┣━━━ [ Match > 0.35 ] ➔ [ Cookbook Execution ] ➔ ( 0s Latency )
        ┃                               ↓ 
        ┃                       Bypass LLM Logic
        ┃                               ↓
        ┃                     [ Strict JSON Payload ]
        ┃                               ↓
        ┃                ( Safe Medical API Execution )

Cookbook Matching Description

Surface Registration Description </br>

Next Steps

[ PHASE 2: FUTURE WORK ] Active Scene Introspection & Reasoning Loop
=========================================================================
Concept: LLM acts as a "Tool User" with bi-directional spatial awareness.

[ Surgeon Input ] ➔ ( e.g., "F10 is off by 2mm, move it down" )
        ↓
[ RAG Router ]    ━━━ ( Semantic Similarity Calculation )
        ↓
        ┗━━━ [ Match < 0.35 ] ➔ [ LLM Deep Reasoning ] 
                                        ↓
                         [ Bi-Directional Query Loop ]
                                        ↓
                  1. READ   ➔ Calls GetNodeCoordinate("F10")
                  2. RETURN ⬅ Slicer: {"F10": [x:45.2, y:12.1, z:55.0]}
                  3. REASON ➔ Calculate Offset (Z: 55.0 - 2.0 = 53.0)
                  4. ACTION ➔ Triggers Cookbook: MoveNode("F10", [0,0,-2])

Active AI Agent </br> Description </br>

Next Steps

=========================================================================
[ PHASE 2: FUTURE WORK ] Active Scene Introspection & Reasoning Loop
=========================================================================
Concept: LLM acts as a "Tool User" with bi-directional spatial awareness.

[ Surgeon Input ] ➔ ( e.g., "F10 is off by 2mm, move it down" )
        ↓
[ RAG Router ]    ━━━ ( Semantic Similarity Calculation )
        ↓
        ┗━━━ [ Match < 0.35 ] ➔ [ LLM Deep Reasoning ] 
                                        ↓
                         [ Bi-Directional Query Loop ]
                                        ↓
                  1. READ   ➔ Calls GetNodeCoordinate("F10")
                  2. RETURN ⬅ Slicer: {"F10": [x:45.2, y:12.1, z:55.0]}
                  3. REASON ➔ Calculate Offset (Z: 55.0 - 2.0 = 53.0)
                  4. ACTION ➔ Triggers Cookbook: MoveNode("F10", [0,0,-2])

Active AI Agent Description </br>

No response

Background and References

SlicerTMS, Slicer AI Agent, NousNav