This is an AI-powered study assistant that helps users extract insights from uploaded PDF documents using Retrieval-Augmented Generation (RAG). The assistant enables users to upload educational materials, research papers, or notes in a PDF format and then interact with a chatbot to ask context-aware questions about the content. The chatbot optimizes response retrieval using the Multi-Query RAG strategy, ensuring more relevant and accurate answers.
- Document Understanding – Users can upload PDFs, which are processed and converted into structured embeddings for easy retrieval.
- Efficient Information Retrieval – The system uses Multi-Query RAG Optimization for better response retrieval.
- Conversational AI – A chatbot interface built with Streamlit allows seamless Q&A interactions with the document’s content.
- Dynamic Vector Store Management – Implements real-time vector store updates, ensuring context-specific answers without old data interference.
- Backend: Python, LangChain
- Vectorstore: ChromaDB
- Frontend: Streamlit
- AI Model: OpenAI
Follow the steps below to install dependencies and run the chatbot.
Make sure you have the following installed on your system:
- Python 3.x
- Pip (Python package manager)
- Git (optional, for version control)
-
Clone the repository:
git clone https://github.com/nishthapant/ai-study-buddy cd ai-study-buddy
-
Create and activate a virtual environment Create venv
python3 -m venv venv
Activate venv
source venv/bin/activate
-
Create environment variables
- Open your project folder.
- Create a new file and name it .env (without any extension).
- Add the following key-value pairs inside the file like this:
For a more detailed explanation visit this page.
LANGSMITH_ENDPOINT="<your-langsmith-endpoint>" LANGSMITH_API_KEY="<your-langsmith-api-key>" OPENAI_API_KEY="<your-openai-api-key>" LANGSMITH_PROJECT="<project-name>"
- Add ".env" to your
.gitignore
file.
-
Install dependencies: Run the following command to install all necessary dependencies:
python3 install.py
After installing dependencies, start the chatbot by running:
bash streamlit run app.py
The chatbot will run on localhost:8501
- When the browser window opens, you are asked to upload a pdf file.
- Once you have uploaded a file, you can use the text input field at the bottom to ask questions to the chatbot about the content of the file uploaded.
This AI Study Assistant bridges the gap between unstructured documents and actionable insights, making it an essential tool for education, corporate learning, research, and productivity. Its scalable, adaptable architecture makes it a valuable project for AI, NLP, and software engineering roles.
Here are some key use cases:
- Personalized Study Assistant: Students can upload textbooks, research papers, or notes and ask questions to quickly understand complex concepts.
- Exam Preparation: Helps students summarize and review study materials efficiently, reducing time spent searching for information.
- Tutoring Support: Acts as an AI tutor for learners who need explanations or insights from specific learning materials.
- Employee Training & Onboarding: Employees can upload company handbooks or training materials and get instant answers to work-related queries.
- Compliance & Policy Assistance: Businesses can use it to help employees navigate company policies, HR guidelines, or legal compliance documents.
- Legal Document Analysis: Lawyers and legal researchers can quickly extract relevant information from contracts, case laws, and regulatory documents.
- Academic Research: Researchers can upload scientific papers or reports and use the assistant to summarize findings and identify key points.
- Meeting & Report Summarization: Professionals can upload long business reports or meeting transcripts and extract key takeaways instantly.
- Customer Support Knowledge Base: Companies can integrate the assistant with FAQs or support documentation to help customers and employees get relevant information quickly.
- AI Chatbot for Document-Based Queries: Can be adapted as a chatbot in enterprise solutions where employees or users need to retrieve information from large document repositories.
- RAG-Powered Search for Websites : The system can be used as an intelligent document retrieval tool for company portals or knowledge bases.
-
Extend support beyond PDFs to Word documents (.docx), PowerPoint (.pptx), plain text files, media like websites and images of scanned documents, etc.
-
Cloud Integration Deploy the app on AWS, GCP, or Azure for better sc lability and performance.
-
Voice Input & Text-to-Speech Allow users to speak their questions and hear AI-generated responses Mobile-Friendly Design Optimize the Streamlit UI for mobile users, making it more accessible.
-
Auto-Generated Flashcards & Notes Create AI-generated flashcards from uploaded documents to help with study sessions.