Medquery-assistant is an intelligent, context-aware medical chatbot that enables users to interact naturally and get accurate, helpful medical responses. It uses the power of advanced language models (LLMs) to maintain conversation context and respond to both follow-up and fresh queries with precision.
- 💬 Conversational Interface: Clean and intuitive chat UI built with HTML, CSS, and JavaScript.
- 🧠 Context-Aware Responses: Maintains and utilizes conversation history using a nested query mechanism.
- 🔄 Nested Query Handling: Enables follow-up questions to be answered with relevant context.
- ⚡ Dual-Model Architecture:
- Meta LLaMA 3.3 70B – Powers nested queries with contextual understanding.
- Gemini 2.5 Flash – Generates high-quality model responses in real-time.
- 🔐 Secure & Efficient Backend: Python-based backend for managing chat flow, model integration, and context management.
| Layer | Technology |
|---|---|
| Frontend | HTML, CSS, JavaScript |
| Backend | FastAPI (Python) – handles API routes and server logic efficiently |
| LLMs | LLaMA 3.3 70B, Gemini 2.5 Flash |
| Chat Logic | Custom context + nested query engine |
- User initiates a conversation through the chat UI.
- The system checks if the input is a new question or a follow-up.
- For follow-ups, the backend retrieves the relevant conversation context.
- LLaMA 3.3 70B handles the nested query resolution using conversation history.
- The refined prompt is passed to Gemini 2.5 Flash to generate the final response.
- The response is rendered on the frontend in real time.
- Clone the repository:
git clone https://github.com/meghana-choudhary/Medquery-assistant.git
cd Medquery-assistant- Install Dependencies:
pip install -r requirements.txt-
Create Environment File: Create a file named .env in the root directory of the project.
-
Add API Keys: Open the .env file and add your API keys like this:
GROQ_API_KEY=YOUR_GROQ_API_KEY
GOOGLE_API_KEY=YOUR_GOOGLE_API_KEY- Run the Backend:
python app.py👤: What are the symptoms of diabetes?
🤖: Common symptoms include frequent urination, increased thirst, and unexplained weight loss.
👤: And what about for children?
🤖: In children, symptoms may also include irritability, fatigue, and blurred vision...