<?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: Priyanshu Jha</title>
    <description>The latest articles on DEV Community by Priyanshu Jha (@priyanshujha2009).</description>
    <link>https://dev.to/priyanshujha2009</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4161232%2F9dfdc2b0-6122-4175-afe2-3b47377e42e3.png</url>
      <title>DEV Community: Priyanshu Jha</title>
      <link>https://dev.to/priyanshujha2009</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/priyanshujha2009"/>
    <language>en</language>
    <item>
      <title>I built an AI examiner that reads my friend's notes — without the notes ever leaving their laptop</title>
      <dc:creator>Priyanshu Jha</dc:creator>
      <pubDate>Mon, 05 Oct 2026 04:05:12 +0000</pubDate>
      <link>https://dev.to/priyanshujha2009/i-built-an-ai-examiner-that-reads-my-friends-notes-without-the-notes-ever-leaving-their-laptop-4gkp</link>
      <guid>https://dev.to/priyanshujha2009/i-built-an-ai-examiner-that-reads-my-friends-notes-without-the-notes-ever-leaving-their-laptop-4gkp</guid>
      <description>&lt;h1&gt;
  
  
  I built an AI examiner that reads my friend's notes — without the notes ever leaving their laptop
&lt;/h1&gt;

&lt;h2&gt;
  
  
  What I built, and who it's for
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/Priyanshujha1320/notes-vs-me" rel="noopener noreferrer"&gt;Notes vs. Me&lt;/a&gt;&lt;/strong&gt; is a study app with one job: take the PDFs a&lt;br&gt;
student already has — syllabus, lecture slides, past papers — and turn them&lt;br&gt;
into an examiner that grills them, question after question, then shows exactly&lt;br&gt;
which topics they keep failing.&lt;/p&gt;

&lt;p&gt;I built it for a friend doing their undergrad who does the thing every student&lt;br&gt;
does: reads the notes three times, feels prepared, walks into the exam, and&lt;br&gt;
discovers that &lt;em&gt;reading&lt;/em&gt; and &lt;em&gt;being asked&lt;/em&gt; are completely different skills.&lt;br&gt;
They had notes. They had questions at the back of the textbook. What they&lt;br&gt;
didn't have was something that looked at &lt;em&gt;their&lt;/em&gt; notes and asked &lt;em&gt;them&lt;/em&gt; the&lt;br&gt;
awkward follow-up.&lt;/p&gt;

&lt;p&gt;And here's the constraint that shaped the whole build: their laptop is&lt;br&gt;
where the notes live, where the revision happens, and — crucially — where the&lt;br&gt;
notes should stay. No student wants their past papers uploaded to somebody's&lt;br&gt;
cloud to "personalise their learning". So the default mode runs the entire AI&lt;br&gt;
loop on their machine, and it all works offline.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Play it live, no install&lt;/strong&gt;: &lt;a href="https://priyanshujha1320.github.io/notes-vs-me/" rel="noopener noreferrer"&gt;priyanshujha1320.github.io/notes-vs-me&lt;/a&gt; — the landing page runs the actual exam loop in your browser: six questions from a sample photosynthesis chapter, graded instantly with explanations, ending in the session heatmap (your weakest topic sorted first, exactly what the real app schedules next round)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full app on your own notes&lt;/strong&gt;: clone the repo, &lt;code&gt;ollama pull gemma3:1b&lt;/code&gt;, &lt;code&gt;pip install -r requirements.txt&lt;/code&gt;, run — ten minutes, and everything after that works offline&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/Priyanshujha1320/notes-vs-me" rel="noopener noreferrer"&gt;github.com/Priyanshujha1320/notes-vs-me&lt;/a&gt; — MIT licensed. FastAPI + SQLite + a single-file&lt;br&gt;
vanilla-JS frontend — no build step, nothing to trust. One weekend.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I built it
&lt;/h2&gt;

