Skip to content

Harshit-it25/VitaAi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🩺 VitaAI – AI Health Chatbot

Symptom-based disease prediction powered by DistilBERT embeddings, Logistic Regression, and a conversational RAG pipeline.


✨ Features

  • πŸ”¬ Top-3 Disease Prediction β€” Enter symptoms in plain English and get the top 3 most likely conditions with confidence scores
  • 🧠 DistilBERT Embeddings β€” Semantic understanding of symptoms using a pre-trained transformer model
  • πŸ“š RAG Pipeline β€” Retrieval-Augmented Generation for medical knowledge retrieval
  • πŸ—‚οΈ Intent Classification β€” Understands user intent before answering
  • πŸ’¬ React Web App β€” Full-stack React + Express interface for a smooth chat experience
  • πŸ—ƒοΈ SQLite Storage β€” Lightweight local chat history via better-sqlite3

πŸ–ΌοΈ Demo

Symptom Input Predicted Diseases
fever, cough, sore throat, body pain, fatigue Flu, COVID-19, Asthma
frequent urination, increased thirst, fatigue Diabetes, Anemia, Hypertension
severe headache, nausea, vomiting Migraine, Hypertension, Food Poisoning

⚠️ Disclaimer: VitaAI is for educational purposes only. It is not a substitute for professional medical advice, diagnosis, or treatment.


πŸ› οΈ Tech Stack

Tool Purpose
React 19 + Vite Frontend SPA
Express API server
LangChain + Google Gemini RAG & intent classification
transformers (DistilBERT) Sentence embeddings
scikit-learn Logistic Regression classifier
better-sqlite3 Chat history storage
Tailwind CSS Styling

πŸ“ Project Structure

vitaai/
β”œβ”€β”€ server.ts           # Express + Vite server entry point
β”œβ”€β”€ server/
β”‚   └── routes.ts       # API routes (RAG, chat, intent classification)
β”œβ”€β”€ src/                # React frontend
β”œβ”€β”€ index.html          # HTML entry point
β”œβ”€β”€ FAQ.csv             # Symptom-disease training dataset
β”œβ”€β”€ package.json        # Node dependencies
β”œβ”€β”€ vite.config.ts      # Vite configuration
└── tsconfig.json       # TypeScript config

🧩 How It Works

User enters symptoms
        β”‚
        β–Ό
DistilBERT encodes symptoms β†’ sentence embedding
        β”‚
        β–Ό
Logistic Regression classifies embedding
        β”‚
        β–Ό
Top-3 diseases returned with confidence scores
        β”‚
        β–Ό
LangChain RAG retrieves medical context
        β”‚
        β–Ό
Gemini generates a natural-language response

πŸ“Š Dataset

The model is trained on FAQ.csv, a curated dataset of symptom–disease pairs covering conditions including:

  • Flu, COVID-19, Asthma
  • Diabetes, Hypertension, Heart Disease
  • Migraine, Anemia, Kidney Stone
  • Food Poisoning, and more

🀝 Contributing

Contributions, issues, and feature requests are welcome!

  1. Fork the repo
  2. Create a branch: git checkout -b feature/your-feature
  3. Commit: git commit -m "Add your feature"
  4. Push: git push origin feature/your-feature
  5. Open a Pull Request

πŸ‘€ Author

Harshit Ranbhare


πŸ“„ License

This project is open source and available under the MIT License.

About

🩺 AI-powered health chatbot with symptom-based disease prediction, RAG pipeline, and intent classification using Google Gemini + LangChain.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors