The Study Assistant is an intelligent query routing system designed to assist students in their studies. It uses Retrieval Augmented Generation (RAG) techniques to provide accurate and contextually appropriate responses to queries across multiple subjects.
- Query classification into specific subjects or general knowledge
- Document retrieval from subject-specific transcripts
- Response generation using the Gemini AI model
- Clear indication of information source (retrieved document or general knowledge)
study_assistant/
├── main.py
├── config.py
├── setup.py
├── embedding.py
├── indexing.py
├── classification.py
├── retrieval.py
├── response_generation.py
├── utils.py
├── requirements.txt
└── study_helper_data/
├── ML/
│ └── script.txt
├── DSA/
│ └── script.txt
└── WebDev/
└── script.txt
-
Clone the repository:
git clone https://github.com/harsh-kumar-patwa/study_assistant.git cd study-assistant -
Create a virtual environment:
python -m venv venv source venv/bin/activate -
Install the required packages:
pip install -r requirements.txt -
Set up your Gemini API key:
- Open
config.py - Replace
"YOUR_GEMINI_API_KEY"with your actual Gemini API key
- Open
-
Prepare your study materials:
- Place your subject transcripts in the appropriate directories under
data/
- Place your subject transcripts in the appropriate directories under
Run the main script:
python main.py
Follow the prompts to enter your queries. Type 'exit' to quit the program.
- "What is CSS used for in web development?"
- "Explain the concept of neural networks in machine learning."
- "How does bubble sort work?"
If you encounter any issues:
- Check that your Gemini API key is set correctly in
config.py. - Ensure all transcript files are present and named correctly.
- Verify that all required packages are installed.
- Check the console output for any error messages.