🩺 AI Health Guidance Assistant
An AI-powered health triage and guidance application built with Streamlit and the OpenAI API. It allows users to describe symptoms in natural language and receive contextual, safe, and general health guidance, simulating an initial patient intake process.
🚀 Tech Stack
- Frontend: Streamlit
- LLM: OpenAI API (GPT-3.5-turbo / GPT-4o)
- Security: Streamlit Secrets Management
🛠️ How to Run Locally
- Clone the repository:
git clone https://github.com/Kashika-17/AI-Health-Symptom-Checker.git
- Install dependencies:
pip install -r requirements.txt
- Create a
.streamlit/secrets.toml file and add your OpenAI API key: OPENAI_API_KEY = "sk-..."
- Run the app:
streamlit run streamlit_app.py
⚠️ Challenges & Solutions (Engineering Trade-offs)
During development, I identified and resolved two critical production risks:
- Safety & Hallucination Risk:
- Problem: The base model occasionally generated overly confident, specific medical diagnoses when given vague inputs.
- Solution: Implemented a strict system prompt with explicit negative constraints (forbidding definitive diagnoses). Lowered the
temperature to 0.3 to reduce creative hallucination, and enforced a mandatory medical disclaimer in the UI.
- API Fragility & Context Overflow:
- Problem: Network hiccups or rate limits caused the app to crash. Long conversations risked exceeding the token context window.
- Solution: Wrapped the API call in a
try/except block with a 15-second timeout to prevent hanging. Implemented a sliding window in st.session_state to only send the last 10 messages to the API, ensuring stable memory usage and graceful error messaging to the user.
📈 Future Ambitions
- Integrate a RAG (Retrieval-Augmented Generation) pipeline using ChromaDB and official medical guidelines (e.g., CDC/WHO PDFs) to ground responses in verified documents rather than base model weights.
- Add HIPAA-compliant data handling practices for production deployment.