In response to the escalating challenges of stress-related disorders and chronic health conditions, there is a growing demand for comprehensive wellness solutions merging traditional practices with modern technology. This project presents an innovative approach that combines ancient Ayurvedic wisdom with cutting-edge AI technologies, particularly chatbots built upon Large Language Models (LLMs), essentially developing a conversational health assistant.
The project encompasses fine-tuning LLM models that work by retrieving data from Ayurvedic texts, developing an intuitive conversational assistant, and analyzing users' psychosomatic constitution (Prakruti) to offer personalized health recommendations aligned with Ayurvedic principles. Through a systematic literature survey, the project explores various methodologies and applications related to LLMs and their integration with different domains, emphasizing responsible development and continued research. The proposed architecture lays out the essential components such as the Prakruti Analyzer for personalized assessment and a Chatbot for natural language interactions, supported by advanced embedding models and storage mechanisms. Through a systematic approach, the project strives to create a user-friendly platform for holistic health management, merging Ayurvedic knowledge with state-of-the-art AI technology.
Clone the repository:
git clone https://github.com/anubhav811/Capstone-Project-20BIT0104.git
Navigate to the backend directory: In the root directory, run
cd backend
Install dependencies:
pip install -r requirements.txt
Create a .env
file and add the following:
HUGGINGFACEHUB_API_TOKEN = "YOUR_API_KEY"
OPENAI_API_KEY="YOUR_API_KEY"
Run the backend server:
chainlit run model.py -h
The backend server will run on localhost:8000.
Navigate to the frontend directory: In the root directory, run
cd frontend
Install dependencies:
npm install
Run the frontend development server:
npm run dev
Once both the backend and frontend are running, users can navigate to the chatbot section on the website and start asking queries.
Users can also utilize the Prakruti Analyzer to find out their Prakruti.
Upon testing four models:
mistralai/Mistral-7B-Instruct-v0.2
HuggingFaceH4/zephyr-7b-beta
google/gemma-7b
gpt-3.5-turbo-16k
The results were as follows:
In the realm of Ayurvedic queries, where accuracy, relevance, and fidelity to context are paramount, the Mistral model emerges as the most suitable choice. With its exemplary faithfulness score of 0.8611, Mistral ensures that generated answers align closely with the provided context, thereby preserving the accuracy of traditional Ayurvedic knowledge. While other models excel in specific aspects such as answer relevancy (Gemma) or answer correctness (GPT), Mistral strikes a balance by offering a robust performance across all essential metrics, making it the optimal choice for addressing inquiries in Ayurveda with precision and reliability.
This project, "AI-Driven Ayurvedic Advisor: A Conversational Chatbot," was developed as the capstone project by Anubhav Chachra (Reg. No 20BIT0104) for VIT Vellore.
Project report: Link
Feel free to contact Anubhav Chachra for any inquiries or collaborations related to this project.