this Assistant is an intelligent medical chatbot powered by LangGraph, integrated with a customized database of over 6,000 scraped Algerian medications and seamlessly connected to the Nedrex API to deliver accurate, updated medical information
# 🩺 Medical Agentic RAG Assistant
> An intelligent multilingual medical assistant built with **LangGraph**, **LangChain**, **RAG**, and **NeDRex** that dynamically selects the appropriate reasoning pipeline to answer pharmaceutical and biomedical questions.
---
## 🚀 Overview
Medical Agentic RAG Assistant is an **agentic Retrieval-Augmented Generation (RAG)** system capable of answering medical and pharmaceutical questions by intelligently combining multiple knowledge sources.
Unlike traditional RAG systems that always search the same database, this assistant **reasons about the user's request first**, decides which tools are needed, retrieves information from the appropriate sources, synthesizes the results, and validates the final response before returning it.
The assistant supports **French and English**, allowing French queries while using English-based biomedical APIs internally.
---
# ✨ Features
- 🌍 French → English query translation
- 🤖 Agentic workflow powered by LangGraph
- 🧠 Intelligent routing between multiple tools
- 💊 Pharmaceutical database retrieval
- 🧬 Integration with the NeDRex biomedical knowledge graph
- 📚 Retrieval-Augmented Generation (RAG)
- 🔍 Automatic answer validation (Judge Agent)
- 💬 Chitchat support
- ⚡ Modular and extensible architecture
---
# 🏗️ Architecture
The application is built as a LangGraph workflow where every node performs a specialized task.
```mermaid
graph TD
START([START])
TRANSLATE["Translate French → English"]
ROUTER["Router Determine Tool"]
DB_TOOLS["Database Tools"]
NEDREX["NeDRex API"]
SYNTHESIZE["Answer Synthesizer"]
JUDGE["Judge Agent"]
CHAT["Chitchat"]
END([END])
START --> TRANSLATE
TRANSLATE --> ROUTER
ROUTER -->|Database| DB_TOOLS
ROUTER -->|NeDRex| NEDREX
ROUTER -->|Both| DB_TOOLS
ROUTER -->|Chitchat| CHAT
DB_TOOLS -->|Both| NEDREX
DB_TOOLS --> SYNTHESIZE
NEDREX --> SYNTHESIZE
SYNTHESIZE --> JUDGE
JUDGE --> E …