<?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: Shashwat Sinha</title>
    <description>The latest articles on DEV Community by Shashwat Sinha (@shashwatsinha03).</description>
    <link>https://dev.to/shashwatsinha03</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%2F4153733%2F5806b48a-bbdc-490d-89b7-758e5c687c69.jpg</url>
      <title>DEV Community: Shashwat Sinha</title>
      <link>https://dev.to/shashwatsinha03</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shashwatsinha03"/>
    <language>en</language>
    <item>
      <title>Constraint Kitchen: A Local LLM That Says No</title>
      <dc:creator>Shashwat Sinha</dc:creator>
      <pubDate>Mon, 19 Oct 2026 05:43:04 +0000</pubDate>
      <link>https://dev.to/shashwatsinha03/constraint-kitchen-a-local-llm-that-says-no-24pi</link>
      <guid>https://dev.to/shashwatsinha03/constraint-kitchen-a-local-llm-that-says-no-24pi</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




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

&lt;p&gt;&lt;strong&gt;Constraint Kitchen&lt;/strong&gt; turns the junk in your cupboard into something worth building.&lt;/p&gt;

&lt;p&gt;Type what you have — &lt;em&gt;cardboard, string, tape, old notebooks&lt;/em&gt; — plus your time, budget, skill level and any restrictions (&lt;em&gt;no sharp tools, no glue&lt;/em&gt;). A local Gemma 3 1B hands back &lt;strong&gt;three genuinely different DIY ideas&lt;/strong&gt; that respect all of it. Pick one, get a &lt;strong&gt;numbered build guide&lt;/strong&gt;. Changed your mind? &lt;strong&gt;Remix it&lt;/strong&gt; four ways: zero-buy, use-it-up, remove a material, or simplify for a beginner.&lt;/p&gt;

&lt;p&gt;Most idea lists assume a trip to the shop. This one starts where you already are.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who pays:&lt;/strong&gt; nobody. It runs on your own machine — no account, no API key, no usage meter. It's for makers starting a craft side hustle, teachers who need free classroom projects, and anyone who just bought a storage bin they don't want.&lt;/p&gt;

&lt;p&gt;The hard part isn't making ideas. It's &lt;strong&gt;not lying about them.&lt;/strong&gt; Show me "cut the cardboard" after I said &lt;em&gt;no sharp tools&lt;/em&gt; and you've failed me, JSON-valid or not. So it refuses more often than it succeeds — and says exactly why.&lt;/p&gt;

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

