<?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: Aritro Bag</title>
    <description>The latest articles on DEV Community by Aritro Bag (@aritro_bag_aedd415e2a69b8).</description>
    <link>https://dev.to/aritro_bag_aedd415e2a69b8</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%2F3982873%2F02c6ecfc-1f9f-4e14-8787-aa6a656cade2.jpg</url>
      <title>DEV Community: Aritro Bag</title>
      <link>https://dev.to/aritro_bag_aedd415e2a69b8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aritro_bag_aedd415e2a69b8"/>
    <language>en</language>
    <item>
      <title>I Reverse-Engineered 3 Years of Exam Papers on localhost (With Wi-Fi Off)</title>
      <dc:creator>Aritro Bag</dc:creator>
      <pubDate>Sun, 04 Oct 2026 20:04:12 +0000</pubDate>
      <link>https://dev.to/aritro_bag_aedd415e2a69b8/i-reverse-engineered-3-years-of-exam-papers-on-localhost-with-wi-fi-off-1p6n</link>
      <guid>https://dev.to/aritro_bag_aedd415e2a69b8/i-reverse-engineered-3-years-of-exam-papers-on-localhost-with-wi-fi-off-1p6n</guid>
      <description>&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;Every AI study tool wants your lecture PDFs. Uploading copyrighted course material to a stranger's inference endpoint is a trade-off, and the friend I built this for wasn't willing to make it.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;Gist&lt;/strong&gt;, a study partner that never makes that trade. It runs entirely on the laptop. PDFs are parsed, embedded, and searched locally, the LLM runs locally in Ollama, and the app works with the Wi-Fi switched off. There is no API key in the codebase because there is no API involvement.&lt;/p&gt;

