{"slug": "i-built-friendmind-a-private-ai-study-companion-for-a-friend", "title": "I Built FriendMind: A Private AI Study Companion for a Friend", "summary": "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.", "body_md": "A document-grounded AI study companion that helps students learn from their own notes, test their understanding, and discover what they need to revise.\n\nBuilt for the **Hacktoberfest 2026 DEV Weekend Challenge — “Build for a Friend.”**\n\nI started this project with a simple question:\n\n**What could I build that would actually make studying easier for someone I know?**\n\nOne problem kept coming up: having notes isn't the same as knowing what you actually understand.\n\nA student can read a PDF, revise a chapter, and still not know:\n\nA generic chatbot could answer questions, but I wanted something more personal.\n\nSomething that could **work with the student's own study material** and then help them test themselves.\n\nThat's how **FriendMind** started.\n\nFriendMind is a **local-first AI study companion** that turns a student's PDFs into an interactive learning workflow.\n\n```\nUpload Notes\n     ↓\nIndex & Embed\n     ↓\nSemantic Search\n     ↓\nAsk Questions\n     ↓\nGenerate Quiz\n     ↓\nEvaluate Answers\n     ↓\nFind Weak Topics\n```\n\nInstead of simply chatting with an AI, the student can study from their own material, test their understanding, and identify what needs more revision.\n\nOne of the main ideas behind FriendMind is **document-grounded question answering**.\n\nWhen a student asks a question, FriendMind doesn't simply send that question to an LLM.\n\nIt first searches the student's uploaded material for relevant information.\n\nThe simplified flow is:\n\n```\nStudent Question\n       ↓\nSemantic Search\n       ↓\nRelevant Note Chunks\n       ↓\nRetrieved Context\n       ↓\nGemma 3\n       ↓\nGrounded Answer\n```\n\nThis allows the assistant to answer questions based on the material the student is actually studying.\n\nAfter studying, the student can generate a quiz from their uploaded material.\n\nThey can choose:\n\nBut generating questions was only half of the problem.\n\nI also wanted FriendMind to evaluate answers in a way that reflects **understanding**, rather than simply matching exact words.\n\nThat led to one of the most important parts of the project.\n\nConsider these two answers:\n\n**Expected answer:**\n\nBinary search has logarithmic time complexity.\n\n**Student answer:**\n\nBinary search runs in O(log n).\n\nThe wording is different, but the concept is the same.\n\nA strict text comparison could fail to recognize that.\n\nFriendMind therefore uses **semantic similarity** to evaluate natural-language answers.\n\nThe goal is to ask:\n\n**“Does the student's answer communicate the expected concept?”**\n\nrather than:\n\n“Did the student use exactly the same words?”\n\nThis makes the quiz evaluation more flexible for natural student responses.\n\nFriendMind doesn't stop at marking an answer right or wrong.\n\nIt can use incorrect answers to identify areas where the student may need more revision.\n\nThe learning loop becomes:\n\n```\nStudy\n  ↓\nAsk Questions\n  ↓\nTake Quiz\n  ↓\nEvaluate Understanding\n  ↓\nIdentify Weak Topics\n  ↓\nRevise\n  ↓\nTry Again\n```\n\nThe idea is simple:\n\n**Don't just tell the student what they got wrong. Help them understand what to work on next.**\n\nOpen-source AI isn't just a technology choice in this project.\n\nIt directly affects **privacy and control**.\n\nFriendMind uses **Gemma 3**, an open-weight model, through **Ollama** for local inference.\n\nThe core architecture is:\n\n```\nStudent PDF\n    ↓\nLocal Processing\n    ↓\nLocal Embeddings\n    ↓\nChromaDB\n    ↓\nSemantic Retrieval\n    ↓\nOllama\n    ↓\nGemma 3\n    ↓\nAnswer / Quiz\n```\n\nA student's study material can contain lecture notes, assignments, personal notes, and exam preparation material.\n\nI didn't want the core workflow to require sending all of that material to a closed cloud AI service.\n\nWith the local-first approach, the core AI workflow can run on the student's own computer.\n\nIt also gives the project more control over the model layer: the application isn't permanently tied to a single hosted AI API.\n\nFor a tool designed around personal study material, **privacy, ownership, and control matter.**\n\nThe architecture is intentionally straightforward:\n\n```\n                    ┌─────────────────┐\n                    │   FriendMind UI │\n                    │  HTML/CSS/JS    │\n                    └────────┬────────┘\n                             │\n                             ▼\n                    ┌─────────────────┐\n                    │     FastAPI     │\n                    │     app.py      │\n                    └────────┬────────┘\n                             │\n             ┌───────────────┼───────────────┐\n             ▼               ▼               ▼\n       PDF Processing    RAG Engine     Quiz Engine\n                             │               │\n                             ▼               ▼\n                    Sentence Transformers\n                             │\n                             ▼\n                         ChromaDB\n                             │\n                             ▼\n                          Ollama\n                             │\n                             ▼\n                          Gemma 3\n```\n\n**Backend:** Python, FastAPI, Uvicorn\n\n**AI/ML:** Sentence Transformers, RAG, Semantic Similarity\n\n**LLM:** Ollama, Gemma 3\n\n**Vector Database:** ChromaDB\n\n**Document Processing:** pypdf\n\n**Frontend:** HTML, CSS, Vanilla JavaScript\n\n**Development:** Git, GitHub, VS Code, PowerShell\n\nFriendMind currently runs locally using Ollama and Gemma 3.\n\nThe demo shows the complete workflow:\n\n**Upload PDF → Ask a question → Generate quiz → Answer → Semantic evaluation → Weak-topic detection**\n\n[https://www.youtube.com/watch?v=pd66-1qTa40](https://www.youtube.com/watch?v=pd66-1qTa40)\n\nThe screen recording demonstrates the actual working application rather than a mockup.\n\nThe repository contains screenshots of the working application in `docs/screenshots/`.\n\nShow the FriendMind PDF upload interface here.\n\nShow a grounded question and response here.\n\nShow the generated quiz here.\n\nShow semantic evaluation and weak-topic results here.\n\nFriendMind follows a local-first approach:\n\n```\nPDF\n ↓\nYour Computer\n ↓\nChromaDB\n ↓\nLocal Embeddings\n ↓\nOllama / Gemma 3\n```\n\nThe core AI workflow can run locally without requiring study material to be sent to a cloud LLM provider.\n\nBuilding FriendMind taught me that building an AI application isn't just about connecting an LLM to a frontend.\n\nThe interesting problems appeared around the model:\n\nThe semantic verification layer was particularly interesting.\n\nIt changed the problem from:\n\n**“Are these two strings similar?”**\n\nto:\n\n**“Do these two answers express the same concept?”**\n\nThat distinction becomes especially important when AI is being used for learning.\n\nFriendMind is still a starting point.\n\nSome improvements I'd like to explore are:\n\nFor this challenge, however, I wanted to keep the scope focused on solving one real problem.\n\nI didn't start with:\n\n“What AI application can I build?”\n\nI started with:\n\n**“What could actually make studying easier for someone I know?”**\n\nThat changed the direction of the project.\n\nInstead of building another general-purpose chatbot, I built something around a student's actual workflow:\n\n**their notes → their questions → their quiz → their mistakes → their revision.**\n\nThat's what **Build for a Friend** meant to me.\n\nThe complete source code is available on GitHub:\n\n**sanchalitorpe13/FriendMind**\n\nThe repository contains the application source code, setup instructions, architecture, and screenshots.\n\nFriendMind is my submission for the **Hacktoberfest 2026 DEV Weekend Challenge — Build for a Friend.**\n\nThanks for reading. 💙\n\n**Best Use of Gemma**\n\nFriendMind uses **Gemma 3** as its local AI model through Ollama.", "url": "https://wpnews.pro/news/i-built-friendmind-a-private-ai-study-companion-for-a-friend", "canonical_source": "https://dev.to/sanchali_torpe_2860608bc4/i-built-friendmind-a-private-ai-study-companion-for-a-friend-14d4", "published_at": "2026-10-03 13:34:29+00:00", "updated_at": "2026-10-03 13:38:16.128775+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "ai-products", "mlops", "ai-agents"], "entities": ["FriendMind", "Gemma 3", "Ollama", "ChromaDB", "Hacktoberfest 2026", "DEV Weekend Challenge"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/i-built-friendmind-a-private-ai-study-companion-for-a-friend", "markdown": "https://wpnews.pro/news/i-built-friendmind-a-private-ai-study-companion-for-a-friend.md", "text": "https://wpnews.pro/news/i-built-friendmind-a-private-ai-study-companion-for-a-friend.txt", "jsonld": "https://wpnews.pro/news/i-built-friendmind-a-private-ai-study-companion-for-a-friend.jsonld"}}