&lt;p&gt;The pipeline is deliberately boring — boring is what survives exam week:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Ingest&lt;/strong&gt; — a PDF is parsed with PyMuPDF into ~1200-character,
paragraph-aware chunks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sample&lt;/strong&gt; — when you ask for a quiz, chunks are picked &lt;em&gt;weighted by your
history&lt;/em&gt;: material you've never been tested on first, then the topics you
keep failing. All state lives in SQLite — one file on the student's disk.
No vector database, no server, no account.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generate&lt;/strong&gt; — Gemma 3 (open weights, via Ollama) writes an exam question
per chunk as strict JSON: a topic label, the question, options, the
answer, and an explanation a student would actually find useful.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grade&lt;/strong&gt; — MCQs are graded deterministically. Short answers are graded by
the same model against a model answer, with instructions to be strict about
understanding and generous about wording. When grading hiccups, the app
falls back to showing the model answer rather than blocking the student.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The fun part was the sampling loop. A static quiz generator gets boring in&lt;br&gt;
about a day; a griller that remembers you failed "Calvin cycle" twice and&lt;br&gt;
quietly schedules it for next round behaves like something that &lt;em&gt;wants&lt;/em&gt; you to&lt;br&gt;
pass. That loop is about ten lines around a weighted shuffle.&lt;/p&gt;

&lt;p&gt;The not-fun part was coaxing a 1B-parameter model into reliable JSON. Small&lt;br&gt;
open models copy your prompt's placeholder literally — mine happily returned&lt;br&gt;
&lt;code&gt;"options": ["A", "B", "C", "D"]&lt;/code&gt;, letter options and all. The fix was a&lt;br&gt;
worked example in the prompt (show, don't describe) plus a coercion layer&lt;br&gt;
that trusts the model's actual answer type instead of fighting it. That's a&lt;br&gt;
trade you make with small local models, and it's worth it: the whole AI stack&lt;br&gt;
fits in about 1GB of RAM, so it runs on the kind of laptop students actually&lt;br&gt;
own. If a machine can't run a model at all, there's a fallback to the same&lt;br&gt;
open weights served by Groq — the app tells you, in plain words, which mode&lt;br&gt;
you're in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why open matters here (not just "open is nice")
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It runs where the data lives.&lt;/strong&gt; Closed study APIs require the notes to be
uploaded. Open weights on Ollama mean the entire loop — parse, generate,
grade — happens on a laptop that may never see fast Wi-Fi during exam week.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero marginal cost matters for students.&lt;/strong&gt; A closed API costs money every
time a student fails a question. Failing questions is &lt;em&gt;the point&lt;/em&gt;. Gemma 3
on Ollama costs nothing per query, so the app can be ruthless.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It can be forked for a different syllabus.&lt;/strong&gt; A medical student can swap
the prompts for OSCE-style viva questions; a law student for case-law
problem questions. Nothing about their revision is locked to my server, my
pricing, or my roadmap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It survives abandonment.&lt;/strong&gt; If I never touch this repo again, it keeps
working. No shutdown notice turns a study tool into a brick.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Handing it over
&lt;/h2&gt;

&lt;p&gt;I'm handing the app to my friend this week with their own syllabus loaded —&lt;br&gt;
watching a real student take the first grill is the whole point of this&lt;br&gt;
build, and I'll update this section with what actually happens. My money is&lt;br&gt;
on it finding the one section they skipped.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Photo-of-handwriting ingestion (local OCR — harder than it sounds on a laptop)&lt;/li&gt;
&lt;li&gt;A "grill me out loud" mode with open speech models&lt;/li&gt;
&lt;li&gt;Export of the weak-topic heatmap as a revision checklist&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Try it on your own notes: &lt;a href="https://github.com/Priyanshujha1320/notes-vs-me" rel="noopener noreferrer"&gt;github.com/Priyanshujha1320/notes-vs-me&lt;/a&gt;. If it exposes a topic you were sure you&lt;br&gt;
knew, that's the app working.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built for the &lt;a href="https://dev.to/devteam/join-the-hacktoberfest-weekend-challenge-build-for-a-friend-2450-in-prizes-across-17-winners-1aj5"&gt;DEV Hacktoberfest Weekend Challenge&lt;/a&gt;: open&lt;br&gt;
source AI that solves a real problem for someone you love.&lt;/em&gt;&lt;/p&gt;

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