LLM & RAG · 2026
General Health Query Chatbot
LLM chatbot (Mistral-7B-Instruct via Hugging Face Inference API) with prompt engineering and safety filters that give non-diagnostic health guidance and block prescription or emergency queries. Real-time token streaming and session chat history in Streamlit.
Model
- Base: Mistral-7B-Instruct via the Hugging Face Inference API
- Prompting: role-constrained system prompt — general wellness guidance only, never a diagnosis
- Safety filters: blocklists + intent checks that refuse prescription, dosage and emergency queries
- Streaming: token-level streaming rendered live in the chat UI
Dataset
No fine-tuning — behavior comes from prompt engineering and rule-based safety filters over curated refusal categories.
Results & metrics
- Streaming
- real-time token output
- Safety
- prescription & emergency queries blocked
- Memory
- per-session chat history
Deployment steps
- 1Wrap the Hugging Face Inference API call behind a prompt + filter layer
- 2Build the Streamlit chat UI with session state for history
- 3Deploy to Streamlit Cloud (secrets managed in the dashboard)
Tech stack
- Mistral-7B
- Hugging Face
- Prompt engineering
- Streamlit