An AI-powered chatbot serving as a personal guide for wellness and productivity. This project showcases practical application of the Gemini API, effective prompt engineering, a local vector database for knowledge retrieval, and a well-structured Retrieval-Augmented Generation (RAG) pipeline.
- 🤖 AI-powered wellbeing and productivity coaching
- 📚 Knowledge base with wellness and productivity content
- 🔍 Semantic search using FAISS vector database
- 👤 User profile and personalization
- 💬 Natural conversation interface
- 🎯 Domain-specific responses
- Clone the repository:
git clone <repository-url>
cd PeakMindWellbeingCoach- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
Create a
.envfile in the project root and add your Google API key:
GOOGLE_API_KEY=your_api_key_here
- Start the Streamlit app:
streamlit run WellbeingCoachApp.py- Open your browser and navigate to the URL shown in the terminal (typically http://localhost:8501)
WellbeingCoachApp.py: Main application fileknowledge_base.py: Knowledge base content and managementvector_db.py: Vector database managementrequirements.txt: Project dependencies.env: Environment variables (create this file)
The application implements a Retrieval-Augmented Generation (RAG) pipeline:
-
User Query Input
- User submits a question through the chat interface
-
Query Preprocessing
- Question is analyzed for user profile updates
- Semantic search query is prepared
-
Information Retrieval
- Vector database is searched for relevant content
- Top-k most similar documents are retrieved
-
Augmented Prompt Construction
- Retrieved context is combined with system prompt
- User profile information is included
- Question is formatted for the model
-
LLM Call
- Gemini Pro model generates response
- Response is contextualized with retrieved information
-
Response Post-processing
- Response is formatted for display
- User profile is updated
- Interaction is logged
The knowledge base includes information about:
- Productivity techniques (Pomodoro, time blocking)
- Mindfulness and meditation
- Stress management
- Work-life balance
- Personal development
- The chatbot is designed to provide general wellness and productivity advice only
- It is not a replacement for professional medical or mental health services
- Users are advised to consult qualified professionals for serious concerns
- The system includes appropriate disclaimers and redirections
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.