<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Prabodh Kr</title>
    <description>The latest articles on DEV Community by Prabodh Kr (@prabodh_kr_7349ad383d53cf).</description>
    <link>https://dev.to/prabodh_kr_7349ad383d53cf</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1530579%2Fd5729bb9-c8bb-4d58-8cd7-594ef0b9b673.png</url>
      <title>DEV Community: Prabodh Kr</title>
      <link>https://dev.to/prabodh_kr_7349ad383d53cf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prabodh_kr_7349ad383d53cf"/>
    <language>en</language>
    <item>
      <title>📚 I Built an AI Study Buddy That Runs on Open-Weight AI</title>
      <dc:creator>Prabodh Kr</dc:creator>
      <pubDate>Sun, 04 Oct 2026 19:50:40 +0000</pubDate>
      <link>https://dev.to/prabodh_kr_7349ad383d53cf/i-built-an-ai-study-buddy-that-runs-on-open-weight-ai-8c9</link>
      <guid>https://dev.to/prabodh_kr_7349ad383d53cf/i-built-an-ai-study-buddy-that-runs-on-open-weight-ai-8c9</guid>
      <description>&lt;p&gt;What if your study notes could actually talk back to you?&lt;br&gt;
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.&lt;br&gt;
Instead of searching through hundreds of pages manually, you can upload your notes and simply ask:&lt;br&gt;
"What is deadlock and what are its necessary conditions?"&lt;/p&gt;

&lt;p&gt;or:&lt;br&gt;
"Who is Morrie and why did Mitch visit him every Tuesday?"&lt;/p&gt;

&lt;p&gt;Study Buddy searches your uploaded material and generates an answer based on the relevant sections of the document.&lt;br&gt;
🎯 Why I Built Study Buddy&lt;br&gt;
As students, we often have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📄 Large PDFs&lt;/li&gt;
&lt;li&gt;📚 Lecture notes&lt;/li&gt;
&lt;li&gt;📝 Reference books&lt;/li&gt;
&lt;li&gt;😵 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:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The application has two simple steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;li&gt;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?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Study Buddy searches the indexed document and retrieves the most relevant sections.&lt;br&gt;
🧠 How It Works&lt;br&gt;
The basic architecture looks like this:&lt;br&gt;
                 ┌──────────────────┐&lt;br&gt;
                 │    Study PDF     │&lt;br&gt;
                 └────────┬─────────┘&lt;br&gt;
                          ↓&lt;br&gt;
                 ┌──────────────────┐&lt;br&gt;
                 │  Text Extraction │&lt;br&gt;
                 │     (pypdf)      │&lt;br&gt;
                 └────────┬─────────┘&lt;br&gt;
                          ↓&lt;br&gt;
                 ┌──────────────────┐&lt;br&gt;
                 │ Text Chunking    │&lt;br&gt;
                 └────────┬─────────┘&lt;br&gt;
                          ↓&lt;br&gt;
                 ┌──────────────────┐&lt;br&gt;
                 │    Embeddings    │&lt;br&gt;
                 └────────┬─────────┘&lt;br&gt;
                          ↓&lt;br&gt;
                 ┌──────────────────┐&lt;br&gt;
                 │ Local Vector     │&lt;br&gt;
                 │ Store + NumPy    │&lt;br&gt;
                 └────────┬─────────┘&lt;br&gt;
                          ↓&lt;br&gt;
              User asks a question&lt;br&gt;
                          ↓&lt;br&gt;
                 ┌──────────────────┐&lt;br&gt;
                 │ Similarity Search│&lt;br&gt;
                 └────────┬─────────┘&lt;br&gt;
                          ↓&lt;br&gt;
                 Relevant document&lt;br&gt;
                     chunks retrieved&lt;br&gt;
                          ↓&lt;br&gt;
                 ┌──────────────────┐&lt;br&gt;
                 │       LLM        │&lt;br&gt;
                 │                  │&lt;br&gt;
                 │ Local: Ollama    │&lt;br&gt;
                 │ Cloud: Groq      │&lt;br&gt;
                 └────────┬─────────┘&lt;br&gt;
                          ↓&lt;br&gt;
                 ┌──────────────────┐&lt;br&gt;
                 │     Answer       │&lt;br&gt;
                 │ + Sources        │&lt;br&gt;
                 └──────────────────┘&lt;/p&gt;

