This paper presents the architecture and validation of Medi-Gemma, aimed at addressing the limitations of deploying Large Language Models (LLMs) in high-stakes clinical environments, such as structural hallucinations, weak deterministic reasoning over tabular patient data, and omissions in vector retrieval. Medi-Gemma is a Clinical Decision Support System (CDSS) for wound pathology triage and workflow automation. The platform introduces a decoupled framework that separates clinical perception from data orchestration while preserving traceable reasoning.
Medi-Gemma utilizes a multi-stage pipeline coordinated by a centralized ClinicalOrchestrator. Data requests are handled by a DataManager that cleans unstructured Electronic Medical Record (EMR) files through type coercion without generative inference. Natural language queries are processed by a hierarchical IntentRouter, which routes requests to deterministic analytics paths executed by a PandasQueryEngine or to patient-specific reasoning managed by a ClinicalRAGEngine using a CPU-optimized vector store.
A key contribution is the Ground Truth Injection Module, which intercepts patient-specific queries, extracts numeric identification tokens, queries the structured dataframe via Pandas, retrieves the latest validated clinical state, and embeds this snapshot as an overriding context block in the LLM prompt before generation. Safety compliance is enforced by a deterministic ProtocolManager mapping clinical terminology to fixed evidence-based risk pathways, while a SafetyVerifier phrase filter prevents output rule violations.
Validation shows that this architecture eliminates semantic context drift, prevents database compilation crashes, and improves factual adherence to backend clinical repositories. These results support Medi-Gemma as a safer pattern for LLM-based clinical decision support where structured data fidelity, retrieval grounding, and deterministic safeguards are essential.
Blogger's Review: Medi-Gemma's design cleverly combines deterministic analysis with the generative capabilities of LLMs, ensuring accuracy and safety in clinical decision-making. By introducing the Ground Truth Injection Module, the system effectively enhances responsiveness to the latest clinical information, showcasing the immense potential of AI application in high-risk environments. Its architecture not only mitigates common hallucination issues but also improves the reliability of patient data, indicating a broad scope for application.