<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Samreena Yousaf</title>
    <description>The latest articles on DEV Community by Samreena Yousaf (@samreenayousaf).</description>
    <link>https://dev.to/samreenayousaf</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F99mvlsfu5tfj9m7ku25d.png</url>
      <title>DEV Community: Samreena Yousaf</title>
      <link>https://dev.to/samreenayousaf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/samreenayousaf"/>
    <language>en</language>
    <item>
      <title>StudyLens: I Built an AI That Learns What My Friend Doesn’t Understand</title>
      <dc:creator>Samreena Yousaf</dc:creator>
      <pubDate>Mon, 05 Oct 2026 02:10:29 +0000</pubDate>
      <link>https://dev.to/samreenayousaf/studylens-i-built-an-ai-that-learns-what-my-friend-doesnt-understand-5api</link>
      <guid>https://dev.to/samreenayousaf/studylens-i-built-an-ai-that-learns-what-my-friend-doesnt-understand-5api</guid>
      <description>&lt;h2&gt;
  
  
  StudyLens: A Private Local-AI Learning Loop Built for a Friend
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built &lt;strong&gt;StudyLens&lt;/strong&gt;, a private, local-AI adaptive learning tool for my friend &lt;strong&gt;Beenish&lt;/strong&gt;, a student learning Software Engineering.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1fa6bepxymv47dfc1fuv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1fa6bepxymv47dfc1fuv.png" alt="StudyLens Dashboard showing concept mastery and learning progress" width="799" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The problem was simple: when Beenish gets an answer wrong, seeing the correct answer does not always tell her &lt;strong&gt;which concept she misunderstood&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;StudyLens is designed around that gap.&lt;/p&gt;

&lt;p&gt;Instead of simply marking an answer right or wrong, it analyzes the student's response locally, extracts evidence about their understanding, estimates concept-level weaknesses, updates a deterministic mastery profile, and can give them a &lt;strong&gt;targeted retest on the same concept&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The goal is not to replace a teacher or claim that AI can perfectly understand a learner. StudyLens instead uses answer patterns to estimate recurring concept-level weaknesses and adapt subsequent assessments.&lt;/p&gt;

&lt;p&gt;The core loop is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer → Local AI analysis → Concept/misconception evidence → Mastery update → Targeted retest → New answer → Updated mastery&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd9dwksf0fmv4pktag3zr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd9dwksf0fmv4pktag3zr.png" alt="A weak answer analyzed locally, with the detected concept weakness and targeted retest decision." width="695" height="779"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Here is a short walkthrough showing the adaptive learning flow:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/fmw0NHtx7vI" rel="noopener noreferrer"&gt;Watch the StudyLens demo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The demo shows a student answering a question, receiving local AI analysis, seeing their mastery update, receiving a targeted retest after a weak answer, and then continuing the learning loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;The complete project is open source:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/samreenayousaf/StudyLens-Hacktoberfest" rel="noopener noreferrer"&gt;https://github.com/samreenayousaf/StudyLens-Hacktoberfest&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository includes the application source code, tests, evaluation cases, documentation, contribution guidelines, and license information.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;StudyLens uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gemma 3:1B&lt;/strong&gt; for local answer analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ollama&lt;/strong&gt; to run the model locally&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python + FastAPI&lt;/strong&gt; for the backend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SQLite + SQLAlchemy&lt;/strong&gt; for learning data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;React + Vite&lt;/strong&gt; for the frontend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vanilla CSS&lt;/strong&gt; for the interface&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pytest&lt;/strong&gt; for automated backend testing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most important architectural decision was separating &lt;strong&gt;AI interpretation&lt;/strong&gt; from &lt;strong&gt;learning decisions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Gemma analyzes the student's answer and returns structured information such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;understanding score&lt;/li&gt;
&lt;li&gt;detected concepts&lt;/li&gt;
&lt;li&gt;possible misconceptions&lt;/li&gt;
&lt;li&gt;supporting evidence&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The deterministic backend then handles the authoritative learning logic.&lt;/p&gt;

&lt;p&gt;For example, mastery is updated using a deterministic weighted calculation:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;new mastery = previous mastery × 0.70 + current understanding × 0.30&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The backend also determines whether a retest is required and selects another active question from the same concept.&lt;/p&gt;

&lt;p&gt;This means the language model does not directly decide the student's final mastery level or secretly control the learning flow.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Adaptive Retest
&lt;/h2&gt;

&lt;p&gt;One of the core features is the targeted retest.&lt;/p&gt;

&lt;p&gt;For example, if a student gives a weak answer about &lt;strong&gt;Coupling&lt;/strong&gt;, StudyLens can identify evidence of misunderstanding and request another Coupling question rather than randomly switching to a different topic.&lt;/p&gt;

&lt;p&gt;The student can then answer the new question and see how their estimated mastery changes.&lt;/p&gt;