&lt;p&gt;🔎 What is RAG?&lt;br&gt;
One of the biggest things I learned while building this project was RAG — Retrieval-Augmented Generation.&lt;br&gt;
Normally, if you ask an LLM:&lt;br&gt;
"What does my PDF say about Morrie's illness?"&lt;/p&gt;

&lt;p&gt;the model doesn't automatically know what's inside your PDF.&lt;br&gt;
RAG solves this by giving the model relevant information from your own documents.&lt;br&gt;
The process is roughly:&lt;br&gt;
Question&lt;br&gt;
   ↓&lt;br&gt;
Find relevant chunks&lt;br&gt;
   ↓&lt;br&gt;
Give those chunks to the LLM&lt;br&gt;
   ↓&lt;br&gt;
Generate an answer&lt;/p&gt;

&lt;p&gt;This makes the application much more useful for studying because the answer can be grounded in the uploaded material.&lt;br&gt;
🤖 Open-Weight AI&lt;br&gt;
One of the requirements of the Hacktoberfest challenge I chose was to have open-source/open-weight AI at the core of the project.&lt;br&gt;
For local usage, Study Buddy can use:&lt;br&gt;
Ollama + Llama 3.1 8B&lt;br&gt;
This means the model can run directly on your own computer instead of sending your study documents to a remote AI provider.&lt;br&gt;
That has some useful advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔒 Better privacy&lt;/li&gt;
&lt;li&gt;💻 Can work locally&lt;/li&gt;
&lt;li&gt;🌐 Doesn't require internet for local inference&lt;/li&gt;
&lt;li&gt;💰 No per-request API cost&lt;/li&gt;
&lt;li&gt;🔄 Models can be swapped&lt;/li&gt;
&lt;li&gt;🧪 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&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;DEPLOYED&lt;br&gt;
Vercel&lt;br&gt;
   ↓&lt;br&gt;
Groq API&lt;br&gt;
   ↓&lt;br&gt;
Open-weight LLM&lt;br&gt;
   ↓&lt;br&gt;
Study Buddy&lt;/p&gt;

&lt;p&gt;This gives me both a local/private mode and a web-deployed mode.&lt;br&gt;
🛠️ Tech Stack&lt;br&gt;
The project is intentionally lightweight.&lt;br&gt;
Backend&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🐍 Python&lt;/li&gt;
&lt;li&gt;⚡ FastAPI&lt;/li&gt;
&lt;li&gt;📄 pypdf&lt;/li&gt;
&lt;li&gt;🔢 NumPy&lt;/li&gt;
&lt;li&gt;🔐 python-dotenv
AI&lt;/li&gt;
&lt;li&gt;🦙 Llama 3.1 8B&lt;/li&gt;
&lt;li&gt;🦙 Ollama&lt;/li&gt;
&lt;li&gt;🤖 Groq&lt;/li&gt;
&lt;li&gt;🧠 Embeddings&lt;/li&gt;
&lt;li&gt;🔎 RAG
Storage
Instead of using a heavy vector database, I built a simple local vector store using:
JSON + NumPy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This keeps the project easy to understand and run.&lt;br&gt;
Frontend&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTML&lt;/li&gt;
&lt;li&gt;CSS&lt;/li&gt;
&lt;li&gt;JavaScript
Deployment&lt;/li&gt;
&lt;li&gt;GitHub&lt;/li&gt;
&lt;li&gt;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&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;⚙️ API Endpoints&lt;br&gt;
The backend is built with FastAPI.&lt;br&gt;
Some of the main endpoints are:&lt;br&gt;
POST /documents&lt;/p&gt;

&lt;p&gt;Upload and index a PDF.&lt;br&gt;
GET /documents&lt;/p&gt;

&lt;p&gt;View indexed documents.&lt;br&gt;
POST /chat&lt;/p&gt;

&lt;p&gt;Ask a question and retrieve an AI-generated answer with references.&lt;br&gt;
FastAPI also provides the usual interactive API documentation through:&lt;br&gt;
/docs&lt;/p&gt;

