AI-powered RAG assistant for querying Ethiopian Food and Drug Authority (EFDA) medical guidelines using natural language.
Built with LangChain, FAISS/BM25 hybrid retrieval, Groq LLMs, and Streamlit.
- Hybrid Retrieval (FAISS + BM25)
- Cross-Encoder Reranking
- Conversational Memory
- PDF Upload Support
- Summarization Mode
- Streamlit Interface
- Fast Responses with Groq API
- Context-Aware Answers from EFDA Guidelines
PDF Documents
↓
Document Chunking
↓
Embeddings + BM25 Indexing
↓
Hybrid Retrieval
↓
Cross-Encoder Reranking
↓
Groq LLM
↓
Context-Aware Response
| Category | Tools |
|---|---|
| Framework | LangChain |
| UI | Streamlit |
| LLM | Groq (Llama 3.3 70B) |
| Embeddings | Hugging Face all-MiniLM-L6-v2 |
| Retrieval | FAISS + BM25 |
| Reranker | cross-encoder/ms-marco-MiniLM-L-6-v2 |
| PDF Processing | PyPDF2 |
.
├── helpers/
│ ├── chain.py
│ ├── chunker.py
│ ├── pdfloader.py
│ ├── retriever.py
│ └── vectorstore.py
├── app.py
├── process_pdfs.py
├── requirements.txt
├── README.md
└── .envgit clone https://github.com/anaboset/Medical-RAG-Assistant.git
cd Medical-RAG-Assistantpython -m venv venvActivate the environment:
source venv/bin/activatevenv\Scripts\activatepip install -r requirements.txtCreate a .env file in the project root:
GROQ_API_KEY=your_groq_api_keyGet your API key from:
streamlit run app.pyTo create FAISS and BM25 indexes from your PDF documents:
python process_pdfs.pyThis generates:
chunks.pklchunks_faiss_store/chunks_bm25.pkl
- “What is the process for registering a new medicine in Ethiopia?”
- “What are the import regulations for pharmaceuticals?”
- “Summarize EFDA medicine registration guidelines.”
- PDF documents are loaded and chunked.
- Embeddings are generated using Hugging Face models.
- FAISS and BM25 indexes are created.
- Hybrid retrieval fetches relevant chunks.
- A cross-encoder reranks the results.
- Groq LLM generates a context-aware answer.
- Multilingual Support (Amharic)
- Knowledge Graph Integration
- Advanced Query Rewriting
- Real-Time Regulatory Updates
- Improved Retrieval Optimization
The application can be deployed easily using Streamlit Cloud.
- Push the repository to GitHub
- Connect the repository to Streamlit Cloud
- Add
GROQ_API_KEYin Streamlit secrets - Deploy
This project provides information from EFDA medical guidelines and should not be considered professional medical or legal advice.
Developed by:
- AI Engineer & Pharmacy Student
- Passionate about AI for Healthcare
MIT License