&lt;p&gt;The core of Gist isn't another generic chatbot wrapper. It is an &lt;strong&gt;intelligent past question paper analyser&lt;/strong&gt;. You drop in 3+ years of past university exam PDFs, and Gist reverse-engineers the exam pattern:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Which questions and variations repeat.&lt;/li&gt;
&lt;li&gt;What each topic is actually worth in total marks weightage.&lt;/li&gt;
&lt;li&gt;How frequently each concept appears across semesters.&lt;/li&gt;
&lt;li&gt;How your personal quiz drills cross-reference against that weightage.&lt;/li&gt;
&lt;/ol&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%2Fx58a2yqfkntx4q7u9b3m.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%2Fx58a2yqfkntx4q7u9b3m.png" alt="The Past Paper Analyser Workbench and Priority Matrix showing topic weightage breakdowns, past questions, and high-yield weak spots" width="799" height="454"&gt;&lt;/a&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%2Fw7gsnu28ren27z0q6gxm.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%2Fw7gsnu28ren27z0q6gxm.png" alt="Grounded Q&amp;amp;A with direct PDF page citations and Timed Mock Exam drill" width="800" height="455"&gt;&lt;/a&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%2Fskpiz9j41awdb9ytqdl4.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%2Fskpiz9j41awdb9ytqdl4.png" alt="A snapshot from the landing page" width="800" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Product page: &lt;a href="https://gist-landing.onrender.com" rel="noopener noreferrer"&gt;https://gist-landing.onrender.com&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Demo Video: &lt;a href="https://youtu.be/QMNTq5FTj8k" rel="noopener noreferrer"&gt;https://youtu.be/QMNTq5FTj8k&lt;/a&gt;&lt;br&gt;
disclaimer: i'm not a good speaker&lt;/p&gt;
&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/dev-Aarish" rel="noopener noreferrer"&gt;
        dev-Aarish
      &lt;/a&gt; / &lt;a href="https://github.com/dev-Aarish/gist" rel="noopener noreferrer"&gt;
        gist
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Turn your lecture notes and past papers into an offline exam training ground. Grounded RAG with page citations, historical mark weightages, high-yield weak spot detection, and timed mock exams. Runs 100% locally on open-weight LLMs via Ollama — zero cloud, zero API keys.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Gist&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Gist is an offline, privacy-first AI study partner powered by local open-weight large language models (LLMs) via Ollama, FastAPI, and React. It combines page-grounded document Q&amp;amp;A with an exam intelligence engine that analyzes past question papers, detects topic marks weightages, prioritizes high-yield weak spots, and conducts timed mock exams ("Grill Me" mode).&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Architecture Overview&lt;/h2&gt;
&lt;/div&gt;

  &lt;div class="js-render-enrichment-target"&gt;
    &lt;div class="render-plaintext-hidden"&gt;
      &lt;pre&gt;graph TD
    subgraph UserInterface ["Frontend Client (React 18 + Vite - Dark Theme)"]
        UI["Web Interface: Chat, Past-Paper Workbench, Priority Matrix, Quizzes, Timed Mock Exams"]
    end
    subgraph BackendGateway ["Backend API (FastAPI)"]
        API["REST &amp;amp; SSE Gateway (Port 8000)"]
        Ingest["Document Ingestion Engine (PyMuPDF)"]
        Analyzer["Past-Paper Analyzer Engine"]
        RAG["Grounded RAG Pipeline"]
        Quiz["Adaptive Quiz &amp;amp; Instant Bank Engine"]
        Exam["Mock Exam Simulator ('Grill Me' Engine)"]
    end
    subgraph StorageLayer ["Local Persistent Storage"]
        Chroma["ChromaDB: Vector Embeddings"]
        SQLite["SQLite (tracker.db): Papers, Question Bank, Mastery &amp;amp; Attempt History"]
        Uploads["PDF Storage (data/uploads)"]
    end

    subgraph LocalLLM ["Local Inference Engine (Ollama)"]
        EmbedModel["Embedding Models: nomic-embed-text / bge-m3"]
        ChatModel["Dynamic Open-Weight Models: Gemma&lt;/pre&gt;…&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/dev-Aarish/gist" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The parsing rules are the part I'd walk through first. Marks appear in university papers as &lt;code&gt;[10]&lt;/code&gt;, &lt;code&gt;(5 marks)&lt;/code&gt;, &lt;code&gt;15M&lt;/code&gt;, or a bare &lt;code&gt;4 + 6 + 2 = 12&lt;/code&gt; breakdown, and getting this wrong means every downstream percentage is wrong:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# backend/analyzer.py:134
&lt;/span&gt;&lt;span class="n"&gt;m_single&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;(?:\[|\()?\b(\d{1,2})\s*(?:marks?|mark|m|pts?)\b(?:\]|\))?|\[(\d{1,2})\]&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;I&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Mark weightage is the input to the entire priority model, so it has to come out of the PDF exactly, not approximately.&lt;/p&gt;
&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;Everything runs on the user's machine. No network calls leave the host, which makes the privacy claim checkable rather than a policy promise.&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%2Flqrf2vcjzf0ddfuyleqk.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%2Flqrf2vcjzf0ddfuyleqk.png" alt="Architecture diagram showing every component inside a single box representing the user's machine: a React 18 and Vite client calls a local FastAPI server over localhost, which dispatches to four engines (PyMuPDF ingestion, the past-paper analyser, grounded RAG, and a mock exam grader). These read and write ChromaDB for vector search, SQLite at data/tracker.db for papers and mastery, and the original PDFs in data/uploads. All four engines call a local Ollama runtime on port 11434. No connection leaves the box." width="799" height="424"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Pipeline
&lt;/h3&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%2Frpyplnfr8jkhf4q03e1k.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%2Frpyplnfr8jkhf4q03e1k.png" alt="Flowchart of the past-paper analyser. A PDF passes through a regex metadata scan for year, total marks, and title, then a decision on whether question boundaries were found by regex. If yes, questions are split on patterns like Q1(a), 2., and (i) with marks extracted per line, topics are inferred by keyword so terms like bcnf and 3nf map to Normalization, and a second decision sends only still-unclassified questions to a micro-LLM pass capped at 12 questions and 200 tokens. If no boundaries were found, full LLM extraction is the fallback. Both paths fold results onto a canonical topic map, write questions, marks, and topics to SQLite, and feed a priority matrix computed as marks percentage times weakness, producing a ranked revision list. A dotted background thread also indexes the paper into ChromaDB." width="645" height="1717"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The stack is FastAPI, PyMuPDF, ChromaDB, SQLite, and Ollama on the backend, React on the front. About 4,700 lines of Python now, up from 2,000 when the quiz was the main feature.&lt;/p&gt;
&lt;h4&gt;
  
  
  Resources I took help of:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Antigravity(CLI)&lt;/li&gt;
&lt;li&gt;Opencode&lt;/li&gt;
&lt;li&gt;Freebuff&lt;/li&gt;
&lt;li&gt;Skills(frontend-design, ui-ux-pro-max, emil-design-eng, impeccable, documentation-writer)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Why the Analyser is Rules-First, LLM-Second
&lt;/h3&gt;

&lt;p&gt;My first prototype sent the entire exam paper to an LLM asking for structured JSON. It was sluggish, expensive on local compute, and hallucinated marks.&lt;/p&gt;

&lt;p&gt;The current architecture is a &lt;strong&gt;three-stage hybrid pipeline&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Regex Parse&lt;/strong&gt;: Splits questions on structural boundaries (&lt;code&gt;Q1(a)&lt;/code&gt;, &lt;code&gt;2.&lt;/code&gt;, &lt;code&gt;(i)&lt;/code&gt;), groups MCQ sub-options under their parents, filters boilerplate university headers, and extracts marks per line. Runs in milliseconds with 100% fidelity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keyword Topic Inference&lt;/strong&gt;: A domain-specific ontology maps question vocabulary to canonical syllabus topics (&lt;code&gt;bcnf&lt;/code&gt;, &lt;code&gt;3nf&lt;/code&gt;, &lt;code&gt;attribute closure&lt;/code&gt; → &lt;em&gt;Normalization&lt;/em&gt;; &lt;code&gt;precedence graph&lt;/code&gt;, &lt;code&gt;2pl&lt;/code&gt;, &lt;code&gt;dirty read&lt;/code&gt; → &lt;em&gt;Transactions&lt;/em&gt;). Using deterministic mapping prevents small 7B models from inventing arbitrary topic names.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Micro-LLM Pass for Edge Cases&lt;/strong&gt;: Only unclassified questions falling through to the generic category are sent to Ollama, batched at ≤ 12 snippets with &lt;code&gt;num_predict=200&lt;/code&gt;. Full LLM extraction is reserved strictly as a fallback for unstructured, legacy scanned layouts.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A canonical topic dictionary folds all variations back into fixed buckets so percentages aggregate cleanly without fragmentation.&lt;/p&gt;
&lt;h3&gt;
  
  
  Turning Weightage into a Ranked Study Plan
&lt;/h3&gt;

&lt;p&gt;Two mathematical formulas drive the recommendation engine:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Exam Importance&lt;/strong&gt; measures how heavily a topic features across years, with frequency acting as a credibility multiplier on total marks share:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;exam_importance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;marks_pct&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.6&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;0.4&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;frequency_pct&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;em&gt;(Multiplication ensures a topic worth 15% across all past papers ranks significantly higher than a topic appearing in only one isolated year).&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Composite Priority&lt;/strong&gt; scales exam weight against your personal weakness:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;priority&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;exam_importance&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;accuracy&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;1.5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Why Open Innovation Matters
&lt;/h2&gt;

&lt;p&gt;This project exists solely because open weights and local runtimes are now viable on standard consumer laptops. A closed, cloud-only model would have compromised the project in three fundamental ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Verifiable Privacy&lt;/strong&gt;: No keys to leak, no remote database to breach, and no data harvesting. Anyone can audit the 4,700 lines of Python and verify that zero packets leave &lt;code&gt;localhost&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-Cost Feedback Loops&lt;/strong&gt;: Prompt tuning and evaluation loops take seconds. Tweaking extraction prompts and re-running against local weights is free, reproducible, and immune to upstream provider deprecations or rate limits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hybrid Architecture Viability&lt;/strong&gt;: A deterministic rules-first pipeline that saves LLM calls only makes architectural sense when local execution is unmetered.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;Here is the interactive session trace detailing the design iterations behind the local-first architecture, the 3-stage hybrid parsing engine, and the priority formula:&lt;/p&gt;


&lt;div class="ltag-agent-session"&gt;
  &lt;div class="agent-session-header"&gt;
    
    &lt;span class="agent-session-tool-icon-badge" title="Gemini CLI"&gt;
&lt;/span&gt;
    &lt;span class="agent-session-title"&gt;Building Gist: Local-First Offline Exam Intelligence &amp;amp; 3-Stage Hybrid Parser&lt;/span&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-scroll"&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;How can we build Gist as a 100% local, offline exam intelligence engine so that no university course PDFs ever leave the student's laptop?&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;We design an entirely local architecture powered by Ollama for local open-weight LLMs (Gemma 2 / Llama 3.2), FastAPI for the backend gateway, PyMuPDF for deterministic extraction, ChromaDB for local vector search, and SQLite for persistent tracking. Zero API keys, zero network telemetry.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-runcommand"&gt;run_command&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;cat &amp;lt;&amp;lt; 'EOF' &amp;gt; backend/architecture_spec.md
# Local-First Architecture:
1. Do...&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre agent-session-terminal"&gt;&lt;code&gt;$ cat &amp;lt;&amp;lt; 'EOF' &amp;gt; backend/architecture_spec.md
# Local-First Architecture:
1. Document Ingestion: PyMuPDF (Local)
2. Vector Indexing: ChromaDB (Local SQLite/DuckDB)
3. Topic Classifier: Regex heuristics + Keyword Ontology + Ollama fallback
4. Storage: SQLite tracker.db
EOF&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Architecture spec initialized.&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;The LLM is hallucinating marks and taking too long when parsing entire exam PDFs at once. How do we make question and marks extraction deterministic and fast?&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;We replace full-paper LLM generation with a 3-Stage Hybrid Parser:&lt;br&gt;
1. Deterministic Regex Parsing: Extract question boundaries (e.g. Q1(a), 2.) and mark tags ([10], (5 marks), 15M) in milliseconds with 100% fidelity.&lt;br&gt;
2. Keyword Ontology Inference: Map question keywords directly to syllabus topics (e.g. 'bcnf', '3nf' -&amp;gt; Normalization).&lt;br&gt;
3. Micro-LLM Pass: Only send leftover, unclassified questions to Ollama in small batches with low token limits.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-writetofile"&gt;write_to_file&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;# backend/analyzer.py regex pattern matching
m_single = re.search(r'(?:\[|\()...&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;# backend/analyzer.py regex pattern matching
m_single = re.search(r'(?:\[|\()?\b(\d{1,2})\s*(?:marks?|mark|m|pts?)\b(?:\]|\))?|\[(\d{1,2})\]', line, re.I)&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Updated backend/analyzer.py with deterministic parsing rules.&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;How do we turn the extracted topic mark weightage and student quiz accuracy into an actionable revision priority matrix?&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;We compute Exam Importance using question frequency as an amplifier over marks share, then multiply by student weakness:&lt;br&gt;
- exam_importance = marks_pct * (0.6 + 0.4 * (frequency_pct / 100))&lt;br&gt;
- priority = exam_importance * ((100 - accuracy) / 100) * 1.5&lt;br&gt;
Untested topics are penalized with an assumed 75% weakness rather than 0% accuracy to prioritize high-risk unknowns safely.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-footer"&gt;
    &lt;span class="agent-session-meta"&gt;
        6 of 6 messages
    &lt;/span&gt;
  &lt;/div&gt;
&lt;/div&gt;



&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma&lt;/strong&gt;: Gist is built on Google's open-weight &lt;strong&gt;Gemma 2&lt;/strong&gt; (&lt;code&gt;gemma2:9b&lt;/code&gt; and lightweight &lt;code&gt;gemma2:2b&lt;/code&gt;), running locally via Ollama to power the micro-LLM topic classification pass, grounded RAG answering, and automated mock exam grading.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render&lt;/strong&gt;: The interactive product landing page and live web preview are deployed on &lt;strong&gt;Render&lt;/strong&gt; at &lt;a href="https://gist-landing.onrender.com" rel="noopener noreferrer"&gt;https://gist-landing.onrender.com&lt;/a&gt; (configured via &lt;code&gt;render.yaml&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Entire&lt;/strong&gt;: The agent session transcript behind Gist's local-first architecture and hybrid parser design is embedded directly in this write-up.&lt;/li&gt;
&lt;/ul&gt;

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