&lt;p&gt;This creates a small but explicit learning loop instead of a conventional question-and-answer chatbot.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbs12w68zv8on870kbvqv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbs12w68zv8on870kbvqv.png" alt="StudyLens showing a strong answer with AI analysis and updated mastery" width="777" height="865"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;This project is specifically built around local inference.&lt;/p&gt;

&lt;p&gt;Gemma 3:1B runs through Ollama on the student's own machine rather than sending their answers to a hosted closed AI API.&lt;/p&gt;

&lt;p&gt;That matters for a learning tool because student answers can contain personal academic information.&lt;/p&gt;

&lt;p&gt;With the local approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;answers stay on the local machine during analysis&lt;/li&gt;
&lt;li&gt;the project does not require a paid AI API&lt;/li&gt;
&lt;li&gt;the model can be replaced or experimented with&lt;/li&gt;
&lt;li&gt;inference can work without depending on a remote AI service&lt;/li&gt;
&lt;li&gt;the AI component remains inspectable and reproducible&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The project also demonstrates that useful AI-assisted learning experiments do not necessarily require a large cloud model.&lt;/p&gt;

&lt;p&gt;The tradeoff is latency: on my laptop, local CPU inference is noticeably slower than a typical hosted API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Validation
&lt;/h2&gt;

&lt;p&gt;I did not want the project to stop at a working UI.&lt;/p&gt;

&lt;p&gt;The backend currently has &lt;strong&gt;52 automated tests passing with 0 failures&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I also tested the complete learning flow with real local Gemma inference.&lt;/p&gt;

&lt;p&gt;The validation covered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;correct and incorrect Agile answers&lt;/li&gt;
&lt;li&gt;correct and incorrect Scrum answers&lt;/li&gt;
&lt;li&gt;correct and incorrect Waterfall answers&lt;/li&gt;
&lt;li&gt;correct and incorrect Coupling answers&lt;/li&gt;
&lt;li&gt;Functional vs Non-functional Requirements&lt;/li&gt;
&lt;li&gt;misconception extraction&lt;/li&gt;
&lt;li&gt;concept filtering&lt;/li&gt;
&lt;li&gt;mastery updates&lt;/li&gt;
&lt;li&gt;targeted retest decisions&lt;/li&gt;
&lt;li&gt;same-concept question selection&lt;/li&gt;
&lt;li&gt;duplicate submission protection&lt;/li&gt;
&lt;li&gt;API behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also manually tested the application through the browser, including a weak answer followed by a targeted retest and a subsequent correct answer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkz5rg4hxz5psofpwewnw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkz5rg4hxz5psofpwewnw.png" alt="Progress view showing updated concept mastery after repeated attempts." width="799" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Open Source
&lt;/h2&gt;

&lt;p&gt;StudyLens is released under the &lt;strong&gt;MIT License&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The application is built around an open-weight Gemma model, with the model run locally through Ollama.&lt;/p&gt;

&lt;p&gt;The repository also includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;CONTRIBUTING.md&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CODE_OF_CONDUCT.md&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;automated tests&lt;/li&gt;
&lt;li&gt;evaluation cases&lt;/li&gt;
&lt;li&gt;project documentation&lt;/li&gt;
&lt;li&gt;Hacktoberfest-specific audit and submission documentation&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;p&gt;StudyLens is a prototype, not a finished educational assessment system.&lt;/p&gt;

&lt;p&gt;The current implementation has a relatively small Software Engineering question set and uses a small local model. A 1B parameter model can sometimes produce over-inclusive misconception descriptions, which is why the application applies deterministic validation and filtering around the AI output.&lt;/p&gt;

&lt;p&gt;Local CPU inference is also slower than cloud inference.&lt;/p&gt;

&lt;p&gt;Most importantly, the system should be understood as &lt;strong&gt;estimating concept-level weaknesses from answer evidence&lt;/strong&gt;, not as perfectly measuring what a student understands.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Built It for a Friend
&lt;/h2&gt;

&lt;p&gt;The starting point was not "What AI app can I build?"&lt;/p&gt;

&lt;p&gt;It was a much smaller question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What could I build that would actually help one person I know?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For Beenish, the useful part was not another chatbot that could explain Software Engineering concepts.&lt;/p&gt;

&lt;p&gt;It was the loop after getting something wrong:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What did I misunderstand? → What should I practice next? → Did I improve?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That became the reason for building StudyLens.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Category
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Best Use of Gemma&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;StudyLens uses Google's open-weight &lt;strong&gt;Gemma 3:1B&lt;/strong&gt; as a core part of its learning-analysis pipeline and runs the model locally through Ollama.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;🎥 &lt;strong&gt;Demo:&lt;/strong&gt; &lt;a href="https://youtu.be/fmw0NHtx7vI" rel="noopener noreferrer"&gt;https://youtu.be/fmw0NHtx7vI&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💻 &lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/samreenayousaf/StudyLens-Hacktoberfest" rel="noopener noreferrer"&gt;https://github.com/samreenayousaf/StudyLens-Hacktoberfest&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Built for a friend, powered locally, and released openly.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
