--- 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 --- # ๐Ÿฅ Clinical Decision Support Agent ![Python](https://img.shields.io/badge/Python-3.10-blue) ![LLaMA](https://img.shields.io/badge/LLaMA-3.3%2070B-green) ![LangGraph](https://img.shields.io/badge/LangGraph-Agent-purple) ![HuggingFace](https://img.shields.io/badge/HuggingFace-Spaces-yellow) ## ๐ŸŽฏ 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 | Google Colab (CPU) | ## ๐Ÿš€ How to Run 1. Get a free Groq API key at [console.groq.com](https://console.groq.com) 2. Open `app.py` in Google Colab 3. Replace `your-groq-api-key-here` with your actual key 4. Run all cells in order ## โš ๏ธ 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. ## ๐Ÿ“Œ Project Status โœ… PubMed search tool complete โœ… LangGraph agent built โœ… Multi-turn memory working โœ… BERTScore evaluation done โœ… Gradio demo deployed on Hugging Face Spaces