&lt;p&gt;💡 What I Learned&lt;br&gt;
This project was especially interesting because I didn't start with a deep understanding of RAG or embeddings.&lt;br&gt;
While building it, I had to understand how several different pieces fit together:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;li&gt;Vector similarity
Study Buddy uses vector similarity to determine which chunks are most relevant to the question.&lt;/li&gt;
&lt;li&gt;RAG
Instead of asking the LLM to answer blindly, I retrieve relevant information first and then provide it to the model.&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;li&gt;FastAPI
I also got more practical experience connecting AI functionality to a real backend API.&lt;/li&gt;
&lt;li&gt;Deployment
Getting the project from:
Local machine
  ↓
GitHub
  ↓
Vercel&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;was another learning experience by itself.&lt;br&gt;
🚧 Challenges I Faced&lt;br&gt;
The project wasn't completely smooth.&lt;br&gt;
One of the problems I encountered was the retirement of the Groq model I initially used:&lt;br&gt;
llama-3.1-8b-instant&lt;/p&gt;

&lt;p&gt;The API returned:&lt;br&gt;
model_not_found&lt;/p&gt;

&lt;p&gt;This forced me to understand the difference between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the model I want to run locally&lt;/li&gt;
&lt;li&gt;the model available through a cloud inference provider&lt;/li&gt;
&lt;li&gt;environment variables&lt;/li&gt;
&lt;li&gt;local .env configuration&lt;/li&gt;
&lt;li&gt;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:&lt;/li&gt;
&lt;li&gt;Personal notes&lt;/li&gt;
&lt;li&gt;College assignments&lt;/li&gt;
&lt;li&gt;Private study material&lt;/li&gt;
&lt;li&gt;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:&lt;/li&gt;
&lt;li&gt;📚 Multiple document collections&lt;/li&gt;
&lt;li&gt;🧠 Better retrieval&lt;/li&gt;
&lt;li&gt;💬 Conversation memory&lt;/li&gt;
&lt;li&gt;📖 Better citation handling&lt;/li&gt;
&lt;li&gt;🎤 Voice questions&lt;/li&gt;
&lt;li&gt;🔊 Voice answers&lt;/li&gt;
&lt;li&gt;👥 User accounts&lt;/li&gt;
&lt;li&gt;🗃️ PostgreSQL/vector database support&lt;/li&gt;
&lt;li&gt;📱 Better mobile UI&lt;/li&gt;
&lt;li&gt;📊 Study progress tracking&lt;/li&gt;
&lt;li&gt;📝 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.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🌱 Why Open Innovation Matters&lt;br&gt;
This project made me appreciate something important about open-weight AI.&lt;br&gt;
You don't always need access to an expensive proprietary AI system to build something useful.&lt;br&gt;
With open models, local inference tools, and open-source frameworks, developers can experiment, modify, learn, and build applications around their own needs.&lt;br&gt;
For students especially, that's powerful.&lt;br&gt;
You can take an idea from:&lt;br&gt;
"I wonder if this is possible..."&lt;/p&gt;

&lt;p&gt;to:&lt;br&gt;
"I built it."&lt;/p&gt;

&lt;p&gt;using tools that are accessible to you.&lt;br&gt;
🎉 Final Thoughts&lt;br&gt;
Study Buddy started as an idea for a Hacktoberfest challenge and became a practical way for me to learn about:&lt;br&gt;
FastAPI → RAG → Embeddings → Vector Search → LLMs → Ollama → Groq → Deployment&lt;br&gt;
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.&lt;br&gt;
And that's probably my biggest takeaway:&lt;br&gt;
You don't need to know everything before building. Sometimes building is how you learn.&lt;/p&gt;

&lt;p&gt;🔗 Project&lt;br&gt;
GitHub: &lt;a href="https://github.com/PrabodhKumar01/Study-Buddy" rel="noopener noreferrer"&gt;https://github.com/PrabodhKumar01/Study-Buddy&lt;/a&gt;&lt;br&gt;
Live Demo: &lt;a href="https://studybuddy-kohl-delta.vercel.app/" rel="noopener noreferrer"&gt;https://studybuddy-kohl-delta.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📸 Where to put your screenshot&lt;br&gt;
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.&lt;br&gt;
For the DEV post's cover image, I'd recommend making a separate 16:9 image with:&lt;br&gt;
Study Buddy&lt;br&gt;
Your AI-powered study companion&lt;br&gt;
📚 PDF → 🔎 RAG → 🤖 Open-Weight AI&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
