cd /news/ai-tools/i-built-friendmind-a-private-ai-stud… Β· home β€Ί topics β€Ί ai-tools β€Ί article
[ARTICLE Β· art-144459] src=dev.to β†— pub= topic=ai-tools verified=true sentiment=↑ positive

I Built FriendMind: A Private AI Study Companion for a Friend

A developer built FriendMind, a local-first AI study companion that turns a student's own PDFs into an interactive learning workflow, for the Hacktoberfest 2026 DEV Weekend Challenge. The tool indexes and embeds notes into ChromaDB, performs semantic retrieval to ground answers with Gemma 3 via Ollama, generates quizzes, and uses semantic similarity rather than exact text matching to evaluate natural-language answers and flag weak topics for revision. The developer chose open-weight local inference so personal study material never has to be sent to a closed cloud AI service.

by read5 min views1 publishedOct 3, 2026

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.

── more in #ai-tools 4 stories Β· sorted by recency
── more on @friendmind 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/i-built-friendmind-a…] indexed:0 read:5min 2026-10-03 Β· β€”