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. 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 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.