&lt;p&gt;⚠️ &lt;strong&gt;There's no deployed link, on purpose.&lt;/strong&gt; It needs a local Ollama service and binds to &lt;code&gt;127.0.0.1&lt;/code&gt; only. No hosted instance exists because there shouldn't be one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;→ &lt;a href="https://github.com/ShashwatSinha03/HF_ConstrainKitchen" rel="noopener noreferrer"&gt;github.com/ShashwatSinha03/HF_ConstrainKitchen&lt;/a&gt;&lt;/strong&gt; — clone, four minutes, running.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Cardboard Box Garden        2. Paper Chain Support      3. String Bookmark
 Uses: cardboard, tape           Uses: paper, tape            Uses: notebook pages, string
   20 min · easy                  20 min · easy                20 min · easy

   [ Build This → ]  [ Zero-buy ]  [ Use-it-up ]  [ Remove a material ]  [ Simplify it ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Measured on my Mac&lt;/strong&gt; (M3, 8 GB, &lt;code&gt;gemma3:1b&lt;/code&gt;): three ideas in ~10–20s, a guide in ~7–15s, a remix in ~3–8s. The model is &lt;strong&gt;nondeterministic&lt;/strong&gt; — the same diagnostic scored 5/7 and 6/7 on identical code. And guides under &lt;code&gt;no sharp tools&lt;/code&gt; land about 2 in 6. The gate refuses, on purpose.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;→ &lt;a href="https://github.com/ShashwatSinha03/HF_ConstrainKitchen" rel="noopener noreferrer"&gt;github.com/ShashwatSinha03/HF_ConstrainKitchen&lt;/a&gt;&lt;/strong&gt; (MIT)&lt;/p&gt;

&lt;p&gt;Two ideas did the heavy lifting:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output is untrusted input.&lt;/strong&gt; A 1B model &lt;em&gt;will&lt;/em&gt; invent a glue gun you don't own. So Python checks, and the meaning is directional:&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="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_covered_by_inventory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;inventory&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;One shared word is NOT evidence — &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cardboard&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; says nothing
    about &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;glue gun&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;, and a substring isn&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;t a match either.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;_significant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;inventory&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;A deadline you can trust.&lt;/strong&gt; &lt;code&gt;requests&lt;/code&gt;' &lt;code&gt;timeout&lt;/code&gt; isn't a total deadline — I measured 420s with &lt;code&gt;timeout=120&lt;/code&gt; never firing. So it streams and checks the wall clock per chunk. Forced timeout returns in &lt;strong&gt;0.07s, zero leaked threads.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;233 mocked tests&lt;/strong&gt;, green on 3.10 / 3.12 / 3.14 in CI — with no Ollama present, which is what makes that evidence instead of decoration.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;&lt;a href="https://ollama.com/library/gemma3:1b" rel="noopener noreferrer"&gt;&lt;code&gt;gemma3:1b&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt; via &lt;strong&gt;&lt;a href="https://ollama.com" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt;&lt;/strong&gt;. Python + Streamlit + &lt;code&gt;requests&lt;/code&gt;. Two dependencies. No LangChain, no vector DB, no agents, no cloud.&lt;/p&gt;

&lt;p&gt;The 1B shaped everything. It gets &lt;strong&gt;grammar-constrained decoding&lt;/strong&gt;, not prompt-begging — the schema does the work. It gets a prompt showing &lt;strong&gt;three&lt;/strong&gt; objects, because a 1B copies the shape it can see, and my original template showed one, so the model faithfully returned one, every single time. And the invariants live in the schema itself: &lt;code&gt;minItems: 1&lt;/code&gt; on materials, &lt;code&gt;maxItems: 0&lt;/code&gt; on purchases at ₹0.&lt;/p&gt;

&lt;p&gt;Six sprints. Honest version: the model was the hard part, the validation was the work — and three sprints in, the pipeline looked finished and failed &lt;strong&gt;every&lt;/strong&gt; real request. I only found out because I finally pointed a real model at it. Four sprints of very confident documentation, none of it observed.&lt;/p&gt;

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

&lt;p&gt;Because the refusal model &lt;em&gt;is&lt;/em&gt; the product, and a closed API can't support it honestly.&lt;/p&gt;

&lt;p&gt;An app whose promise is "don't recommend what I can't build" is an app whose credibility lives in what it admits it doesn't know. No key means no floor on cost. No rate limit means no floor on latency. Lose signal and the feature is simply gone. This one works on a plane, costs nothing per idea, and needs no account.&lt;/p&gt;

&lt;p&gt;Owning the stack also bought me permission to be honest. My README's first section is &lt;strong&gt;Known limitations&lt;/strong&gt;: &lt;code&gt;no sharp tools&lt;/code&gt; fails two times in three, the model is nondeterministic, nothing above ₹0 is price-verified, and nothing checks whether a project is actually buildable.&lt;/p&gt;

&lt;p&gt;A closed API rewards a smooth happy-path demo. I'd rather ship something that fails loudly and tells you exactly why.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>WalkQuest: The AI That Ghosts You (So You Can Touch Grass) 🌿</title>
      <dc:creator>Shashwat Sinha</dc:creator>
      <pubDate>Wed, 07 Oct 2026 11:25:09 +0000</pubDate>
      <link>https://dev.to/shashwatsinha03/walkquest-the-ai-that-ghosts-you-so-you-can-touch-grass-1bh2</link>
      <guid>https://dev.to/shashwatsinha03/walkquest-the-ai-that-ghosts-you-so-you-can-touch-grass-1bh2</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week1-2026-10-05"&gt;Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  WalkQuest 🌿
&lt;/h1&gt;

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

&lt;p&gt;&lt;strong&gt;An AI that creates a reason to go outside — then shuts up and gets out of your way.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;WalkQuest is a local-first micro-app that uses a tiny open-weight model (Gemma 3 1B) to generate a personalized outdoor quest based on how much time you have, your mood, and where you're headed. You read the quest. You click "START WALK." The app explicitly tells you to put your phone away. You go outside. You come back. You optionally jot down one thing you noticed. Done.&lt;/p&gt;

&lt;p&gt;No GPS. No maps. No step counting. No streaks. No notifications. No cloud. No account. No data leaves your machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who is it for?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
People who want a nudge to touch grass but don't want another app demanding their attention. The chronically online. The "I should go for a walk but I'm doomscrolling" crowd. Anyone who appreciates that the best technology is the kind you forget exists.&lt;/p&gt;


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

&lt;p&gt;&lt;strong&gt;No deployed link. That's the point.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;WalkQuest runs entirely on your laptop. Here's the 30-second demo flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────────────────────┐
│  WALKQUEST 🌿                                               │
│  A tiny AI-generated reason to go outside.                  │
├─────────────────────────────────────────────────────────────┤
│  How much time?    [15 min] [30 min] [60 min]               │
│  What's your mood? [Relaxed] [Bored] [Stressed] [Energetic] │
│  Where?            [Park] [Campus] [Neighborhood] [Anywhere]│
│                                                             │
│  [ Generate My Quest ]           ← One local LLM call       │
└─────────────────────────────────────────────────────────────┘
                            ↓
┌─────────────────────────────────────────────────────────────┐
│  🌿 YOUR QUEST: "The Crack in the Sidewalk"                 │
│  30 minutes                                                 │
│  1. Find three different textures underfoot.                │
│  2. Walk a block you usually skip.                          │
│  3. Stand still for 60 seconds. Just listen.                │
│  4. Spot something growing where it "shouldn't."            │
│  FINISH: What made you smile?                               │
│                                                             │
│  [ 🌿 START WALK ]                                          │
└─────────────────────────────────────────────────────────────┘
                            ↓
┌─────────────────────────────────────────────────────────────┐
│                    🌱 GO.                                   │
│                                                             │
│         Your quest is waiting for you.                      │
│         Put your phone away.                                │
│         Go outside.                                         │
│                                                             │
│         See you when you get back.                          │
│                                                             │
│                    [ I'M BACK 🌿 ]                          │
└─────────────────────────────────────────────────────────────┘
                            ↓
┌─────────────────────────────────────────────────────────────┐
│  🌿 WELCOME BACK                                            │
│  You went outside. That's the point.                        │
│  How did it feel?  [GREAT] [GOOD] [MEH]                     │
│  What did you notice? [________________________]            │
│  [ FINISH QUEST ]                                           │
└─────────────────────────────────────────────────────────────┘
                            ↓
┌─────────────────────────────────────────────────────────────┐
│  🌱 NICE.                                                   │
│  You noticed: "the moss between sidewalk cracks"            │
│  That's enough. You went outside.                           │
│                                                             │
│  [ New Quest ]                                              │
└─────────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Try it yourself:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama pull gemma3:1b
ollama serve
python &lt;span class="nt"&gt;-m&lt;/span&gt; venv .venv &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;source&lt;/span&gt; .venv/bin/activate
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
streamlit run app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






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

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/ShashwatSinha03/HF_TouchGrass" rel="noopener noreferrer"&gt;https://github.com/ShashwatSinha03/HF_TouchGrass&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WalkQuest/
├── app.py          # Streamlit UI + walk lifecycle (350 lines)
├── llm.py          # Ollama client + prompt engineering (120 lines)
├── requirements.txt# streamlit, requests (that's it)
├── README.md       # Full docs + architecture + offline demo
└── .gitignore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Architecture:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌──────────────┐     HTTP/JSON      ┌──────────────┐
│  Streamlit   │ ─────────────────▶ │   Ollama     │
│    (UI)      │ ◀───────────────── │  (localhost) │
└──────────────┘   Gemma 3 1B       └──────────────┘
       │                                  │
       ▼                                  ▼
  Session State                     Local Model
  (no database)                   (800MB, 1B params)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






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

&lt;p&gt;&lt;strong&gt;The stack is intentionally boring:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gemma 3 1B&lt;/strong&gt; (open-weight, 800MB, runs on CPU/MPS)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ollama&lt;/strong&gt; for local model serving&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streamlit&lt;/strong&gt; for the UI (zero frontend fuss)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;requests&lt;/strong&gt; for the HTTP call&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python&lt;/strong&gt; + &lt;strong&gt;session_state&lt;/strong&gt; for everything else&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;No frameworks. No LangChain. No vector DB. No RAG. No agents.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Just one carefully crafted prompt → one HTTP POST → one structured response.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The prompt engineering is where the magic lives:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;7 challenge categories (Observation, Movement, Exploration, Mindfulness, Play, Creativity, Optional Social)&lt;/li&gt;
&lt;li&gt;Mood-aware energy tuning (Stressed → calming, Bored → playful, Energetic → movement)&lt;/li&gt;
&lt;li&gt;Environment-specific guidance (Park vs Campus vs Neighborhood vs Anywhere)&lt;/li&gt;
&lt;li&gt;Time-aware scoping (15min = 3 simple things, 60min = richer variety)&lt;/li&gt;
&lt;li&gt;Anti-repetition via last-5-quest-titles context&lt;/li&gt;
&lt;li&gt;Explicit safety + screen-free constraints&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The UX philosophy:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Every screen after "START WALK" is designed to be &lt;em&gt;unengaging&lt;/em&gt;. The "Walk Started" screen has one button: "I'M BACK." No timer. No map. No progress bar. The app &lt;em&gt;wants&lt;/em&gt; you to close it.&lt;/p&gt;




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

&lt;p&gt;&lt;strong&gt;Because closed APIs would have ruined this.&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Closed API Approach&lt;/th&gt;
&lt;th&gt;WalkQuest (Open Weight + Local)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;$0.002/call × 1000 users × daily = $$$&lt;/td&gt;
&lt;td&gt;$0 forever&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Requires internet, API key, account&lt;/td&gt;
&lt;td&gt;Works on a plane, in a cabin, offline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Your mood + location + habits logged&lt;/td&gt;
&lt;td&gt;Your data never leaves your machine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model updates break your prompts&lt;/td&gt;
&lt;td&gt;You own the model file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rate limits, quotas, TOS changes&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;ollama pull&lt;/code&gt; and you're current&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"We'll use your data to improve"&lt;/td&gt;
&lt;td&gt;"We don't even have a server"&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Open-weight models made this possible because:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Privacy by architecture, not policy&lt;/strong&gt; — There's no server to leak from.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero marginal cost&lt;/strong&gt; — The 500th quest costs the same as the 1st: electricity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hackability&lt;/strong&gt; — Want a different model? Swap &lt;code&gt;gemma3:1b&lt;/code&gt; for &lt;code&gt;llama3.2:1b&lt;/code&gt; in one line. Want to fine-tune on "better quests"? The weights are yours.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No gatekeepers&lt;/strong&gt; — No approval process, no waitlist, no "enterprise plan" for local inference.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The irony:&lt;/strong&gt; We used AI to build something that &lt;em&gt;reduces&lt;/em&gt; screen time. That only works if the AI lives on the user's device, not in a data center optimizing for engagement. Open weights let the incentive structure align with the human.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Philosophy, In One Line
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;AI generates something useful. You read it. Screen goes away. Real life begins.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you spend less time in WalkQuest, the product is working.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>StudyLens for my tensed sister juggling with her academics</title>
      <dc:creator>Shashwat Sinha</dc:creator>
      <pubDate>Sun, 04 Oct 2026 06:29:54 +0000</pubDate>
      <link>https://dev.to/shashwatsinha03/studylens-for-my-tensed-sister-juggling-with-her-academics-5fd0</link>
      <guid>https://dev.to/shashwatsinha03/studylens-for-my-tensed-sister-juggling-with-her-academics-5fd0</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;
  
  
  StudyLens — A Local-First AI Study Assistant
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Built for:&lt;/strong&gt; My younger sister, who's drowning in lecture PDFs and needs a study tool that works offline, respects her privacy, and doesn't require a $20/month subscription.&lt;/p&gt;




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

&lt;p&gt;StudyLens turns passive reading into active learning — completely on your machine. No API keys, no cloud, no accounts, no telemetry.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Upload a PDF/TXT → Get:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🧠 Understand&lt;/strong&gt; — Ask questions, get grounded answers with citations from your material&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📚 Revise&lt;/strong&gt; — One-click structured revision sheet (concepts, key terms, relationships, "remember" facts, common confusions)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🎯 Quiz&lt;/strong&gt; — 5 or 10 mixed MCQ/short-answer questions, auto-scored with weak-area identification&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⏱️ Exam Mode&lt;/strong&gt; — "I have 30 minutes" → prioritized study plan (Must Know / Good to Know / Skim) with time estimates&lt;/li&gt;
&lt;/ul&gt;




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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama pull gemma3:1b
ollama serve
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
streamlit run app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Opens at &lt;code&gt;http://localhost:8501&lt;/code&gt; — works on any machine that runs Python + Ollama (tested on macOS, Linux, Windows).&lt;/p&gt;




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

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/ShashwatSinha03/HF_BuildForAFriend" rel="noopener noreferrer"&gt;github.com/ShashwatSinha03/HF_BuildForAFriend&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;study-lens/
├── app.py          # Streamlit UI + orchestration
├── llm.py          # Ollama client + prompts + robust JSON parsing
├── document.py     # PDF/TXT extraction + keyword retrieval
├── requirements.txt
└── README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






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

&lt;p&gt;&lt;strong&gt;Stack:&lt;/strong&gt; Python • Streamlit • Ollama • Gemma 3 1B • PyPDF • Requests&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture decisions that matter:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Constraint&lt;/th&gt;
&lt;th&gt;Solution&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;No cloud/API keys&lt;/td&gt;
&lt;td&gt;Local Ollama + Gemma 3 1B (815MB)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Small model, unreliable JSON&lt;/td&gt;
&lt;td&gt;Multi-strategy parser (standard → trailing-comma fix → duplicate-key removal → regex fallback)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No embeddings/vector DB&lt;/td&gt;
&lt;td&gt;Lightweight keyword-overlap retrieval (TF-IDF-inspired, ~30% of doc sent to LLM)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Limited compute&lt;/td&gt;
&lt;td&gt;Single LLM call per action; batch short-answer eval; conservative token limits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Privacy-first&lt;/td&gt;
&lt;td&gt;Zero network calls except localhost:11434; session-only state&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Sprint-based development&lt;/strong&gt; (6 sprints over 3 days):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Foundation — upload, extraction, session state, Ollama health checks&lt;/li&gt;
&lt;li&gt;Explain — grounded Q&amp;amp;A with retrieval&lt;/li&gt;
&lt;li&gt;Revise — structured revision sheets&lt;/li&gt;
&lt;li&gt;Quiz — MCQ + short answer, batch evaluation, weak areas&lt;/li&gt;
&lt;li&gt;Exam Mode — time-bounded prioritization&lt;/li&gt;
&lt;li&gt;Polish — robust parsing, error UX, README, .gitignore&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;&lt;strong&gt;This project exists because of open weights and local inference.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If I'd used a closed API:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❌ &lt;strong&gt;Cost&lt;/strong&gt; — $20/month per user minimum&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Privacy&lt;/strong&gt; — lecture notes sent to third parties&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Offline&lt;/strong&gt; — no studying on planes, in libraries, or with spotty campus WiFi&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Customization&lt;/strong&gt; — can't tweak prompts, retrieval, or model behavior&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Longevity&lt;/strong&gt; — API deprecation, price hikes, or service shutdown kills the tool&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;With Gemma 3 1B + Ollama:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Free forever&lt;/strong&gt; — runs on hardware she already owns&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Private&lt;/strong&gt; — her notes never leave her machine&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Offline-first&lt;/strong&gt; — works anywhere&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Hackable&lt;/strong&gt; — every prompt, retrieval strategy, and UI decision is in plain Python&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Sustainable&lt;/strong&gt; — no vendor lock-in; model runs as long as Python runs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The "small model" constraints forced better engineering: lightweight retrieval, strict prompting, defensive parsing, batch evaluation. Those are &lt;em&gt;better&lt;/em&gt; patterns that scale up — not compromises.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Friend Test
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Wait, it's actually free? And my PDFs don't get uploaded anywhere? Damn, broski"&lt;/em&gt;&lt;br&gt;&lt;br&gt;
Yep, that's my sister, after using it for her midterms prep&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's the whole point. Open innovation doesn't just lower barriers — it changes what's possible to build for the people you care about.&lt;/p&gt;

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