| --- |
| title: Clinical Decision Support Agent |
| emoji: π |
| colorFrom: green |
| colorTo: blue |
| sdk: gradio |
| app_file: app.py |
| pinned: false |
| license: mit |
| pipeline_tag: text-generation |
| base_model: mistralai/Mistral-7B-v0.1 |
| tags: |
| - medical-ai |
| - llm |
| - clinical-decision-support |
| - langgraph |
| - pubmed |
| - groq |
| - llama |
| - agent |
| - medical |
| - rag |
| - nlp |
| - healthcare |
| - gradio |
| - langchain |
| --- |
| |
| # π₯ Clinical Decision Support Agent |
|
|
|  |
|  |
|  |
|  |
|
|
| ## π― Live Demo |
| π [Try it on Hugging Face Spaces](https://huggingface.co/spaces/mou11/clinical-decision-support-agent) |
|
|
| ## π Overview |
| A production-grade Medical AI Agent that takes patient symptoms as |
| natural language input, searches real PubMed medical literature |
| automatically, and generates structured clinical recommendations |
| with citations. Built with LangGraph for agent orchestration and |
| Groq (LLaMA 3.3 70B) for clinical reasoning. |
|
|
| ## π Results |
|
|
| | Metric | Score | |
| |--------|-------| |
| | BERTScore Precision | 0.8449 | |
| | BERTScore Recall | 0.8887 | |
| | BERTScore F1 | 0.8663 | |
|
|
| ## π§ͺ Test Cases |
|
|
| | Case | Symptoms | Urgency Level | |
| |------|----------|--------------| |
| | Case 1 | Fever, cough, chest pain | High β
| |
| | Case 2 | Stiff neck, fever, confusion | Emergency β
| |
| | Case 3 | Chest pain radiating to left arm, diabetes | Emergency β
| |
|
|
| ## β¨ Features |
|
|
| - β
Real-time PubMed literature search via NCBI API |
| - β
LLM-powered clinical reasoning (LLaMA 3.3 70B via Groq) |
| - β
Structured output: conditions, tests, treatments, urgency |
| - β
Multi-turn conversation memory |
| - β
BERTScore quality evaluation |
| - β
Interactive Gradio web interface |
|
|
| ## ποΈ Architecture |
|
|
| Patient Symptoms β Extract Search Query (LLM) β Search PubMed |
| (NCBI API) β Generate Recommendation (LLaMA 3.3 70B) β |
| Format Report β Gradio UI |
|
|
| ## π οΈ Tech Stack |
|
|
| | Component | Tool | |
| |-----------|------| |
| | Agent Orchestration | LangGraph | |
| | LLM | Groq β LLaMA 3.3 70B | |
| | Medical Literature | PubMed NCBI API | |
| | Evaluation | BERTScore | |
| | UI | Gradio | |
| | Platform | Kaggle T4 GPU | |
|
|
| ## π How to Run |
|
|
| 1. Get a free Groq API key at [console.groq.com](https://console.groq.com) |
| 2. Clone the Space and install requirements |
| 3. Set your Groq API key as environment variable |
| 4. Run `python app.py` |
|
|
| ## β οΈ Medical Disclaimer |
|
|
| This system is for educational and research purposes only. |
| It does not provide medical advice. Always consult a qualified |
| healthcare professional for medical decisions. |
|
|
| ## π Part of Medical AI Portfolio |
|
|
| 1. β
Pneumonia Detection (ViT + Grad-CAM) |
| 2. β
Clinical Decision Support Agent (LangGraph + RAG) β this project |
| 3. β
Medical LLM Fine-tuning (QLoRA) |
| 4. β
Medical Report Generator (Hallucination Detection + FHIR) |