What if your study notes could actually talk back to you?
For Hacktoberfest 2026, I decided to build something that solves a real problem for a friend: Study Buddy β a simple AI-powered study assistant that lets you upload your study PDFs and ask questions about them.
Instead of searching through hundreds of pages manually, you can upload your notes and simply ask:
"What is deadlock and what are its necessary conditions?"
or:
"Who is Morrie and why did Mitch visit him every Tuesday?"
Study Buddy searches your uploaded material and generates an answer based on the relevant sections of the document.
π― Why I Built Study Buddy
As students, we often have:
- π Large PDFs
- π Lecture notes
- π Reference books
- π΅ Too much information to search manually I wanted to build something simple: Upload β Ask β Get an answer from your own study material. The important part is that the AI isn't simply answering from general knowledge. It first searches the uploaded documents and uses the relevant content to generate the answer. That is where RAG (Retrieval-Augmented Generation) comes in. π₯οΈ What Study Buddy Looks Like Here's the current interface:
The application has two simple steps:
- Upload Study Materials You can upload a PDF containing your notes or study material. Study Buddy extracts the text, divides it into smaller chunks, generates embeddings, and stores those chunks locally. In my example, I uploaded: Tuesdays with Morrie and the application indexed 435 chunks from the document.
- Ask a Question You can then ask questions about the uploaded material. For example: Who is Morrie and why did he meet his teacher every Tuesday?
Study Buddy searches the indexed document and retrieves the most relevant sections.
π§ How It Works
The basic architecture looks like this:
ββββββββββββββββββββ
β Study PDF β
ββββββββββ¬ββββββββββ
β
ββββββββββββββββββββ
β Text Extraction β
β (pypdf) β
ββββββββββ¬ββββββββββ
β
ββββββββββββββββββββ
β Text Chunking β
ββββββββββ¬ββββββββββ
β
ββββββββββββββββββββ
β Embeddings β
ββββββββββ¬ββββββββββ
β
ββββββββββββββββββββ
β Local Vector β
β Store + NumPy β
ββββββββββ¬ββββββββββ
β
User asks a question
β
ββββββββββββββββββββ
β Similarity Searchβ
ββββββββββ¬ββββββββββ
β
Relevant document
chunks retrieved
β
ββββββββββββββββββββ
β LLM β
β β
β Local: Ollama β
β Cloud: Groq β
ββββββββββ¬ββββββββββ
β
ββββββββββββββββββββ
β Answer β
β + Sources β
ββββββββββββββββββββ
π What is RAG?
One of the biggest things I learned while building this project was RAG β Retrieval-Augmented Generation.
Normally, if you ask an LLM:
"What does my PDF say about Morrie's illness?"
the model doesn't automatically know what's inside your PDF.
RAG solves this by giving the model relevant information from your own documents.
The process is roughly:
Question
β
Find relevant chunks
β
Give those chunks to the LLM
β
Generate an answer
This makes the application much more useful for studying because the answer can be grounded in the uploaded material.
π€ Open-Weight AI
One of the requirements of the Hacktoberfest challenge I chose was to have open-source/open-weight AI at the core of the project.
For local usage, Study Buddy can use:
Ollama + Llama 3.1 8B
This means the model can run directly on your own computer instead of sending your study documents to a remote AI provider.
That has some useful advantages:
- π Better privacy
- π» Can work locally
- π Doesn't require internet for local inference
- π° No per-request API cost
- π Models can be swapped
- π§ͺ Easier experimentation with open-weight models For the deployed Vercel version, I use cloud inference through Groq because Vercel's serverless environment cannot simply run my local Ollama installation. So the architecture becomes: LOCAL Ollama β Llama 3.1 8B β Study Buddy
DEPLOYED
Vercel
β
Groq API
β
Open-weight LLM
β
Study Buddy
This gives me both a local/private mode and a web-deployed mode.
π οΈ Tech Stack
The project is intentionally lightweight.
Backend
- π Python
- β‘ FastAPI
- π pypdf
- π’ NumPy
- π python-dotenv AI
- π¦ Llama 3.1 8B
- π¦ Ollama
- π€ Groq
- π§ Embeddings
- π RAG Storage Instead of using a heavy vector database, I built a simple local vector store using: JSON + NumPy
This keeps the project easy to understand and run.
Frontend
- HTML
- CSS
- JavaScript Deployment
- GitHub
- Vercel ποΈ Project Structure The project currently looks like this: study-buddy/ β βββ api/ β βββ index.py β βββ app/ β βββ main.py β β β βββ routes/ β β βββ documents.py β β βββ chat.py β β β βββ services/ β β βββ llm.py β β βββ embeddings.py β β βββ vector_store.py β β βββ rag.py β β β βββ static/ β β βββ index.html β β β βββ utils/ β βββ pdf_loader.py β βββ data/ β βββ vector_store.json β βββ documents/ β βββ tests/ β βββ test_main.py β βββ requirements.txt βββ README.md βββ .env βββ run.bat βββ run.sh
βοΈ API Endpoints
The backend is built with FastAPI.
Some of the main endpoints are:
POST /documents
Upload and index a PDF.
GET /documents
View indexed documents.
POST /chat
Ask a question and retrieve an AI-generated answer with references.
FastAPI also provides the usual interactive API documentation through:
/docs
π‘ What I Learned
This project was especially interesting because I didn't start with a deep understanding of RAG or embeddings.
While building it, I had to understand how several different pieces fit together:
- Embeddings Text can be converted into numerical vectors that capture semantic meaning. That allows the application to compare a user's question with document chunks.
- Vector similarity Study Buddy uses vector similarity to determine which chunks are most relevant to the question.
- RAG Instead of asking the LLM to answer blindly, I retrieve relevant information first and then provide it to the model.
- Local LLMs Running an open-weight model locally with Ollama showed me that AI applications don't necessarily have to depend entirely on cloud APIs.
- FastAPI I also got more practical experience connecting AI functionality to a real backend API.
- Deployment Getting the project from: Local machine β GitHub β Vercel
was another learning experience by itself.
π§ Challenges I Faced
The project wasn't completely smooth.
One of the problems I encountered was the retirement of the Groq model I initially used:
llama-3.1-8b-instant
The API returned:
model_not_found
This forced me to understand the difference between:
- the model I want to run locally
- the model available through a cloud inference provider
- environment variables
- local .env configuration
- Vercel environment variables It also taught me that deployment isn't simply "push code and you're done." There are infrastructure, environment, API, and configuration issues that have to be handled separately. π Privacy Matters One of the main reasons I wanted local AI support was privacy. Imagine uploading:
- Personal notes
- College assignments
- Private study material
- Class documents to an external service. With local inference, the model can run on your own machine. Your documents don't need to leave your computer simply because you want to ask questions about them. That's one of the things I find most interesting about open-weight AI. π What's Next? Study Buddy is still an MVP. Some things I'd like to add in the future:
- π Multiple document collections
- π§ Better retrieval
- π¬ Conversation memory
- π Better citation handling
- π€ Voice questions
- π Voice answers
- π₯ User accounts
- ποΈ PostgreSQL/vector database support
- π± Better mobile UI
- π Study progress tracking
- π Automatic quizzes from uploaded notes I'd also like to experiment with different open-weight models and compare their performance on educational tasks. β€οΈ Built for a Friend The challenge wasn't just about building an AI application. The idea was to build something that could actually be useful to another person. A student shouldn't have to manually search through hundreds of pages every time they have a question. That's the problem Study Buddy is trying to solve: Turn your study material into something you can have a conversation with.
π± Why Open Innovation Matters
This project made me appreciate something important about open-weight AI.
You don't always need access to an expensive proprietary AI system to build something useful.
With open models, local inference tools, and open-source frameworks, developers can experiment, modify, learn, and build applications around their own needs.
For students especially, that's powerful.
You can take an idea from:
"I wonder if this is possible..."
to:
"I built it."
using tools that are accessible to you.
π Final Thoughts
Study Buddy started as an idea for a Hacktoberfest challenge and became a practical way for me to learn about:
FastAPI β RAG β Embeddings β Vector Search β LLMs β Ollama β Groq β Deployment
I still have a lot to learn about AI systems, but building this project gave me a much better understanding of how the individual pieces fit together.
And that's probably my biggest takeaway:
You don't need to know everything before building. Sometimes building is how you learn.
π Project
GitHub: https://github.com/PrabodhKumar01/Study-Buddy
Live Demo: https://studybuddy-kohl-delta.vercel.app/
πΈ Where to put your screenshot
For the image you uploaded, I'd place it immediately after the "What Study Buddy Looks Like" heading. It gives readers an instant visual understanding of the project before they read the technical details.
For the DEV post's cover image, I'd recommend making a separate 16:9 image with:
Study Buddy
Your AI-powered study companion
π PDF β π RAG β π€ Open-Weight AI
Top comments (0)