PocketFriend
What I Built I built PocketFriend, a private AI study companion for my friend Mekdes, a university student pursuing a Bachelor’s degree in Biotechnology. I built it because I wanted to solve a real problem for one real person—not just build another AI demo. Mekdes is studying biotechnology, a field that requires working through substantial amounts of technical material, course notes, PDFs, assignments, and exam preparation. When study material accumulates across different documents, the difficult part isn’t always finding information. Sometimes the difficult part is knowing what to focus on, what to practice, and what to do next. As a fresh Computer Science graduate with a 3.8 GPA and strong programming skills, I wanted to use what I had learned to build something genuinely useful for her. I started with a simple question: What if I could build Mekdes a study companion that understands the material she is actually studying and helps her decide what to do next? That question became PocketFriend. PocketFriend is built around Mekdes’s own study materials. Instead of being a generic chatbot, it connects document understanding, retrieval, AI answers, quizzes, study planning, and daily tasks into one workflow. The core experience has four parts: Ask My Documents — ask questions about uploaded study material and receive answers grounded in those documents. Study Plan — turn study goals and available material into a practical study schedule. Quiz Me — generate questions from the study material to actively test understanding. What Should I Do Today? — turn the study plan and outstanding work into a focused next step. The idea is simple: Don’t give Mekdes another chatbot. Give her a study companion. From Information to Action The most important part of PocketFriend is how these features connect. A study document can become an explanation. An explanation can become a quiz. A quiz can reveal areas that need more attention. Those areas can become part of a study plan. And that study plan can eventually answer the question: “What should I do today?” That is the experience I wanted to build for Mekdes. PocketFriend isn’t intended to replace her professors, classmates, textbooks, or friends. It is designed to reduce the friction between: “I have a lot to study.” and “I know what I should work on next.” Demo Video demo: https://youtu.be/YuCuFy7asJI The demo shows the complete PocketFriend workflow: Upload study material. Ask a question about the documents. Receive an answer grounded in the uploaded material. Generate a quiz from the same material. Create a study plan. Ask PocketFriend what to focus on today. I want the demo to show more than an AI answering a question. It should show how the different capabilities work together to support an actual study session. GitHub repository: https://github.com/bire2323/pocketFriend PocketFriend is a Python and Streamlit application built around local AI inference. The high-level architecture is: PocketFriend │ Streamlit UI │ ┌───────────────┼───────────────┐ │ │ │ Documents Study Plan Quiz │ │ │ └───────────────┼───────────────┘ │ Document Retrieval │ ChromaDB │ Gemma via Ollama │ SQLite How I Built It The most important decision in PocketFriend was not the interface or the database. It was choosing to make Gemma running locally the core of the application. PocketFriend uses Gemma 3 1B, an open-weight model from Google, served locally through Ollama. The rest of the application is built with: Python Streamlit Ollama ChromaDB sentence-transformers PyMuPDF SQLite Gemma Is at the Core I didn’t want to use an AI model only as a final text-generation step. I wanted the model to be part of the actual study workflow. Gemma is used to transform retrieved study context into useful study assistance, including explanations, study planning, and quiz generation. The application therefore revolves around this pipeline: Mekdes’s study material ↓ Text extraction ↓ Chunking ↓ Embeddings ↓ ChromaDB ↓ Relevant retrieval ↓ Gemma ↓ Study assistance This makes the open-weight model part of the product architecture rather than an optional add-on. Why Local Inference? I developed PocketFriend on a relatively modest machine with approximately 8 GB of RAM. That constraint influenced the project. Instead of assuming access to a large GPU or an expensive hosted model, I selected Gemma 3 1B so that I could run the model locally through Ollama. This means PocketFriend can provide its core AI experience without requiring a proprietary cloud LLM API. For a study companion handling someone’s personal documents, that matters. Document-Grounded Answers PocketFriend uses a retrieval-augmented generation approach so that Gemma can work with the user’s actual study material. When documents are uploaded, PocketFriend extracts their text, divides it into searchable chunks, creates embeddings, and stores those representations in ChromaDB. When Mekdes asks a question, the application retrieves relevant sections of her documents and provides them as context to Gemma. The flow looks like this: Mekdes asks a question ↓ Search her uploaded documents ↓ Retrieve relevant passages ↓ Provide context to Gemma ↓ Generate the answer ↓ Show supporting document/page references The goal is therefore not simply: “What does an AI know about biotechnology?” It is: “What does my study material say about this?” That makes the AI more useful for course-specific studying. Building the Study Loop I designed the application around a continuous study loop: Study material │ ▼ Ask a question │ ▼ Understand it │ ▼ Take a quiz │ ▼ Find weak areas │ ▼ Build a study plan │ ▼ “What should I do today?” This is what makes PocketFriend different from a basic document chatbot. The objective isn’t to generate as much AI output as possible. The objective is to help turn existing study material into understanding, practice, planning, and action. Building for a Real Person Building for Mekdes also changed how I approached the project. As a Computer Science graduate, I could have started with the technology: “What interesting AI application can I build this weekend?” Instead, I started with the person: “What would actually help Mekdes?” That changed the engineering decisions. The application needed to be focused rather than overwhelming. It needed to work with the documents she already studies from. It needed to help her move from one study activity to the next instead of creating another place to get distracted. The technology came after the problem. Why Does Open Innovation Matter? This is where the choice of Gemma became especially important. A closed AI API could certainly power a study assistant. But for PocketFriend, the ability to run an open-weight model locally changes what is possible. Mekdes’s study materials are personal. They may include course notes, assignments, academic documents, and other information that she may not want to send to a third-party AI service. With Gemma running locally through Ollama, PocketFriend can keep the core AI workflow on the user’s machine. That gives the project a different privacy model: Traditional approach: Study documents ↓ External API ↓ Closed model ↓ AI response PocketFriend: Study documents ↓ Local retrieval ↓ Local Gemma ↓ AI response The open approach also gave me control over the AI stack. I could choose the model size based on my hardware, run inference locally, connect the model to my own retrieval system, and design the application around the actual needs of the person I was building for. I didn’t have to treat the AI model as a black box that existed somewhere else. For this project, open innovation made privacy, local inference, experimentation, and accessibility part of the product design. That is why Gemma isn’t simply a model I happened to use. Gemma is one of the reasons PocketFriend can be the kind of study companion I wanted to build for Mekdes. My Agent Session I used OpenCode through the VS Code terminal during development to help implement features, investigate bugs, test workflows, and iterate on the application. The development process was highly iterative: build → run → observe → diagnose → fix → test again. The agent-assisted work helped me work through problems in the Streamlit interface, document retrieval, multi-turn conversations, Study Plan generation, Quiz state management, and application startup. [ADD DEVRELAY SESSION HERE IF YOU CREATE/SAVE ONE.] Prize Categories Best Use of Gemma PocketFriend is my entry for Best Use of Gemma. Gemma is not being used as a superficial chatbot feature. The open-weight model sits at the center of PocketFriend’s AI workflow. It powers the transformation of retrieved study material into explanations, study plans, and quizzes, while running locally through Ollama. The project was also designed around the constraints of real local hardware, using Gemma 3 1B so that the core AI experience can run on a modest personal computer. Most importantly, the model choice connects directly to the problem I was trying to solve for Mekdes: a useful study companion that can work with her own material while keeping the AI workflow local. Final Thought I built PocketFriend because I wanted to do something more meaningful than demonstrate another AI chatbot. I wanted to build something for a person I know. Mekdes is studying for her Bachelor’s degree in Biotechnology. I am a fresh Computer Science graduate with a 3.8 GPA and strong programming skills. We are studying very different subjects, but that difference gave me an opportunity to use what I know to help with a problem I could see from close by. So I built a study companion around her needs. A place where her documents can become answers. Where answers can become practice. Where practice can reveal what she needs to work on. Where a study plan can become a concrete task. And where, instead of looking at a pile of study material and wondering where to begin, she can ask: “What should I do today?” That is PocketFriend. I didn’t build it because the world needs another chatbot. I built it because Mekdes needed a better study companion—and Gemma gave me the freedom to build one around her.