A document-grounded AI study companion that helps students learn from their own notes, test their understanding, and discover what they need to revise.
Built for the Hacktoberfest 2026 DEV Weekend Challenge β βBuild for a Friend.β
I started this project with a simple question:
What could I build that would actually make studying easier for someone I know?
One problem kept coming up: having notes isn't the same as knowing what you actually understand.
A student can read a PDF, revise a chapter, and still not know:
A generic chatbot could answer questions, but I wanted something more personal.
Something that could work with the student's own study material and then help them test themselves.
That's how FriendMind started.
FriendMind is a local-first AI study companion that turns a student's PDFs into an interactive learning workflow.
Upload Notes
β
Index & Embed
β
Semantic Search
β
Ask Questions
β
Generate Quiz
β
Evaluate Answers
β
Find Weak Topics
Instead of simply chatting with an AI, the student can study from their own material, test their understanding, and identify what needs more revision.
One of the main ideas behind FriendMind is document-grounded question answering.
When a student asks a question, FriendMind doesn't simply send that question to an LLM.
It first searches the student's uploaded material for relevant information.
The simplified flow is:
Student Question
β
Semantic Search
β
Relevant Note Chunks
β
Retrieved Context
β
Gemma 3
β
Grounded Answer
This allows the assistant to answer questions based on the material the student is actually studying.
After studying, the student can generate a quiz from their uploaded material.
They can choose:
But generating questions was only half of the problem.
I also wanted FriendMind to evaluate answers in a way that reflects understanding, rather than simply matching exact words.
That led to one of the most important parts of the project.
Consider these two answers:
Expected answer:
Binary search has logarithmic time complexity.
Student answer:
Binary search runs in O(log n).
The wording is different, but the concept is the same.
A strict text comparison could fail to recognize that.
FriendMind therefore uses semantic similarity to evaluate natural-language answers.
The goal is to ask:
βDoes the student's answer communicate the expected concept?β
rather than:
βDid the student use exactly the same words?β
This makes the quiz evaluation more flexible for natural student responses.
FriendMind doesn't stop at marking an answer right or wrong.
It can use incorrect answers to identify areas where the student may need more revision.
The learning loop becomes:
Study
β
Ask Questions
β
Take Quiz
β
Evaluate Understanding
β
Identify Weak Topics
β
Revise
β
Try Again
The idea is simple:
Don't just tell the student what they got wrong. Help them understand what to work on next.
Open-source AI isn't just a technology choice in this project.
It directly affects privacy and control.
FriendMind uses Gemma 3, an open-weight model, through Ollama for local inference.
The core architecture is:
Student PDF
β
Local Processing
β
Local Embeddings
β
ChromaDB
β
Semantic Retrieval
β
Ollama
β
Gemma 3
β
Answer / Quiz
A student's study material can contain lecture notes, assignments, personal notes, and exam preparation material.
I didn't want the core workflow to require sending all of that material to a closed cloud AI service.
With the local-first approach, the core AI workflow can run on the student's own computer.
It also gives the project more control over the model layer: the application isn't permanently tied to a single hosted AI API.
For a tool designed around personal study material, privacy, ownership, and control matter.
The architecture is intentionally straightforward:
βββββββββββββββββββ
β FriendMind UI β
β HTML/CSS/JS β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββ
β FastAPI β
β app.py β
ββββββββββ¬βββββββββ
β
βββββββββββββββββΌββββββββββββββββ
βΌ βΌ βΌ
PDF Processing RAG Engine Quiz Engine
β β
βΌ βΌ
Sentence Transformers
β
βΌ
ChromaDB
β
βΌ
Ollama
β
βΌ
Gemma 3
Backend: Python, FastAPI, Uvicorn
AI/ML: Sentence Transformers, RAG, Semantic Similarity
LLM: Ollama, Gemma 3
Vector Database: ChromaDB
Document Processing: pypdf
Frontend: HTML, CSS, Vanilla JavaScript
Development: Git, GitHub, VS Code, PowerShell
FriendMind currently runs locally using Ollama and Gemma 3.
The demo shows the complete workflow:
Upload PDF β Ask a question β Generate quiz β Answer β Semantic evaluation β Weak-topic detection
https://www.youtube.com/watch?v=pd66-1qTa40
The screen recording demonstrates the actual working application rather than a mockup.
The repository contains screenshots of the working application in docs/screenshots/.
Show the FriendMind PDF upload interface here.
Show a grounded question and response here.
Show the generated quiz here.
Show semantic evaluation and weak-topic results here.
FriendMind follows a local-first approach:
PDF
β
Your Computer
β
ChromaDB
β
Local Embeddings
β
Ollama / Gemma 3
The core AI workflow can run locally without requiring study material to be sent to a cloud LLM provider.
Building FriendMind taught me that building an AI application isn't just about connecting an LLM to a frontend.
The interesting problems appeared around the model:
The semantic verification layer was particularly interesting.
It changed the problem from:
βAre these two strings similar?β
to:
βDo these two answers express the same concept?β
That distinction becomes especially important when AI is being used for learning.
FriendMind is still a starting point.
Some improvements I'd like to explore are:
For this challenge, however, I wanted to keep the scope focused on solving one real problem.
I didn't start with:
βWhat AI application can I build?β
I started with:
βWhat could actually make studying easier for someone I know?β
That changed the direction of the project.
Instead of building another general-purpose chatbot, I built something around a student's actual workflow:
their notes β their questions β their quiz β their mistakes β their revision.
That's what Build for a Friend meant to me.
The complete source code is available on GitHub:
sanchalitorpe13/FriendMind
The repository contains the application source code, setup instructions, architecture, and screenshots.
FriendMind is my submission for the Hacktoberfest 2026 DEV Weekend Challenge β Build for a Friend.
Thanks for reading. π
Best Use of Gemma
FriendMind uses Gemma 3 as its local AI model through Ollama.