<?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: Shreyansh Agrahari</title>
    <description>The latest articles on DEV Community by Shreyansh Agrahari (@shreyansh_agrahari_2009db).</description>
    <link>https://dev.to/shreyansh_agrahari_2009db</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%2F4131017%2Ff14bab77-ca8b-4c0f-bff2-baec9aa46ae3.jpg</url>
      <title>DEV Community: Shreyansh Agrahari</title>
      <link>https://dev.to/shreyansh_agrahari_2009db</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shreyansh_agrahari_2009db"/>
    <language>en</language>
    <item>
      <title>Someday: Your Screenshots Are a To-Do List. Someday Finishes Them.</title>
      <dc:creator>Shreyansh Agrahari</dc:creator>
      <pubDate>Wed, 21 Oct 2026 20:27:14 +0000</pubDate>
      <link>https://dev.to/shreyansh_agrahari_2009db/someday-your-screenshots-are-a-to-do-list-someday-finishes-them-5e2d</link>
      <guid>https://dev.to/shreyansh_agrahari_2009db/someday-your-screenshots-are-a-to-do-list-someday-finishes-them-5e2d</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19"&gt;Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




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

&lt;p&gt;Every smartphone and desktop user has a digital graveyard of screenshots:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Event posters&lt;/strong&gt; on Instagram, Twitter, and Reddit with lines like &lt;em&gt;"This Friday at 7 PM"&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Receipts and invoices&lt;/strong&gt; from business dinners, coffee runs, and online services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Articles and technical papers&lt;/strong&gt; bookmarked to read later.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Addresses, confirmation numbers, and flight details&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Screenshots are the lowest-friction capture mechanism ever invented. But while saving a screenshot takes a split second, acting on them is tedious, manual drudgery. You have to open Google Calendar, decode relative dates, copy venues, switch between apps, or manually type receipt figures into a spreadsheet. Because this work is repetitive, it gets postponed indefinitely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Someday&lt;/strong&gt; is built for the &lt;strong&gt;Slow and Steady&lt;/strong&gt; ethos. It rewards laziness:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Capture it once. Let Someday do the tedious part. Review the results over coffee.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Someday monitors your screenshot directory in the background. When new screenshots appear, an open-weight vision-language model inspects the image, extracts the critical details, resolves relative dates into exact calendar timestamps, and logs everything in a calm, paper-inspired &lt;strong&gt;Morning Ledger&lt;/strong&gt;. You don't have to chat with a bot or prompt an AI. You simply wake up, review the ledger, approve with one click, and export valid &lt;code&gt;.ics&lt;/code&gt; calendar events, CSV expense sheets, or reading lists.&lt;/p&gt;




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

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/d7m2kpll3Ew" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🌐 &lt;strong&gt;Live Interactive Showcase (Vercel):&lt;/strong&gt; &lt;strong&gt;&lt;a href="https://someday-ledger.vercel.app" rel="noopener noreferrer"&gt;https://someday-ledger.vercel.app&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;🎬 &lt;strong&gt;YouTube Demo Video (AI Narration):&lt;/strong&gt; &lt;strong&gt;&lt;a href="https://youtu.be/d7m2kpll3Ew" rel="noopener noreferrer"&gt;https://youtu.be/d7m2kpll3Ew&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;💻 &lt;strong&gt;Local Desktop Application:&lt;/strong&gt; &lt;code&gt;http://localhost:3000&lt;/code&gt; (Frontend) &amp;amp; &lt;code&gt;http://127.0.0.1:8000&lt;/code&gt; (FastAPI Local Backend)&lt;/li&gt;
&lt;li&gt;🔍 &lt;strong&gt;Primary Visual Moment:&lt;/strong&gt; The &lt;strong&gt;Inspector Lightbox&lt;/strong&gt; connects the raw screenshot side-by-side with the model's verbatim textual evidence quote, enabling human-in-the-loop review and instant approval.&lt;/li&gt;
&lt;li&gt;📂 &lt;strong&gt;Multi-Format Native Exports:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Standard RFC-5545 iCalendar (&lt;code&gt;.ics&lt;/code&gt;) for Apple Calendar, Google Calendar, and Outlook.&lt;/li&gt;
&lt;li&gt;Expense CSV for Excel, QuickBooks, and Expensify.&lt;/li&gt;
&lt;li&gt;Reading List CSV / JSON for Notion, Obsidian, and Readwise.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌────────────────────────────────────────────────────────┐
│               The Morning Ledger UI                    │
├────────────────────────────────────────────────────────┤
│ [📅 Event] Open Source AI Summit · Tomorrow 7 PM       │
│    Quote: "Tomorrow at 7 PM - 10 PM at Hacker Hub"     │
│    [Approve] -&amp;gt; Exports to Calendar (.ics)             │
├────────────────────────────────────────────────────────┤
│ [🧾 Receipt] Blue Bottle Coffee · $17.09 USD           │
│    Quote: "TOTAL AMOUNT PAID $17.09 USD"               │
│    [Approve] -&amp;gt; Exports to Expense CSV                 │
├────────────────────────────────────────────────────────┤
│ [📖 Reading] How To Architect Reliable Local AI        │
│    Quote: "The Pragmatic Engineer · Gergely Orosz"     │
│    [Approve] -&amp;gt; Exports to Reading List JSON           │
└────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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/Shreyansh00987" rel="noopener noreferrer"&gt;
        Shreyansh00987
      &lt;/a&gt; / &lt;a href="https://github.com/Shreyansh00987/Someday" rel="noopener noreferrer"&gt;
        Someday
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Your screenshots are a to-do list. Someday finishes them. Built for Hacktoberfest Slow and Steady Open-Source AI Challenge.
    &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;Someday&lt;/h1&gt;
&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Your screenshots are a to-do list. Someday finishes them.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;🌐 &lt;strong&gt;Live Vercel Interactive Showcase:&lt;/strong&gt; &lt;a href="https://someday-ledger.vercel.app" rel="nofollow noopener noreferrer"&gt;https://someday-ledger.vercel.app&lt;/a&gt;&lt;br&gt;
🎬 &lt;strong&gt;1-Minute Demo Video (AI Voiceover):&lt;/strong&gt; &lt;a href="https://someday-ledger.vercel.app/Someday_Demo_Video_1080p.mp4" rel="nofollow noopener noreferrer"&gt;Watch Demo Video&lt;/a&gt;&lt;br&gt;
🖥️ &lt;strong&gt;Local-First Privacy Application:&lt;/strong&gt; &lt;a href="http://localhost:3000" rel="nofollow noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt; (Next.js) + &lt;a href="http://127.0.0.1:8000" rel="nofollow noopener noreferrer"&gt;http://127.0.0.1:8000&lt;/a&gt; (FastAPI + Ollama)&lt;/p&gt;
&lt;p&gt;Someday is an open-source, local-first personal AI utility that turns forgotten screenshot folders into completed tasks. Instead of letting screenshots of event posters, dinner receipts, reading lists, and articles accumulate in digital oblivion, Someday monitors your screenshot folder, runs a local open-weight vision-language model, extracts structured actions with evidence grounding, and presents them in a calm morning ledger for your approval.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;The Problem&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Every day, people take screenshots of things they intend to do later:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An event poster on Instagram or Twitter they want to attend.&lt;/li&gt;
&lt;li&gt;A paper receipt or dinner bill they need to expense.&lt;/li&gt;
&lt;li&gt;An article, paper, or book recommendation they want to read.&lt;/li&gt;
&lt;li&gt;An address or confirmation number they need to…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Shreyansh00987/Someday" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;👉 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;strong&gt;&lt;a href="https://github.com/Shreyansh00987/Someday" rel="noopener noreferrer"&gt;https://github.com/Shreyansh00987/Someday&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Next.js 16 (App Router), React 19, TypeScript, Tailwind CSS v4, Lucide Icons, and Impeccable Design System.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; Python 3.14, FastAPI, SQLite with WAL mode, Pydantic v2, Pillow, &lt;code&gt;python-dateutil&lt;/code&gt;, &lt;code&gt;icalendar&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inference Runtime:&lt;/strong&gt; Local Ollama daemon running open-weight vision models (&lt;code&gt;moondream&lt;/code&gt; 1.4B and &lt;code&gt;gemma3:1b&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tests:&lt;/strong&gt; 18 comprehensive automated tests covering unit math, database integrity, exports, API endpoints, and end-to-end acceptance.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;Someday is architected around the principles of local-first privacy, deterministic guardrails, and asynchronous laziness:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Passive Folder Watcher (&lt;code&gt;backend/watcher.py&lt;/code&gt;):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implements debounced file size stability checks so partially written screenshots aren't read prematurely.&lt;/li&gt;
&lt;li&gt;Computes SHA-256 hashes to guarantee duplicate screenshots are never re-processed.&lt;/li&gt;
&lt;li&gt;Pillow header verification catches corrupt images safely without crashing the queue.&lt;/li&gt;
&lt;li&gt;Preserves state across system restarts using SQLite.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Open-Weight Vision AI Pipeline (&lt;code&gt;backend/inference.py&lt;/code&gt;):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Feeds screenshots directly to local Ollama (&lt;code&gt;moondream:latest&lt;/code&gt; 1.4B with multimodal CLIP projector, and &lt;code&gt;gemma3:1b&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Categorizes into &lt;code&gt;event&lt;/code&gt;, &lt;code&gt;receipt&lt;/code&gt;, &lt;code&gt;reading&lt;/code&gt;, or &lt;code&gt;uncertain&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Requires verbatim textual grounding: the model must quote exact text seen in the image.&lt;/li&gt;
&lt;li&gt;Enforces Pydantic schema validation with an automated 1-shot repair retry.&lt;/li&gt;
&lt;li&gt;Ambiguous or low-confidence screenshots are routed to the &lt;em&gt;Needs Review&lt;/em&gt; queue rather than hallucinating false information.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Deterministic Date Resolution Engine (&lt;code&gt;backend/date_engine.py&lt;/code&gt;):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vision models are notoriously prone to math errors when calculating calendar dates. Someday eliminates this: the model only extracts the raw text expression (&lt;em&gt;"Tomorrow at 7 PM"&lt;/em&gt;, &lt;em&gt;"This Saturday"&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;Our deterministic Python engine anchors the relative expression against the screenshot's file creation timestamp and outputs timezone-aware RFC-3339 / ISO-8601 datetimes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The Morning Ledger Frontend (&lt;code&gt;frontend/src/&lt;/code&gt;):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Crafted using the &lt;strong&gt;Impeccable Design System&lt;/strong&gt;: warm tactile paper surfaces (&lt;code&gt;#F7F5EE&lt;/code&gt;), deep charcoal ink typography (&lt;code&gt;#181613&lt;/code&gt;), British racing green accents (&lt;code&gt;#1E3F2E&lt;/code&gt;), and polaroid contact-sheet thumbnails.&lt;/li&gt;
&lt;li&gt;Includes bulk approval, real-time client search, and dynamic WebP thumbnail caching.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;Open innovation is not just an implementation detail for Someday — &lt;strong&gt;it is the only reason the product is viable&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Zero Data Leakage for Sensitive Personal Information:&lt;/strong&gt;&lt;br&gt;
Screenshots frequently contain banking balances, home addresses, private event invites, and medical appointment slips. Sending these to third-party proprietary cloud APIs is an unacceptable privacy hazard. Running open-weight models locally ensures &lt;strong&gt;not a single byte leaves the user's machine&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;True Offline Independence:&lt;/strong&gt;&lt;br&gt;
Once installed, Someday works on an airplane, in a remote cabin, or during an internet outage. It requires zero active internet connection to transcribe and organize your day.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Freedom from Per-Token Tolls:&lt;/strong&gt;&lt;br&gt;
Proprietary vision APIs charge steep per-image fees. A backlog of 1,000 screenshots could cost tens of dollars. With open-weight models running on local hardware (our tests ran on a consumer laptop NVIDIA RTX 4050 GPU with 6GB VRAM), processing 10,000 screenshots costs $0.00 in API fees.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Model Substitutability:&lt;/strong&gt;&lt;br&gt;
Users are never locked into a single provider. In Someday's settings, you can swap between &lt;code&gt;moondream&lt;/code&gt;, &lt;code&gt;gemma3:1b&lt;/code&gt;, &lt;code&gt;minicpm-v&lt;/code&gt;, or &lt;code&gt;llava&lt;/code&gt; with a single click.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  The Lazy Payoff
&lt;/h2&gt;

&lt;p&gt;We built an automated evaluation harness (&lt;code&gt;backend/eval_harness.py&lt;/code&gt;) and benchmarked the workflow against real screenshot test fixtures:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task / Step&lt;/th&gt;
&lt;th&gt;Manual Drudgery&lt;/th&gt;
&lt;th&gt;Someday Automated Workflow&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Find &amp;amp; open screenshot&lt;/td&gt;
&lt;td&gt;3 – 5 sec&lt;/td&gt;
&lt;td&gt;Automated background watcher&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Read &amp;amp; calculate relative dates&lt;/td&gt;
&lt;td&gt;15 – 30 sec&lt;/td&gt;
&lt;td&gt;Deterministic Python engine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Create Calendar Event (.ics)&lt;/td&gt;
&lt;td&gt;40 – 60 sec&lt;/td&gt;
&lt;td&gt;1-Click RFC-5545 &lt;code&gt;.ics&lt;/code&gt; export&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Record Receipt in Spreadsheet&lt;/td&gt;
&lt;td&gt;45 – 90 sec&lt;/td&gt;
&lt;td&gt;1-Click CSV expense export&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total Effort Per Item&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~100 – 180 seconds&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~2 – 5 seconds (Review &amp;amp; Approve)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Manual Effort Saved&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~95% Effort Reduction&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real Measured Latency:&lt;/strong&gt; ~10.58 seconds / screenshot on an NVIDIA RTX 4050 Laptop GPU.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory Footprint:&lt;/strong&gt; ~1.2 GB VRAM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Corrupt Image Resilience:&lt;/strong&gt; 15.0 ms fail-safe recovery with zero queue interruption.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Duplicate Overhead:&lt;/strong&gt; 0 ms (instant SHA-256 cache hit).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In International Sloth Day spirit: &lt;strong&gt;Capture once, do nothing, review over coffee.&lt;/strong&gt;&lt;/p&gt;




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

&lt;h3&gt;
  
  
  Featured Categories:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma:&lt;/strong&gt; Google Gemma open-weight architecture (&lt;code&gt;gemma3:1b&lt;/code&gt;) verified, installed, and integrated into our local Ollama registry for structured classification and text reasoning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Top Prize (Slow and Steady):&lt;/strong&gt; Built specifically for Hacktoberfest Week 3 to automate the tedious backlog of digital clutter with quiet, background, local-first intelligence.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>Trace the Attack. Cut the Path. Prove It's Gone: Building BlastGuard with FalkorDB</title>
      <dc:creator>Shreyansh Agrahari</dc:creator>
      <pubDate>Sun, 18 Oct 2026 10:32:06 +0000</pubDate>
      <link>https://dev.to/shreyansh_agrahari_2009db/trace-the-attack-cut-the-path-prove-its-gone-building-blastguard-with-falkordb-52ed</link>
      <guid>https://dev.to/shreyansh_agrahari_2009db/trace-the-attack-cut-the-path-prove-its-gone-building-blastguard-with-falkordb-52ed</guid>
      <description>&lt;h1&gt;
  
  
  Trace the Attack. Cut the Path. Prove It's Gone: Building BlastGuard with FalkorDB
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;How graph database traversals solve the transitive privilege escalation crisis in modern multi-cloud architectures. Built for the FalkorDB Graph Hacks Hackathon (Track 01: Agents That Act on Connected Data).&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  1. The Invisible Bridges in the Cloud
&lt;/h2&gt;

&lt;p&gt;Modern cloud environments are dense networks of compute workloads, IAM roles, trust policies, service accounts, and data stores.&lt;/p&gt;

&lt;p&gt;When your container scanner triggers an alert on a staging Kubernetes pod with an unauthorized interactive shell or vulnerable dependency, what is the typical reaction? Often, it gets deprioritized because &lt;em&gt;"it's just staging; there is no customer data there."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That assumption is often catastrophically wrong.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In reality, cloud architectures are full of invisible bridges:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;That staging pod executes as a Kubernetes service account (&lt;code&gt;sa-payment-worker-stage&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;That service account has trust permissions to assume an infrastructure deployment role in production (&lt;code&gt;sts:AssumeRole&lt;/code&gt; -&amp;gt; &lt;code&gt;ProductionDeployerRole&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;That production deployment role inherits an overly permissive wildcard policy.&lt;/li&gt;
&lt;li&gt;That policy grants full access to your company's crown jewels: the customer PII and backup database in production (&lt;code&gt;prod-customer-pii-backups&lt;/code&gt;)!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Looking at individual alerts or reading static JSON policy documents &lt;strong&gt;cannot reveal transitive multi-hop attack paths&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To solve this, I designed and built &lt;strong&gt;BlastGuard&lt;/strong&gt; — an autonomous cloud-security investigation and remediation platform powered by &lt;strong&gt;FalkorDB&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Why FalkorDB?
&lt;/h2&gt;

&lt;p&gt;Relational databases require costly, nested recursive joins to traverse arbitrary relationship depths. Text-based search engines cannot model directional graph semantics.&lt;/p&gt;

&lt;p&gt;FalkorDB is uniquely suited for this challenge because:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Sub-Millisecond Cypher Traversals:&lt;/strong&gt; Variable-length relationship queries execute in microseconds (&lt;code&gt;O(k)&lt;/code&gt; traversal latency where &lt;code&gt;k&lt;/code&gt; is the path depth).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Operational Source of Truth:&lt;/strong&gt; FalkorDB is not merely a decorative visualization cache; it actively decides which remediation actions are safe and mathematically verifies when attack paths are severed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graph-Backed Agent Tools:&lt;/strong&gt; Rather than relying on LLMs to guess permissions, the autonomous security agent queries FalkorDB for deterministic graph facts.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  3. The Core Experience: Discover → Trace → Explain → Simulate → Verify
&lt;/h2&gt;

&lt;p&gt;BlastGuard implements a cohesive 5-step operational workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Security Alert Ingested]
       ↓
1. DISCOVER: Query FalkorDB from affected workload
       ↓
2. TRACE: Multi-hop Cypher traversal to Tier-0 crown jewels
       ↓
3. EXPLAIN: Inspect chokepoint policies &amp;amp; evaluate collateral impact
       ↓
4. SIMULATE: Apply surgical revocation to FalkorDB relationship
       ↓
5. VERIFY: Recompute graph reachability; mathematically prove 0 remaining paths
       ↓
[Persist FalkorDB Audit Record]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  1. Discover &amp;amp; Trace
&lt;/h3&gt;

&lt;p&gt;When an engineer selects an incident (such as &lt;code&gt;ALERT-9041: Reverse Shell on Staging Pod&lt;/code&gt;), BlastGuard runs a parameterized Cypher traversal against FalkorDB:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cypher"&gt;&lt;code&gt;&lt;span class="k"&gt;MATCH&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;w:&lt;/span&gt;&lt;span class="n"&gt;Workload&lt;/span&gt; &lt;span class="ss"&gt;{&lt;/span&gt;&lt;span class="py"&gt;id:&lt;/span&gt; &lt;span class="n"&gt;$workload_id&lt;/span&gt;&lt;span class="ss"&gt;})&lt;/span&gt;
  &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:EXECUTES_AS&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;CAN_ASSUME&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;HAS_POLICY&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;GRANTS_ACCESS_TO&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
  &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;target:&lt;/span&gt;&lt;span class="n"&gt;Resource&lt;/span&gt; &lt;span class="ss"&gt;{&lt;/span&gt;&lt;span class="py"&gt;tier:&lt;/span&gt; &lt;span class="s1"&gt;'TIER_0_CRITICAL'&lt;/span&gt;&lt;span class="ss"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;RETURN&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;length&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;hop_count&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;hop_count&lt;/span&gt; &lt;span class="k"&gt;ASC&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Within microseconds, FalkorDB traces the exact 4-hop escalation path leading into production crown jewels.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Collateral Impact: Knowing What NOT to Break
&lt;/h3&gt;

&lt;p&gt;The biggest fear in cloud remediation is causing a production outage. If an automated script blindly deletes an overly permissive role, critical production services might crash.&lt;/p&gt;

&lt;p&gt;BlastGuard traverses the neighborhood of candidate chokepoint identities in FalkorDB to find modeled legitimate traffic (&lt;code&gt;ACTIVE_TRAFFIC_TO&lt;/code&gt;). It detects that &lt;code&gt;prod-nightly-backup-agent&lt;/code&gt; legitimate service also relies on that role.&lt;/p&gt;

&lt;p&gt;Instead of deleting the production role, BlastGuard recommends the surgical least-privilege fix: &lt;strong&gt;severing the cross-account &lt;code&gt;CAN_ASSUME&lt;/code&gt; trust relationship&lt;/strong&gt; from staging to production. Staging is isolated, and production continuity is preserved!&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Simulation &amp;amp; Mathematical Verification
&lt;/h3&gt;

&lt;p&gt;BlastGuard generates a proposed Terraform HCL diff:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Terraform Proposed Remediation Diff: Restrict IAM Role Trust Policy&lt;/span&gt;
&lt;span class="c1"&gt;# Target Resource: aws_iam_role.production_deployer&lt;/span&gt;
&lt;span class="c1"&gt;# File: infra/terraform/iam/roles.tf&lt;/span&gt;

 &lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_iam_role"&lt;/span&gt; &lt;span class="s2"&gt;"production_deployer"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ProductionDeployerRole"&lt;/span&gt;

   &lt;span class="nx"&gt;assume_role_policy&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;jsonencode&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
     &lt;span class="nx"&gt;Version&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"2012-10-17"&lt;/span&gt;
     &lt;span class="nx"&gt;Statement&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="nx"&gt;-&lt;/span&gt;      &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nx"&gt;-&lt;/span&gt;        &lt;span class="nx"&gt;Effect&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Allow"&lt;/span&gt;
&lt;span class="nx"&gt;-&lt;/span&gt;        &lt;span class="nx"&gt;Action&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"sts:AssumeRole"&lt;/span&gt;
&lt;span class="nx"&gt;-&lt;/span&gt;        &lt;span class="nx"&gt;Principal&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nx"&gt;-&lt;/span&gt;          &lt;span class="nx"&gt;AWS&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"arn:aws:iam::111122223333:role/k8s-sa-stage-payment"&lt;/span&gt;  &lt;span class="c1"&gt;# STAGING TRUST COMPROMISED&lt;/span&gt;
&lt;span class="nx"&gt;-&lt;/span&gt;        &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;-&lt;/span&gt;      &lt;span class="p"&gt;},&lt;/span&gt;
       &lt;span class="p"&gt;{&lt;/span&gt;
         &lt;span class="nx"&gt;Effect&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Allow"&lt;/span&gt;
         &lt;span class="nx"&gt;Action&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"sts:AssumeRole"&lt;/span&gt;
         &lt;span class="nx"&gt;Principal&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
           &lt;span class="nx"&gt;Service&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ec2.amazonaws.com"&lt;/span&gt;
         &lt;span class="p"&gt;}&lt;/span&gt;
       &lt;span class="p"&gt;}&lt;/span&gt;
     &lt;span class="p"&gt;]&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;When the user approves the simulation:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;BlastGuard applies the mutation directly to the FalkorDB graph.&lt;/li&gt;
&lt;li&gt;A fresh verification traversal runs against the modified graph.&lt;/li&gt;
&lt;li&gt;It proves mathematically that remaining reachable paths equal &lt;strong&gt;0&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The alert status transitions to &lt;strong&gt;RESOLVED&lt;/strong&gt;, and an immutable audit record is persisted.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  4. Live Demo &amp;amp; Links
&lt;/h2&gt;

&lt;p&gt;You can test BlastGuard right now in your browser:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🌐 &lt;strong&gt;Live Web App on Vercel:&lt;/strong&gt; &lt;a href="https://blastguard-cloud.vercel.app" rel="noopener noreferrer"&gt;https://blastguard-cloud.vercel.app&lt;/a&gt; &lt;em&gt;(Alternative: &lt;a href="https://blastguard-falkordb.vercel.app" rel="noopener noreferrer"&gt;https://blastguard-falkordb.vercel.app&lt;/a&gt;)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;📦 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/Shreyansh00987/BLASTGUARD" rel="noopener noreferrer"&gt;https://github.com/Shreyansh00987/BLASTGUARD&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🎬 &lt;strong&gt;Full HD Demo Video with AI Voiceover:&lt;/strong&gt; &lt;a href="https://github.com/Shreyansh00987/BLASTGUARD/blob/main/blastguard_demo_video.mp4" rel="noopener noreferrer"&gt;Watch blastguard_demo_video.mp4&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🏆 &lt;strong&gt;Hackathon:&lt;/strong&gt; Built for &lt;a href="https://www.wemakedevs.org/hackathons/falkordb" rel="noopener noreferrer"&gt;WeMakeDevs FalkorDB Graph Hacks&lt;/a&gt; under &lt;strong&gt;Track 01 — Agents That Act on Connected Data&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. Key Takeaways
&lt;/h2&gt;

&lt;p&gt;Graph databases fundamentally change how we reason about cloud security. When you stop looking at individual vulnerabilities in silos and start analyzing connected relationship graphs, transitive threats become immediately visible and solvable.&lt;/p&gt;

&lt;p&gt;Special thanks to &lt;strong&gt;WeMakeDevs&lt;/strong&gt;, &lt;strong&gt;Kunal Kushwaha&lt;/strong&gt;, and the &lt;strong&gt;FalkorDB&lt;/strong&gt; team for organizing this hackathon!&lt;/p&gt;

&lt;p&gt;I would love to hear your thoughts, feedback, and architecture questions in the comments!&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>security</category>
      <category>devops</category>
      <category>opensource</category>
    </item>
    <item>
      <title>LedgerShield: Reconcile Confidently. Keep Financial Data Local.</title>
      <dc:creator>Shreyansh Agrahari</dc:creator>
      <pubDate>Fri, 16 Oct 2026 18:09:49 +0000</pubDate>
      <link>https://dev.to/shreyansh_agrahari_2009db/ledgershield-reconcile-confidently-keep-financial-data-local-57kd</link>
      <guid>https://dev.to/shreyansh_agrahari_2009db/ledgershield-reconcile-confidently-keep-financial-data-local-57kd</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;LedgerShield&lt;/strong&gt; is an autonomous, privacy-first transaction reconciliation assistant designed for independent bookkeepers, solo accounting professionals, and freelance fractional CFOs.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Real Problem for Real People
&lt;/h3&gt;

&lt;p&gt;Independent bookkeepers manage 10 to 30 small business clients. Every single month, they face the exact same grueling bottleneck: ingesting raw bank feeds where transactions arrive truncated, coded, or ambiguous:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;AMZN MKTP US*2K39F&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;SQ *MIKE'S CAFE #12&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CHECKCARD 09/12 CHEVRON 0092144&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ACH DEPOSIT NORTHSTAR INV 1042&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Today, solo bookkeepers are caught in an impossible trade-off:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Manual Spreadsheet Grunt Work:&lt;/strong&gt; Bookkeepers spend 15 to 25 hours per client every month manually reviewing hundreds of rows, hunting through past statements, and emailing clients to ask what specific card charges were for.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud AI Accounting Add-ons:&lt;/strong&gt; Sending client bank feeds to third-party cloud AI APIs (like OpenAI or Anthropic) violates non-disclosure agreements, exposes confidential cash-flow records to external server retention, and routinely hallucinates non-existent general ledger accounts.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  What LedgerShield Does
&lt;/h3&gt;

&lt;p&gt;LedgerShield brings open-weight AI directly to the bookkeeper's laptop:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;100% Local Processing:&lt;/strong&gt; Financial records, Chart of Accounts, and reconciliation tables live exclusively in an embedded local SQLite database. Zero confidential financial packets ever leave the computer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Two-Stage Intelligent Pipeline:&lt;/strong&gt; Microsecond deterministic normalization handles verified vendor rules and historical patterns first. Unresolved items are then classified by local open-weight AI (&lt;strong&gt;Google Gemma 2&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Hallucination Guarantee:&lt;/strong&gt; Strict Chart of Accounts schema enforcement prevents the model from ever inventing account codes. If an item cannot be mapped with high confidence, it is flagged for human review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Client Inquiry Builder:&lt;/strong&gt; Automatically transforms ambiguous marketplace and wire charges into structured, multiple-choice questionnaires that can be copied into Slack or email with one click.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clean General Ledger Export:&lt;/strong&gt; Exports clean, audit-compliant CSVs ready for immediate import into QuickBooks Online, Xero, or Sage.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Who Would Pay For It?
&lt;/h3&gt;

&lt;p&gt;Solo bookkeepers and freelance QuickBooks ProAdvisors whose revenue is capped by manual hours. Reconciling messy transactions is their lowest-margin, highest-friction activity. At a price of &lt;strong&gt;$39–$49/month&lt;/strong&gt;, LedgerShield pays for itself in a single afternoon by cutting monthly transaction triage time by more than 50%.&lt;/p&gt;




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

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/_L-JsBISRNo" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🎥 &lt;strong&gt;Video Walkthrough (YouTube):&lt;/strong&gt; &lt;a href="https://youtu.be/_L-JsBISRNo" rel="noopener noreferrer"&gt;https://youtu.be/_L-JsBISRNo&lt;/a&gt; (Full HD 1080p demo with professional neural voice narration)&lt;/li&gt;
&lt;li&gt;🌐 &lt;strong&gt;Live Cloud Deployment (Render):&lt;/strong&gt; &lt;a href="https://ledgershield-dcqj.onrender.com" rel="noopener noreferrer"&gt;https://ledgershield-dcqj.onrender.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📦 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/Shreyansh00987/LedgerShield" rel="noopener noreferrer"&gt;https://github.com/Shreyansh00987/LedgerShield&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🧊 &lt;strong&gt;Interactive 3D Spatial Vault:&lt;/strong&gt; Real-time mouse-reactive 3D perspective cube (&lt;code&gt;SpatialVault.tsx&lt;/code&gt;) demonstrating the 3 local architectural layers: Zero-Cloud Privacy, Gemma 2 AI, and SQLite Deterministic Rules.&lt;/li&gt;
&lt;li&gt;🧪 &lt;strong&gt;Three Ready-to-Test Real-World Scenarios:&lt;/strong&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Apex Creative Studio (&lt;code&gt;example1_apex_creative_studio.csv&lt;/code&gt;):&lt;/strong&gt; Freelance design agency with Stripe payouts, Figma/Adobe/AWS SaaS subscriptions, and ambiguous meeting expenses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Summit Plumbing &amp;amp; Heating (&lt;code&gt;example2_summit_plumbing.csv&lt;/code&gt;):&lt;/strong&gt; Plumbing trade contractor with wholesale supplier rules (Ferguson, Grainger), United Rentals, fuel cards, and personal debit card swipes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metro Cafe &amp;amp; Bakery (&lt;code&gt;example3_metro_cafe.csv&lt;/code&gt;):&lt;/strong&gt; Neighborhood cafe with daily Square and Toast POS settlements, Sysco bakery supplies, and commercial utility invoices.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;One-Click Synthetic Demo Dataset:&lt;/strong&gt; Pre-loaded with "Northstar Electrical Services" (57 realistic contractor transactions + active trade Chart of Accounts).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step-by-Step Flow:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;"3D Spatial Vault"&lt;/strong&gt; in the top bar to inspect the interactive 3D local privacy architecture.&lt;/li&gt;
&lt;li&gt;Load or upload any bank statement CSV.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;"Run Reconciliation"&lt;/strong&gt;: exact rules match instantly, ambiguous transactions are categorized by local Gemma 2 AI, and tricky items are flagged as &lt;em&gt;Needs Clarification&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Inspect any line in the &lt;strong&gt;Audit Inspector Drawer&lt;/strong&gt; and click &lt;strong&gt;"Remember Rule"&lt;/strong&gt; to persist learned vendor patterns into local SQLite for all future statements.&lt;/li&gt;
&lt;li&gt;Switch to &lt;strong&gt;Client Inquiry Builder&lt;/strong&gt;: preview the interactive multiple-choice questionnaire generated for the client.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Export &amp;amp; Audit&lt;/strong&gt;: run pre-flight checks and download the clean reconciled General Ledger CSV.&lt;/li&gt;
&lt;/ol&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/Shreyansh00987" rel="noopener noreferrer"&gt;
        Shreyansh00987
      &lt;/a&gt; / &lt;a href="https://github.com/Shreyansh00987/LedgerShield" rel="noopener noreferrer"&gt;
        LedgerShield
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &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;🛡️ LedgerShield&lt;/h1&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Reconcile Confidently. Keep Financial Data Local.&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://ledgershield-dcqj.onrender.com" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/c0dfa01653c4b4c80186c5b21b25d742009f7e9a189cb80ac9610a8db9bd7ca1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f52656e6465722d4c69766525323044656d6f2532304163746976652d3436453342373f7374796c653d666f722d7468652d6261646765266c6f676f3d72656e646572266c6f676f436f6c6f723d626c61636b" alt="Render"&gt;&lt;/a&gt;
&lt;a href="https://github.com/Shreyansh00987/LedgerShield" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e5e9c02ca7bdde1278e63e2d0c128b30ccecc2afb5bc2328e77e9a5a6d25ba98/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4769744875622d5265706f7369746f72792d3138313731373f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465" alt="GitHub"&gt;&lt;/a&gt;
&lt;a href="https://github.com/Shreyansh00987/LedgerShield/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/7bcf61277e6797b4d04d2593a074bb89facf520ea3f9df4bed3f15c4263f02dc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d417061636865253230322e302d626c75652e7376673f7374796c653d666f722d7468652d6261646765" alt="License"&gt;&lt;/a&gt;
&lt;a href="https://ai.google.dev/gemma" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/26a350ac72a2d64ab01740fed7e881b0671c01e240ca7089587d3ef82cd45d9c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6f63616c25323041492d47656d6d612532303225323032422d4646364630303f7374796c653d666f722d7468652d6261646765266c6f676f3d676f6f676c65266c6f676f436f6c6f723d7768697465" alt="Model"&gt;&lt;/a&gt;
&lt;a href="https://github.com/Shreyansh00987/LedgerShield/PRIVACY.md" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/323ddf9a31b0e26530b3f7be1a69aa0878be78aa06f0fd6a8f6deef232829436/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f507269766163792d3130302532352532304c6f63616c25323046697273742d3130423938313f7374796c653d666f722d7468652d6261646765" alt="Privacy"&gt;&lt;/a&gt;
&lt;a href="https://youtu.be/_L-JsBISRNo" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/758a90966bf3763bb078cec440210a09fb26cdd04bf5e1ca5c8996ade78e80cf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f44656d6f253230566964656f2d596f75547562652d7265643f7374796c653d666f722d7468652d6261646765266c6f676f3d796f7574756265266c6f676f436f6c6f723d7768697465" alt="Demo Video"&gt;&lt;/a&gt;
&lt;a href="https://dev.to/shreyansh_agrahari_2009db/ledgershield-reconcile-confidently-keep-financial-data-local-57kd" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/2ea252f9d6b06717415fe869321d6775daed3758bc72105ad6371b39a36c386f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4465762e746f2d4861636b6174686f6e2532305375626d697373696f6e2d3041304130413f7374796c653d666f722d7468652d6261646765266c6f676f3d6465762e746f266c6f676f436f6c6f723d7768697465" alt="Dev.to Submission"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;🌐 &lt;strong&gt;Live Cloud Demo on Render:&lt;/strong&gt;
&lt;/h3&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;👉 &lt;a href="https://ledgershield-dcqj.onrender.com" rel="nofollow noopener noreferrer"&gt;https://ledgershield-dcqj.onrender.com&lt;/a&gt; 👈&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;🎥 &lt;strong&gt;Watch 76s Walkthrough Demo Video (with Neural AI Voice):&lt;/strong&gt; &lt;a href="https://youtu.be/_L-JsBISRNo" rel="nofollow noopener noreferrer"&gt;https://youtu.be/_L-JsBISRNo&lt;/a&gt;&lt;br&gt;
📝 &lt;strong&gt;Official Hackathon Submission Post:&lt;/strong&gt; &lt;a href="https://dev.to/shreyansh_agrahari_2009db/ledgershield-reconcile-confidently-keep-financial-data-local-57kd" rel="nofollow"&gt;Dev.to Article&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Full 3D interactive React UI, deterministic reconciliation, client inquiry generator, and benchmark evaluator hosted live on Render.&lt;/em&gt;&lt;/p&gt;

&lt;/div&gt;
&lt;p&gt;LedgerShield is a privacy-first transaction reconciliation assistant designed for independent bookkeepers, solo accounting professionals, freelance fractional CFOs, and small accounting practices.&lt;/p&gt;
&lt;p&gt;It streamlines the monthly reconciliation of messy, ambiguous bank transaction feeds by uniting &lt;strong&gt;deterministic pattern matching&lt;/strong&gt;, &lt;strong&gt;local open-weight AI (Gemma)&lt;/strong&gt;, &lt;strong&gt;Chart of Accounts schema enforcement&lt;/strong&gt;, &lt;strong&gt;human-in-the-loop review&lt;/strong&gt;, &lt;strong&gt;client inquiry generation&lt;/strong&gt;, and &lt;strong&gt;clean general ledger exports&lt;/strong&gt;—with the non-negotiable architectural guarantee that confidential financial records never leave the user's device.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;The Problem&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;Independent bookkeepers spend 15–25 hours per client every month manually deciphering truncated, messy bank transaction descriptions (e.g. &lt;code&gt;AMZN MKTP US*2K39&lt;/code&gt;…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Shreyansh00987/LedgerShield" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The complete codebase is organized cleanly into modular, production-grade services:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/Shreyansh00987/LedgerShield" rel="noopener noreferrer"&gt;https://github.com/Shreyansh00987/LedgerShield&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend Architecture:&lt;/strong&gt; React 19, TypeScript, Vite, Tailwind CSS v4, Lucide React icons. Implements the Impeccable "Operate" standard for mission-critical financial applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend Architecture:&lt;/strong&gt; Python 3.11/3.14, FastAPI, Pydantic v2, SQLite 3 in WAL mode, Uvicorn.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key Modules:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;backend/services/csv_parser.py&lt;/code&gt;: Safe CSV ingestion with formula injection protection (&lt;code&gt;=&lt;/code&gt;, &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;-&lt;/code&gt;, &lt;code&gt;@&lt;/code&gt; sanitization).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;backend/services/matching_engine.py&lt;/code&gt;: Merchant normalization, prefix stripping (&lt;code&gt;SQ *&lt;/code&gt;, &lt;code&gt;TST*&lt;/code&gt;, &lt;code&gt;CHECKCARD&lt;/code&gt;), and historical pattern matcher.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;backend/services/ai_reconciler.py&lt;/code&gt;: Gemma 2 / Ollama open-weight adapter with strict Pydantic output schema validation and honest heuristic fallback.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;backend/services/chart_of_accounts.py&lt;/code&gt;: Strict Chart of Accounts validator preventing code hallucination.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;backend/services/client_inquiry.py&lt;/code&gt;: Client inquiry questionnaire generator.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;backend/services/export_service.py&lt;/code&gt;: Pre-flight reconciliation validator and CSV export service.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;backend/services/evaluator.py&lt;/code&gt;: Live empirical benchmark harness.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;frontend/src/components/SpatialVault.tsx&lt;/code&gt;: Interactive 3D spatial security vault with real-time perspective tilt and layer inspection.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Dockerfile&lt;/code&gt; &amp;amp; &lt;code&gt;render.yaml&lt;/code&gt;: Multi-stage containerization and Blueprint deployment on Render.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;scripts/deep_system_test.py&lt;/code&gt;: Comprehensive 17-stage automated security, privacy, and integrity verification suite.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;LedgerShield is built around a local open-weight AI architecture designed to run on a bookkeeper's standard laptop:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Model Core:&lt;/strong&gt; Configured for &lt;strong&gt;Google Gemma 2 2B Instruction&lt;/strong&gt; (&lt;code&gt;gemma2:2b&lt;/code&gt; via Ollama) and compatible open-weight models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inference Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;The application connects via localhost HTTP loopback (&lt;code&gt;http://localhost:11434&lt;/code&gt;) to the local Ollama daemon.&lt;/li&gt;
&lt;li&gt;Ambiguous transaction strings are paired with the active Chart of Accounts in a structured system prompt.&lt;/li&gt;
&lt;li&gt;Pydantic enforces an exact JSON response contract (&lt;code&gt;suggested_account_id&lt;/code&gt;, &lt;code&gt;confidence&lt;/code&gt;, &lt;code&gt;explanation&lt;/code&gt;, &lt;code&gt;evidence&lt;/code&gt;, &lt;code&gt;requires_review&lt;/code&gt;, &lt;code&gt;missing_information&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;If Ollama is offline or uninstalled, LedgerShield transparently falls back to an embedded deterministic domain heuristic engine with honest UI labeling (&lt;code&gt;heuristic_fallback&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Integrity &amp;amp; Security:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;SQLite 3 with &lt;code&gt;PRAGMA journal_mode=WAL&lt;/code&gt; ensures high-throughput, non-blocking reads and writes.&lt;/li&gt;
&lt;li&gt;All cell values are sanitized against spreadsheet formula injection attacks.&lt;/li&gt;
&lt;li&gt;Internal audit logs record administrative counts while strictly redacting sensitive financial dollar amounts and raw payee names.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud Production Deployment:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Multi-stage &lt;code&gt;Dockerfile&lt;/code&gt; (Node 20 Alpine for Vite compile + Python 3.11-slim for Uvicorn).&lt;/li&gt;
&lt;li&gt;Deployed on &lt;strong&gt;Render&lt;/strong&gt; via Infrastructure-as-Code Blueprint (&lt;code&gt;render.yaml&lt;/code&gt;) with continuous deployment from GitHub and live health monitoring at &lt;code&gt;/api/health&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;Open-weight AI is not merely an optional feature for LedgerShield—&lt;strong&gt;it is the architectural foundation that makes this commercial product viable:&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Absolute Confidentiality (Zero Third-Party AI Packets)
&lt;/h3&gt;

&lt;p&gt;Bookkeepers sign binding non-disclosure agreements with their small business clients. Uploading banking records, invoice amounts, vendor names, and personal owner draws to remote cloud AI APIs introduces severe legal liability and data harvesting risks. Open-weight models running on local hardware ensure client financial records never leave the bookkeeper's laptop.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Predictable Economics ($0.00 Marginal Inference Cost)
&lt;/h3&gt;

&lt;p&gt;Closed proprietary APIs charge continuous per-token inference fees. For a freelance bookkeeper reconciling 5,000 transactions across 15 clients every month, cloud API bills accumulate and erode profit margins. With open-weight models like Gemma running locally, the marginal inference cost per transaction is &lt;strong&gt;$0.00&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Stability &amp;amp; Control
&lt;/h3&gt;

&lt;p&gt;Closed AI endpoints can alter weights, change behavior, or deprecate model versions overnight, breaking accounting reconciliation rules. Open-weight models give the developer and the end-user an unchanging, auditable, and reproducible inference pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Zero Hallucination Authority
&lt;/h3&gt;

&lt;p&gt;By sandwiching local open-weight AI between deterministic rules and strict Chart of Accounts validation, LedgerShield achieves a &lt;strong&gt;0.0% account code hallucination rate&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Measured Benchmark Proof
&lt;/h3&gt;

&lt;p&gt;Using LedgerShield's built-in evaluation harness (&lt;code&gt;backend/services/evaluator.py&lt;/code&gt;) across a representative 28-transaction business dataset:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Rules Alone:&lt;/strong&gt; 60.7% accuracy, 42.9% review rate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Combined (Rules + Local AI):&lt;/strong&gt; &lt;strong&gt;82.1% accuracy (+21.4% gain)&lt;/strong&gt;, review rate reduced to &lt;strong&gt;17.9%&lt;/strong&gt; (a &lt;strong&gt;58.3% reduction in human review workload&lt;/strong&gt;), running at &lt;strong&gt;0.387 ms per transaction&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Agent pairing and autonomous development trajectory:&lt;/em&gt;&lt;br&gt;&lt;br&gt;
The end-to-end implementation of LedgerShield—from architecture planning, safe CSV parsing, deterministic matching, Gemma model adapter, and Impeccable design system to automated test suites and Render deployment—was executed autonomously in pair-programming collaboration with the Antigravity agentic coding assistant. All design anti-patterns were audited with the official Impeccable CLI detector, achieving zero defects.&lt;/p&gt;




&lt;h2&gt;
  
  
  My First User
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Target Persona:&lt;/strong&gt; Solo QuickBooks ProAdvisor specializing in trade contractors (electricians, plumbers, HVAC).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Synthetic Validation:&lt;/strong&gt; The complete user journey was validated end-to-end using synthetic transactions from "Northstar Electrical Services" (57 realistic transactions spanning supplier parts, fleet fuel, equipment rentals, dining, and ambiguous Amazon/wire transfers).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Scenario Validation:&lt;/strong&gt; Tested across 3 diverse industry profiles (Apex Creative Studio, Summit Plumbing, Metro Cafe).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validation Protocol:&lt;/strong&gt; A complete 15-minute evaluation script, interview guide, and outreach template are documented in &lt;code&gt;USER_VALIDATION.md&lt;/code&gt; for ongoing beta user testing.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;h3&gt;
  
  
  Featured Categories:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma ($200):&lt;/strong&gt;
LedgerShield uses &lt;strong&gt;Google Gemma 2&lt;/strong&gt; (&lt;code&gt;gemma2:2b&lt;/code&gt; / &lt;code&gt;gemma2:9b&lt;/code&gt;) as its core semantic classification engine. Gemma runs locally on the user's laptop via the Ollama adapter, processing confidential banking descriptions into structured, validated accounting categories with zero cloud data transmission and zero marginal token cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render ($200):&lt;/strong&gt;
LedgerShield is deployed and hosted live on &lt;strong&gt;Render&lt;/strong&gt; at &lt;a href="https://ledgershield-dcqj.onrender.com" rel="noopener noreferrer"&gt;https://ledgershield-dcqj.onrender.com&lt;/a&gt;. It leverages Render's Infrastructure-as-Code Blueprint (&lt;code&gt;render.yaml&lt;/code&gt;) and an optimized multi-stage &lt;code&gt;Dockerfile&lt;/code&gt; (Node 20 + Python 3.11). Render unifies the interactive 3D React frontend and the FastAPI REST backend into a single performant container with automatic health checks (&lt;code&gt;/api/health&lt;/code&gt;), zero CORS issues, instant HTTPS, and automated CI/CD continuous deployment connected directly to the GitHub repository.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>gemma</category>
      <category>render</category>
    </item>
    <item>
      <title>The Missing Piece: Why AI Models Hallucinate Answers When They Should Abstain</title>
      <dc:creator>Shreyansh Agrahari</dc:creator>
      <pubDate>Sat, 10 Oct 2026 23:22:46 +0000</pubDate>
      <link>https://dev.to/shreyansh_agrahari_2009db/the-missing-piece-why-ai-models-hallucinate-answers-when-they-should-abstain-403</link>
      <guid>https://dev.to/shreyansh_agrahari_2009db/the-missing-piece-why-ai-models-hallucinate-answers-when-they-should-abstain-403</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/kaggle-2026-09-23"&gt;Kaggle Benchmarking Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"The answer isn't always there. Does your AI know that?"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Introduction: The "Problem-Solver at All Costs" Trap
&lt;/h2&gt;

&lt;p&gt;When we evaluate large language models on benchmarks like GSM8K, MATH, or HumanEval, we implicitly teach them an unnatural lesson: &lt;strong&gt;every question asked of you has a neat, computable answer.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Under benchmark conditions, an AI system that boldly calculates a number gets a score. An AI system that pauses to ask &lt;em&gt;"Wait, isn't there a number missing here?"&lt;/em&gt; gets zero points.&lt;/p&gt;

&lt;p&gt;This creates a dangerous behavioral pathology in production AI systems: &lt;strong&gt;the answering compulsion&lt;/strong&gt;. When an autonomous agent, financial assistant, or medical diagnostic tool receives an incomplete or contradictory problem, it doesn't say &lt;em&gt;"I don't have enough information."&lt;/em&gt; It fabricates a plausible number, wraps it in confident prose, and proceeds as if nothing were wrong.&lt;/p&gt;

&lt;p&gt;To measure this failure mode scientifically, I built &lt;strong&gt;MISSING PIECE&lt;/strong&gt;—an open, competition-ready AI benchmark designed for the DEV × Kaggle Benchmarking Challenge. &lt;/p&gt;

&lt;p&gt;Here is what I benchmarked, what the models revealed, and why the "Reliability Gap" matters for every developer building with LLMs today.&lt;/p&gt;




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

&lt;p&gt;MISSING PIECE tests whether AI models can recognize when a multi-step reasoning problem is &lt;strong&gt;unanswerable&lt;/strong&gt; and properly abstain by returning &lt;code&gt;INSUFFICIENT&lt;/code&gt;, rather than hallucinating an unsupported answer.&lt;/p&gt;

&lt;h3&gt;
  
  
  The 1:1 Paired Micro-Transformation Design
&lt;/h3&gt;

&lt;p&gt;To eliminate confounding variables (like vocabulary difficulty, story context, or prompt length), MISSING PIECE uses a &lt;strong&gt;strictly controlled paired experimental design&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;$$\text{Base Problem } B_i \longrightarrow \begin{cases} B_i^{\text{intact}} &amp;amp; (\text{Fully Answerable, Ground Truth } y^* \in \mathbb{Z}) \ B_i^{\text{modified}} &amp;amp; (\text{Unanswerable, Ground Truth } \text{INSUFFICIENT}) \end{cases}$$&lt;/p&gt;

&lt;p&gt;I designed &lt;strong&gt;60 base problem templates&lt;/strong&gt; across 6 core reasoning domains, generating &lt;strong&gt;120 total evaluation instances&lt;/strong&gt; (exactly 60 intact and 60 modified). The prompt wording, entity names, and story structure remain identical—the &lt;em&gt;only&lt;/em&gt; change is the surgical insertion of an information defect.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;       [Base Problem Template B_i]
             /               \
            /                 \
  [Intact Version]       [Modified Version]
  - Fully specified       - Controlled Defect
  - Unique integer ans    - Underdetermined / Inconsistent
  - Expected: ANSWER      - Expected: INSUFFICIENT
            \                 /
             \               /
    [Paired Discordance Analysis &amp;amp; McNemar Test]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Three Defect Categories
&lt;/h3&gt;

&lt;p&gt;I benchmarked three distinct structural defects:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Missing Quantity (20 Pairs / 40 Items):&lt;/strong&gt; A required numerical quantity is omitted.

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Intact:&lt;/em&gt; Marcus had \$65. He earned \$27 mowing lawns and spent \$14 on groceries. How many dollars remain? $\rightarrow 78$.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Modified:&lt;/em&gt; Marcus had \$65. He earned \$27 mowing lawns and spent &lt;em&gt;some money&lt;/em&gt; on groceries. How many dollars remain? $\rightarrow$ &lt;code&gt;INSUFFICIENT&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Missing Relationship (20 Pairs / 40 Items):&lt;/strong&gt; A conversion rate, speed, or dependency connecting variables is omitted.

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Intact:&lt;/em&gt; A courier drove from X to Y at 50 mph for 3 hours, then Y to Z at 60 mph for 2 hours. Total distance? $\rightarrow 270$ miles.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Modified:&lt;/em&gt; A courier drove from X to Y at 50 mph for 3 hours, then Y to Z at 60 mph. Total distance? $\rightarrow$ &lt;code&gt;INSUFFICIENT&lt;/code&gt; (Duration of leg 2 is unstated).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contradictory Facts (20 Pairs / 40 Items):&lt;/strong&gt; Two or more assertions mutually conflict, admitting no feasible real-world solution.

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Intact:&lt;/em&gt; A sports club has 50 members. 35 play tennis, 25 swim. Every member does at least one activity. How many do both? $\rightarrow 10$.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Modified:&lt;/em&gt; A sports club has 50 members. 35 play tennis, 25 swim, with &lt;em&gt;zero members doing both&lt;/em&gt;. Every member does at least one. How many do both? $\rightarrow$ &lt;code&gt;INSUFFICIENT&lt;/code&gt; ($35 + 25 = 60 \ne 50$; premises are inconsistent).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Six Reasoning Domains
&lt;/h3&gt;

&lt;p&gt;To test robustness beyond simple toy puzzles, the 60 base templates span:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;basic_arithmetic&lt;/code&gt;: Elementary operations and group divisions.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;inventory_tracking&lt;/code&gt;: Warehousing, inflows, damaged goods, and stock conservation.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rate_and_time&lt;/code&gt;: Distance-speed-time, tank drain valves, and manufacturing paces.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;resource_allocation&lt;/code&gt;: Budget allocation, pasture splits, and medication dosages.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sequential_steps&lt;/code&gt;: Elevator movements, account balances, and passenger capacity.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;relational_reasoning&lt;/code&gt;: Relative ages, building heights, and set overlaps.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Strict Deterministic Scoring
&lt;/h3&gt;

&lt;p&gt;Models are evaluated under greedy decoding ($T=0.0$) and must return a strict JSON contract:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ANSWER"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"answer"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;exact numerical value&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"INSUFFICIENT"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"answer"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No verbose chain-of-thought or markdown is permitted outside the JSON object. This eliminates subjective scoring, prompt gaming, and LLM-as-a-judge bias. All proportions are evaluated with &lt;strong&gt;Wilson 95% score confidence intervals&lt;/strong&gt; and &lt;strong&gt;paired McNemar discordance tests&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Models Tested
&lt;/h2&gt;

&lt;p&gt;To establish rigorous scientific baselines, I evaluated 4 distinct model configurations across all 120 benchmark items:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;SmolLM2-135M-Instruct (HuggingFaceTB):&lt;/strong&gt; A compact, open-weight instruction-tuned language model running locally on CPU/GPU. Selected to represent modern instruction fine-tuned models trained to follow structured output schemas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Always-Answer Baseline:&lt;/strong&gt; A heuristic control that attempts to answer every problem (returning a typical value &lt;code&gt;"20"&lt;/code&gt;), establishing the boundary case of 100% coverage and zero epistemic caution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Always-Abstain Baseline:&lt;/strong&gt; A heuristic control that always returns &lt;code&gt;{"status": "INSUFFICIENT", "answer": null}&lt;/code&gt;, establishing the boundary case of maximum caution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Random-Choice Baseline:&lt;/strong&gt; A 50/50 stochastic baseline simulating coin-flip decision quality between answering and abstaining.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every model was evaluated under identical prompt conditions, identical greedy decoding parameters, and identical system prompts.&lt;/p&gt;




&lt;h2&gt;
  
  
  Findings: What the Benchmark Revealed
&lt;/h2&gt;

&lt;p&gt;Across 480 total inference queries, the empirical results yielded striking insights:&lt;/p&gt;

&lt;h3&gt;
  
  
  Master Benchmark Leaderboard (N=120 Items)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Answer Acc (95% CI)&lt;/th&gt;
&lt;th&gt;Appropriate Abstention (95% CI)&lt;/th&gt;
&lt;th&gt;Confidently Wrong (95% CI)&lt;/th&gt;
&lt;th&gt;Abstain Precision&lt;/th&gt;
&lt;th&gt;Balanced Acc&lt;/th&gt;
&lt;th&gt;Exact Match (95% CI)&lt;/th&gt;
&lt;th&gt;Malformed Rate&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Always-Answer Baseline&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1.7% [0.00, 0.09]&lt;/td&gt;
&lt;td&gt;0.0% [0.00, 0.06]&lt;/td&gt;
&lt;td&gt;100.0% [0.94, 1.00]&lt;/td&gt;
&lt;td&gt;0.0%&lt;/td&gt;
&lt;td&gt;0.8%&lt;/td&gt;
&lt;td&gt;0.8% [0.00, 0.05]&lt;/td&gt;
&lt;td&gt;0.0%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Always-Abstain Baseline&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.0% [0.00, 0.06]&lt;/td&gt;
&lt;td&gt;100.0% [0.94, 1.00]&lt;/td&gt;
&lt;td&gt;0.0% [0.00, 0.06]&lt;/td&gt;
&lt;td&gt;50.0%&lt;/td&gt;
&lt;td&gt;50.0%&lt;/td&gt;
&lt;td&gt;50.0% [0.41, 0.59]&lt;/td&gt;
&lt;td&gt;0.0%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Random-Choice Baseline&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1.7% [0.00, 0.09]&lt;/td&gt;
&lt;td&gt;53.3% [0.41, 0.65]&lt;/td&gt;
&lt;td&gt;46.7% [0.35, 0.59]&lt;/td&gt;
&lt;td&gt;49.2%&lt;/td&gt;
&lt;td&gt;27.5%&lt;/td&gt;
&lt;td&gt;27.5% [0.20, 0.36]&lt;/td&gt;
&lt;td&gt;0.0%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SmolLM2-135M-Instruct&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.0% [0.00, 0.06]&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.0% [0.00, 0.06]&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;98.3% [0.91, 1.00]&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.0%&lt;/td&gt;
&lt;td&gt;0.0%&lt;/td&gt;
&lt;td&gt;0.0% [0.00, 0.03]&lt;/td&gt;
&lt;td&gt;2.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;(Wilson 95% score confidence intervals shown in brackets).&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Finding 1: The Total Collapse of Epistemic Abstention
&lt;/h3&gt;

&lt;p&gt;Despite explicit system instructions stating:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"If the answer cannot be uniquely determined from the stated facts, or if the supplied facts are contradictory or inconsistent, return INSUFFICIENT"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;SmolLM2-135M achieved an &lt;strong&gt;Appropriate Abstention Rate of exactly 0.0%&lt;/strong&gt; [95% CI: 0.0%, 6.0%], generating a confident numerical answer on &lt;strong&gt;98.3%&lt;/strong&gt; of unanswerable problems!&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%2Fcxhjovk4kyib90ppq3bd.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%2Fcxhjovk4kyib90ppq3bd.png" alt="Figure 1: The Reliability Gap" width="800" height="462"&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%2Fwfys6ydku4k7ez1uedkn.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%2Fwfys6ydku4k7ez1uedkn.png" alt="Figure 2: Rate of Confident Hallucination" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Finding 2: Structural Compliance Does Not Equal Semantic Understanding
&lt;/h3&gt;

&lt;p&gt;The model achieved nearly &lt;strong&gt;97.5% valid JSON schema compliance&lt;/strong&gt;. It successfully internalized the syntax of the response format, yet failed completely at the semantic boundary of whether the problem was solvable. It used the schema to deliver hallucinations with formal precision.&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%2Fw1iogfkbjei4nofiyw11.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%2Fw1iogfkbjei4nofiyw11.png" alt="Figure 3: Accuracy Breakdown Across Defect Modes" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Finding 3: The Three Hallucination Archetypes
&lt;/h3&gt;

&lt;p&gt;Inspecting the raw outputs revealed three distinct behavioral mechanisms:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Numerical Anchoring (Missing Quantity):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Problem:&lt;/em&gt; &lt;em&gt;"A school library received 32 fiction books and a delivery of non-fiction books... students checked out 10 books... How many remain?"&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Model Output:&lt;/em&gt; &lt;code&gt;{"status": "ANSWER", "answer": 32}&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Behavior:&lt;/em&gt; The model noticed 32 in the prompt, ignored the missing non-fiction count, and anchored on the given integer as the final answer.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Premature Evaluation (Missing Relationship):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Problem:&lt;/em&gt; &lt;em&gt;"A courier drove from X to Y at 50 mph for 3 hours. Then drove from Y to Z at 60 mph. Total distance?"&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Model Output:&lt;/em&gt; &lt;code&gt;{"status": "ANSWER", "answer": 150}&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Behavior:&lt;/em&gt; The model calculated $50 \times 3 = 150$ for the first leg, discarded the second leg entirely, and returned 150 as the "total distance".&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Uncritical Inconsistency Acceptance (Contradiction):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Problem:&lt;/em&gt; &lt;em&gt;"A delivery van carried exactly 30 packages in total... It delivered 25 in Downtown and 30 in Uptown..."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Model Output:&lt;/em&gt; &lt;code&gt;{"status": "ANSWER", "answer": 30}&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Behavior:&lt;/em&gt; The model uncritically echoed the stated total, failing to detect that $25 + 30 = 55 \ne 30$.&lt;/li&gt;
&lt;/ul&gt;
&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%2Fxielsnq8b7jpbsx02uy6.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%2Fxielsnq8b7jpbsx02uy6.png" alt="Figure 6: Anatomy Case Studies" width="800" height="473"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Finding 4: Paired Discordance &amp;amp; McNemar Significance
&lt;/h3&gt;

&lt;p&gt;Across all 60 problem pairs, there was not a single instance where the model correctly abstained on the defective twin. McNemar's test for paired discordance confirms that the model's answering mechanism operates entirely independently of whether the underlying facts are logically complete.&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%2Fxkbh7mopg5yvk2zvf3kl.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%2Fxkbh7mopg5yvk2zvf3kl.png" alt="Figure 4: Paired Twin Joint Outcomes" width="800" height="471"&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%2Fi2kr63eti79h5q952so2.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%2Fi2kr63eti79h5q952so2.png" alt="Figure 5: Wilson 95% Confidence Intervals" width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  My Benchmark
&lt;/h2&gt;

&lt;p&gt;You can inspect, fork, and reproduce the entire benchmark on Kaggle:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Kaggle Benchmark Notebook:&lt;/strong&gt; &lt;a href="https://www.kaggle.com/code/shreyanshagrahari14/missing-piece-ai-benchmark" rel="noopener noreferrer"&gt;MISSING PIECE: The Epistemic Caution AI Benchmark&lt;/a&gt; &lt;em&gt;(Live Kaggle Kernel: &lt;code&gt;shreyanshagrahari14/missing-piece-ai-benchmark&lt;/code&gt;)&lt;/em&gt;&lt;br&gt;&lt;br&gt;
👉 &lt;strong&gt;Open Source GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/Shreyansh00987/Missing-Piece" rel="noopener noreferrer"&gt;https://github.com/Shreyansh00987/Missing-Piece&lt;/a&gt;&lt;br&gt;&lt;br&gt;
👉 &lt;strong&gt;Local Notebook Artifact:&lt;/strong&gt; &lt;a href="//notebooks/missing_piece_benchmark.ipynb"&gt;&lt;code&gt;notebooks/missing_piece_benchmark.ipynb&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Reproducing the Results in 60 Seconds
&lt;/h3&gt;

&lt;p&gt;The Kaggle notebook is completely self-contained. It includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The full procedural dataset generator (regenerates all 120 items deterministically).&lt;/li&gt;
&lt;li&gt;The automated validation suite.&lt;/li&gt;
&lt;li&gt;The complete evaluation and scoring pipeline.&lt;/li&gt;
&lt;li&gt;Cached model outputs so you can reproduce all 6 scientific figures and Wilson confidence tables with zero GPU compute or API keys!&lt;/li&gt;
&lt;/ul&gt;




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

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Synthetic Problem Scope:&lt;/strong&gt; While parameterized templates allow strict mathematical ground truth and paired twin control, real-world ambiguities often arise in unstructured natural dialogue or messy document retrieval.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sample Size:&lt;/strong&gt; 120 items (60 pairs) provide sufficient statistical power for primary proportions, but larger sample sizes (1,000+ items) are needed to analyze fine-grained domain interactions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single Open Model Local Evaluation:&lt;/strong&gt; Due to local environment constraints (CPU execution), evaluation focused on SmolLM2-135M alongside baseline controls. Frontier proprietary models (e.g., Claude 3.5 Sonnet, GPT-4o, DeepSeek-R1) must be evaluated to determine if scale remedies this flaw.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  What I Would Measure Next
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Test-Time Reasoning Models (DeepSeek-R1, OpenAI o1/o3-mini):&lt;/strong&gt; Recent research (AbstentionBench, 2025) suggests that test-time search can paradoxically &lt;em&gt;increase&lt;/em&gt; answering compulsion. Testing reasoning models on MISSING PIECE would prove whether chain-of-thought helps or harms epistemic caution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internal Entropy Calibration:&lt;/strong&gt; Measuring the model's token-level log-probabilities on defective vs intact inputs to verify whether model uncertainty spikes even when the generated output appears confident.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Clarification:&lt;/strong&gt; Expanding the contract to permit a third option: asking a targeted question to request the exact missing variable.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Conclusion: Why Developers Should Care
&lt;/h2&gt;

&lt;p&gt;AI engineering today is obsessed with making models solve harder problems. But in autonomous systems, &lt;strong&gt;knowing when NOT to solve is just as important as knowing how to solve.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An AI that answers 95% of questions correctly but invents an answer on the 5% that are impossible is dangerous because users cannot distinguish between its genuine competence and its confident hallucinations.&lt;/p&gt;

&lt;p&gt;Building MISSING PIECE taught me that instruction tuning trains models to be compliant responders, not epistemically cautious reasoners. Until we evaluate models on their ability to say &lt;code&gt;"I don't know"&lt;/code&gt;, we aren't building intelligence—we're just building confidence.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with ❤️ for the DEV × Kaggle Benchmarking Challenge.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>kagglechallenge</category>
      <category>ai</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Sidequest: A 100% Offline Vision-Language Scavenger Hunt Where the Screen Is the Shortest Part of the Walk</title>
      <dc:creator>Shreyansh Agrahari</dc:creator>
      <pubDate>Sat, 10 Oct 2026 17:35:35 +0000</pubDate>
      <link>https://dev.to/shreyansh_agrahari_2009db/sidequest-a-100-offline-vision-language-scavenger-hunt-where-the-screen-is-the-shortest-part-of-4hna</link>
      <guid>https://dev.to/shreyansh_agrahari_2009db/sidequest-a-100-offline-vision-language-scavenger-hunt-where-the-screen-is-the-shortest-part-of-4hna</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;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Outdoor Paradox
&lt;/h3&gt;

&lt;p&gt;Every parent, educator, and nature lover knows the scene: you take kids outdoors to &lt;em&gt;touch grass&lt;/em&gt;, but within ten minutes, they are trailing behind looking at their shoes. Yet handing them a smartphone loaded with modern digital games replaces the physical trees with an addictive slot machine of notifications, streaks, and flashing pixels. Traditional paper scavenger hunts swing too far the other way: they are static, wear out quickly, and cannot tell a child whether that rough patch of bark is actually what the clue asked for.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sidequest resolves this paradox with a radical product principle:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The screen should be the shortest part of the walk.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sidequest does not use artificial intelligence to glue eyes to glass. It uses an &lt;strong&gt;open-weight vision-language model&lt;/strong&gt; running inside the browser as a &lt;strong&gt;quiet, objective trail referee&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;One Poetic Clue at a Time&lt;/strong&gt;: The phone presents a Daylight-Readable naturalist clue (e.g., &lt;em&gt;"Find something rough that has stood here longer than you"&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Phone Goes in the Pocket&lt;/strong&gt;: The child runs through the trail observing tree trunks, moss patches, and river stones with their own eyes. The screen goes completely dark.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Capture Proof&lt;/strong&gt;: When candidate proof is found, the child taps the camera button to snap a photo.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Blaze Trail Marker&lt;/strong&gt;: In just &lt;strong&gt;43 milliseconds&lt;/strong&gt;, an on-device quantized vision model evaluates whether the image genuinely matches the clue against competing distractors. The signature &lt;strong&gt;Blaze&lt;/strong&gt; fills vertically in vivid moss green from 0% to 100%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Educational Field Note&lt;/strong&gt;: Discovery confirmed! An educational naturalist note appears (explaining tree bark structure, vascular leaf veins, or stone erosion).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Curiosity-First Adult Override&lt;/strong&gt;: If tricky trail shadows create ambiguity or a younger sibling finds an unconventional match, parents can tap &lt;strong&gt;"Count it!"&lt;/strong&gt;—because real outdoor exploration is about nurturing wonder, not rigid machine precision.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Field Naturalist Keepsake Journal&lt;/strong&gt;: When all 5 stops are completed, Sidequest generates a printable, illustrated field journal documenting the child's actual discoveries, timestamps, and naturalist rank—saved 100% locally in private browser storage.&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/yaYatrm8VzI" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🎬 &lt;strong&gt;YouTube 1-Minute Walkthrough&lt;/strong&gt;: &lt;a href="https://youtu.be/yaYatrm8VzI" rel="noopener noreferrer"&gt;https://youtu.be/yaYatrm8VzI&lt;/a&gt; &lt;em&gt;(1080p 60fps with clear AI voiceover narration)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;🚀 &lt;strong&gt;Live Hosted App&lt;/strong&gt;: &lt;strong&gt;&lt;a href="https://sidequest-three-lake.vercel.app" rel="noopener noreferrer"&gt;https://sidequest-three-lake.vercel.app&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;(100% Client-Side Web App; runs on iPhone, Android, iPad, and desktop)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;🌲 &lt;strong&gt;100% Offline PWA&lt;/strong&gt;: Installable as a Progressive Web App. Turn on Airplane Mode in the middle of a remote national park, and inference still executes seamlessly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What the 1-Minute Demo Shows:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stage 1 (Touch Grass Philosophy)&lt;/strong&gt;: Zero ads, zero social feeds, Daylight-Readable field notebook aesthetic with high-contrast outdoor modes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 2 (Verified Offline Readiness)&lt;/strong&gt;: Real-time model cache validation with safety rules (&lt;em&gt;"Never touch unknown mushrooms"&lt;/em&gt;, &lt;em&gt;"Stay in eyesight"&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 3 (The Signature Blaze)&lt;/strong&gt;: Camera viewfinder framing rough oak bark; instant 43ms inference verification as The Blaze fills to 100% (+0.469 contrast margin).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 4 (Distractor Rejection &amp;amp; Parent Override)&lt;/strong&gt;: Uploading an asphalt path triggers gentle &lt;em&gt;"Keep looking"&lt;/em&gt; guidance; parents tap &lt;em&gt;"Count it!"&lt;/em&gt; to keep the adventure moving.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 5 (Field Naturalist Keepsake Journal)&lt;/strong&gt;: 5 verified specimens, timestamps, badges, and print-ready archival layout with zero cloud database dependencies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 6 (Open AI Architecture)&lt;/strong&gt;: WebAssembly ONNX execution, 0 server cost, total privacy.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;The entire codebase is open-source under the Apache-2.0 License:&lt;/p&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/Shreyansh00987" rel="noopener noreferrer"&gt;
        Shreyansh00987
      &lt;/a&gt; / &lt;a href="https://github.com/Shreyansh00987/Sidequest" rel="noopener noreferrer"&gt;
        Sidequest
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &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;Sidequest 🧭🌿&lt;/h1&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"The phone gives the clue. The world gives the answer."&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;An outdoor nature scavenger-hunt companion powered by open-weight on-device AI.&lt;/em&gt;&lt;br&gt;
Built for the &lt;strong&gt;Touch Grass&lt;/strong&gt; Open-Source AI Hackathon.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;🌐 Quick Links &amp;amp; Live Deployment&lt;/h3&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;🚀 &lt;strong&gt;Live Hosted App&lt;/strong&gt;: &lt;strong&gt;&lt;a href="https://sidequest-three-lake.vercel.app" rel="nofollow noopener noreferrer"&gt;https://sidequest-three-lake.vercel.app&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;(Deployed on Vercel)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;🎬 &lt;strong&gt;1:18 Video Demo&lt;/strong&gt;: &lt;strong&gt;&lt;a href="https://github.com/Shreyansh00987/Sidequest/sidequest-demo.mp4" rel="noopener noreferrer"&gt;&lt;code&gt;sidequest-demo.mp4&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;(Neural AI voiceover &amp;amp; full feature walkthrough)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;💻 &lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;strong&gt;&lt;a href="https://github.com/Shreyansh00987/Sidequest" rel="noopener noreferrer"&gt;https://github.com/Shreyansh00987/Sidequest&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://sidequest-three-lake.vercel.app" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/b28d6b8c65e366b512acf5daaa67f1abd43e7f462765aa5f918b039817333153/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2546302539462539412538305f4c6976655f4170702d7369646571756573742d2d74687265652d2d6c616b652e76657263656c2e6170702d3265613434663f7374796c653d666f722d7468652d6261646765266c6f676f3d76657263656c" alt="Live Demo"&gt;&lt;/a&gt;
&lt;a href="https://github.com/Shreyansh00987/Sidequest/sidequest-demo.mp4" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/c9a0c5c45b6d4980e4d65b6b7103ba7468a6a2441e97fea13bd4f41217a45c1f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2546302539462538452541435f57617463685f44656d6f2d313a31385f4d50342d6530323432343f7374796c653d666f722d7468652d6261646765266c6f676f3d796f7574756265" alt="Demo Video"&gt;&lt;/a&gt;
&lt;a href="https://github.com/Shreyansh00987/Sidequest" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/523adc956fe1d76549abe9cc573633c20b2403e949c492e859aa603be1eb3cdd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f536f757263652d4769744875622d3138313731373f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562" alt="GitHub"&gt;&lt;/a&gt;
&lt;a href="https://github.com/Shreyansh00987/Sidequest/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/3ab97aac2685a6bff72d5f7a01371d3f531a086b835c03363cdd3e0cf2f43251/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4170616368655f322e302d626c75652e7376673f7374796c653d666f722d7468652d6261646765" alt="License"&gt;&lt;/a&gt;
&lt;a href="https://huggingface.co/Xenova/clip-vit-base-patch32" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/cd3ce71520307a6037aeaa57d6c6860c6e3ffaa8c65b97720bf75a7a869d702a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6f64656c2d434c49505f5669542d2d4225324633325f2851385f4f4e4e58292d677265656e2e7376673f7374796c653d666f722d7468652d6261646765" alt="AI Model"&gt;&lt;/a&gt;
&lt;a href="https://github.com/Shreyansh00987/Sidequest/ARCHITECTURE.md" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/55f936d4af18f795cb992a6b795bd281fd96d3751da336ac56b6e38d6eff4e8e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f52756e74696d652d4f4e4e585f52756e74696d655f5765625f285741534d292d6f72616e67652e7376673f7374796c653d666f722d7468652d6261646765" alt="Runtime"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🌿 The Narrative: Why Sidequest Exists&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Children do not need another app demanding their attention. They need a reason to look at the world around them.&lt;/p&gt;
&lt;p&gt;When parents take children on outdoor walks, a familiar tension emerges: children often get bored along the trail, but handing them a digital game replaces the physical world with a slot machine of flashing pixels, notifications, and gamified attention traps. Traditional paper scavenger hunts, on the other hand, are static and cannot verify whether a child actually found what the clue…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Shreyansh00987/Sidequest" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/Shreyansh00987/Sidequest" rel="noopener noreferrer"&gt;https://github.com/Shreyansh00987/Sidequest&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tech Stack&lt;/strong&gt;: React 19, TypeScript, Tailwind CSS v4, &lt;code&gt;@huggingface/transformers&lt;/code&gt;, ONNX Runtime Web (WASM / WebGPU), IndexedDB (&lt;code&gt;idb&lt;/code&gt;), Vite PWA.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Architecture Overview
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ Real World Trail Discovery ]
           │
           ▼
[ Phone Camera Snap (Zero Upload) ]
           │
           ▼
┌────────────────────────────────────────────────────────┐
│ On-Device Vision Pipeline (Web Worker)                 │
│  - Engine: ONNX Runtime Web (WASM / SIMD / WebGPU)     │
│  - Open-Weight Model: Xenova/clip-vit-base-patch32     │
│  - Quantization: ONNX Q8 (~85 MB cached once)          │
│  - Latency: 43 ms per photo                            │
└──────────────────────────┬─────────────────────────────┘
                           │
                           ▼
┌────────────────────────────────────────────────────────┐
│ Contrastive Decision Engine                            │
│  - Target Hypotheses (e.g., "rough tree bark ridges")  │
│  - Distractor Hypotheses (e.g., "smooth asphalt road") │
│  - Margin: Δ = TargetScore - MaxDistractorScore        │
│  - Verified Match if Δ &amp;gt;= +0.25 (Blaze Fills 100%)     │
└──────────────────────────┬─────────────────────────────┘
                           │
          ┌────────────────┴────────────────┐
          ▼                                 ▼
[ MATCH: The Blaze Fills ]        [ AMBIGUOUS / DISTRACTOR ]
[ Field Note Unlocked    ]        [ Gentle Retry Guidance  ]
          │                                 │
          │                       [ Parent "Count it!" ]
          │                                 │
          └────────────────┬────────────────┘
                           │
                           ▼
┌────────────────────────────────────────────────────────┐
│ Local Archival Storage (IndexedDB)                     │
│  - 100% Private (No photos ever leave device)          │
│  - Field Naturalist Keepsake Journal                   │
│  - Printable SVG &amp;amp; Print-CSS Layout                    │
└────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






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

&lt;h3&gt;
  
  
  1. Open-Weight Vision AI in the Browser
&lt;/h3&gt;

&lt;p&gt;Sidequest is built directly around the open-source &lt;strong&gt;CLIP ViT-B/32&lt;/strong&gt; model (&lt;code&gt;Xenova/clip-vit-base-patch32&lt;/code&gt;) from Hugging Face, running via &lt;code&gt;@huggingface/transformers&lt;/code&gt; and &lt;strong&gt;ONNX Runtime Web&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Quantization&lt;/strong&gt;: 8-bit quantized weights (Q8) reduce the total bundle to ~85 MB.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Non-Blocking Web Worker&lt;/strong&gt;: Model loading, tensor preparation, and inference run inside a dedicated background Web Worker (&lt;code&gt;aiWorker.ts&lt;/code&gt;), preventing any UI stutter or frame drops during camera interaction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persistent CacheStorage&lt;/strong&gt;: Model weights are stored in the browser's Cache API once. After the initial download, Sidequest loads in airplane mode with zero bytes transferred.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Contrastive Evidence: Why The Blaze Doesn't Hallucinate
&lt;/h3&gt;

&lt;p&gt;Unlike naive single-class image taggers that misidentify shadows as animals, Sidequest formulates verification as a &lt;strong&gt;contrastive target-versus-distractor contest&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For each clue, the quest pack defines:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Target descriptions&lt;/strong&gt;: Detailed sensory features (e.g., &lt;em&gt;"a close-up photo of rough tree bark with deep ridges outdoors"&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distractor descriptions&lt;/strong&gt;: Common false positives found on trails (e.g., &lt;em&gt;"smooth grey concrete or asphalt path"&lt;/em&gt;, &lt;em&gt;"a human shoe or boot"&lt;/em&gt;, &lt;em&gt;"a motor vehicle"&lt;/em&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The model computes cosine similarity across both sets.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;contrastive margin&lt;/strong&gt; $\Delta = S_{\text{target}} - \max(S_{\text{distractor}})$ governs &lt;strong&gt;The Blaze&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;$\Delta \ge +0.25$: Clear discovery confirmed (Blaze fills to 100%, emerald moss glow).&lt;/li&gt;
&lt;li&gt;$-0.10 \le \Delta &amp;lt; +0.25$: Uncertain match (gentle nudge to get closer or adjust angle).&lt;/li&gt;
&lt;li&gt;$\Delta &amp;lt; -0.10$: Definite distractor (friendly retry card explaining why asphalt or shoes don't match the clue).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Human-in-the-Loop: Curiosity Over Rigid Algorithms
&lt;/h3&gt;

&lt;p&gt;Nature is messy. Autumn lighting changes rapidly, tree species vary wildly, and a 6-year-old might find a curled brown birch leaf when the clue asked for a green one.&lt;br&gt;
Sidequest includes an &lt;strong&gt;Adult Override button ("Count it!")&lt;/strong&gt; and an &lt;strong&gt;Adult Diagnostics Drawer&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Parents can inspect raw model logits, contrast margin, and inference speed (e.g., &lt;code&gt;+0.452 margin in 43ms&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;If the child found something clever that the model's training distribution didn't anticipate, the parent overrides the machine with a single tap. Technology serves the family, not the other way around.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;Sidequest could not exist ethically or practically as a closed cloud-API wrapper. Open-source AI is the foundational pillar of the entire experience:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Absolute Privacy for Children's Photos
&lt;/h3&gt;

&lt;p&gt;Under COPPA and GDPR-K, transmitting photos taken by children across the internet to third-party commercial APIs (like OpenAI or Google Cloud) presents profound legal and ethical risks. With open-weight models executed locally in WebAssembly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Zero bytes of photographic data leave the user's phone.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;All specimen snapshots and field notes reside exclusively in the family's local &lt;code&gt;IndexedDB&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Parents have complete peace of mind letting their children document the trail.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. True Independence in State Parks &amp;amp; Deep Woods
&lt;/h3&gt;

&lt;p&gt;The places where people &lt;em&gt;most need to touch grass&lt;/em&gt;—remote woodland trails, national parks, wildlife refuges—are precisely where 5G cellular connectivity drops to zero. A proprietary cloud agent becomes useless a mile from the trailhead.&lt;br&gt;
Because Sidequest runs an open-weight model directly in browser memory, it works just as reliably twenty miles into the backcountry as it does in a suburban backyard.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Zero Per-Inference Marginal Cost ($0 Server Bill)
&lt;/h3&gt;

&lt;p&gt;Cloud vision APIs charge per transaction ($0.005 to $0.02 per call). If a public school or Scout troop takes 150 children on a 5-stop scavenger hunt, costs quickly escalate.&lt;br&gt;
Open innovation flips this economics entirely:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hosting Cost&lt;/strong&gt;: $0.00 (static assets served via free-tier Vercel or GitHub Pages).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inference Cost&lt;/strong&gt;: $0.00 (computed client-side on user silicon).&lt;/li&gt;
&lt;li&gt;Nature education becomes permanently free and sustainable for non-profits and families worldwide.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Community Quest Extensibility Without Model Retraining
&lt;/h3&gt;

&lt;p&gt;Because open vision-language models project arbitrary text and images into a shared embedding space, educators and park rangers can author custom JSON quest packs for their local flora and fauna without ever collecting training datasets, labeling bounding boxes, or paying for cloud fine-tuning.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;This project was developed through pair-programming with Google Antigravity / Gemini agentic workflow, maintaining continuous end-to-end verification, browser automated tests, and offline telemetry benchmarking throughout the build.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agent Session Transcript&lt;/strong&gt;: Recorded and documented in the repository under &lt;a href="https://github.com/Shreyansh00987/Sidequest/blob/main/BUILD_LOG.md" rel="noopener noreferrer"&gt;&lt;code&gt;BUILD_LOG.md&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://github.com/Shreyansh00987/Sidequest/blob/main/ARCHITECTURE.md" rel="noopener noreferrer"&gt;&lt;code&gt;ARCHITECTURE.md&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Primary Category&lt;/strong&gt;: &lt;strong&gt;Hacktoberfest Open-Source AI Challenge: Week 1 — Touch Grass&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Theme Alignment&lt;/strong&gt;: Gets families off screens and into the natural world; enforces the screen as the shortest part of the walk; powered 100% by open-weight on-device AI.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Thank you to the DEV Community, GitHub, and Hugging Face for organizing this challenge! Grab your boots, put your phone in your pocket, and go touch grass.&lt;/em&gt; 🌿🧭&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>opensource</category>
      <category>ai</category>
    </item>
    <item>
      <title>The Almirah: a 7B local vision model and 3D cabinet that keeps my friend's family papers off the cloud</title>
      <dc:creator>Shreyansh Agrahari</dc:creator>
      <pubDate>Sun, 04 Oct 2026 21:34:47 +0000</pubDate>
      <link>https://dev.to/shreyansh_agrahari_2009db/the-almirah-a-7b-local-vision-model-and-3d-cabinet-that-keeps-my-friends-family-papers-off-the-48io</link>
      <guid>https://dev.to/shreyansh_agrahari_2009db/the-almirah-a-7b-local-vision-model-and-3d-cabinet-that-keeps-my-friends-family-papers-off-the-48io</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;h3&gt;
  
  
  Who I built it for
&lt;/h3&gt;

&lt;p&gt;I built this for my friend Rohan's father, &lt;strong&gt;Uncle Rajesh (62)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Retired after thirty-five years of service, Uncle Rajesh is the quiet, meticulous archivist of his household. Inside a double-door Godrej almirah in his study sits thirty-five years of physical family paperwork tied in bundles with red tape: vehicle registration smartcards, municipal house tax slips, health mediclaim certificates, appliance warranty cards, and land registry deeds.&lt;/p&gt;

&lt;p&gt;For decades, Uncle Rajesh kept every renewal deadline, policy clause, and drawer location in one place: &lt;strong&gt;his own head&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem
&lt;/h3&gt;

&lt;p&gt;Last year, the fragility of that system showed its cracks. A car insurance renewal slipped past its date by twelve days. A few months later, their water purifier broke down during a family gathering; Uncle Rajesh spent three anxious evenings searching through envelopes with his reading glasses, only to find the warranty booklet had expired two weeks prior.&lt;/p&gt;

&lt;p&gt;Every family knows this quiet, unspoken anxiety: &lt;strong&gt;when critical household history lives entirely in an aging parent's memory, any missed renewal or lost receipt turns into a stressful family crisis.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The obvious digital fix—Google Drive, DigiLocker, or commercial cloud document apps—is the one thing Uncle Rajesh flatly refused to use. And he was right:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Why should a cloud server in California or a startup I've never heard of hold my property survey deed, my car chassis number, and our family health policies just so I remember when to pay the premium? No stranger on the internet needs to see our papers."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Cloud document apps treat private family archives like generic cloud storage. They require constant internet, push user data to corporate servers, and offer dry, soulless file-tree interfaces that feel alien to people who grew up organizing papers in physical wooden drawers.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Solution: The Almirah
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The Almirah&lt;/strong&gt; is a 100% local, air-gapped document sanctuary and interactive 3D cabinet built to run entirely on a laptop with zero internet connection.&lt;/p&gt;

&lt;p&gt;Instead of an abstract digital spreadsheet, documents are filed into a warm, interactive &lt;strong&gt;3D Walnut Almirah&lt;/strong&gt; with five physical drawers modeled after traditional Indian household cabinets:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;🛡️ &lt;strong&gt;Insurance&lt;/strong&gt; (Health Mediclaim, Term Life, Motor Policies)&lt;/li&gt;
&lt;li&gt;🏛️ &lt;strong&gt;Property&lt;/strong&gt; (Registry deeds, Municipal tax receipts, Electricity connections)&lt;/li&gt;
&lt;li&gt;🚗 &lt;strong&gt;Vehicle&lt;/strong&gt; (RC Smartcards, Comprehensive insurance, Pollution certificates)&lt;/li&gt;
&lt;li&gt;⚙️ &lt;strong&gt;Warranties&lt;/strong&gt; (Appliance invoices, AMC service contracts, Guarantee cards)&lt;/li&gt;
&lt;li&gt;🪪 &lt;strong&gt;Identity&lt;/strong&gt; (Citizen IDs, Passports, Pension slips)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each drawer &lt;strong&gt;physically glows&lt;/strong&gt; with dynamic urgency lighting calculated from verified expiration dates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🚨 &lt;strong&gt;Signal Red (&lt;code&gt;#C8453B&lt;/code&gt;)&lt;/strong&gt;: Urgent action required (&amp;lt;30 days remaining or overdue).&lt;/li&gt;
&lt;li&gt;⏳ &lt;strong&gt;Amber Glow (&lt;code&gt;#E0A13A&lt;/code&gt;)&lt;/strong&gt;: Approaching deadline (30 to 90 days remaining).&lt;/li&gt;
&lt;li&gt;🌿 &lt;strong&gt;Calm Slate (&lt;code&gt;#5A677D&lt;/code&gt;)&lt;/strong&gt;: Safe (&amp;gt;90 days remaining or permanent document).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🎁 The Handover Moment &amp;amp; What Uncle Rajesh Said
&lt;/h2&gt;

&lt;p&gt;On Sunday afternoon, I took my laptop over to Rohan's house, pulled the Wi-Fi toggle completely off, and set the laptop on the study table in front of Uncle Rajesh.&lt;/p&gt;

&lt;p&gt;On screen was a warm 3D walnut cabinet with chamfered edges, brass handles, and drawer labels. When he clicked on the &lt;strong&gt;Vehicle&lt;/strong&gt; drawer, it pulled open with smooth physics, showing his scanned car policy.&lt;/p&gt;

&lt;p&gt;He pushed his reading glasses up his nose, looked at me with curious skepticism, and challenged me right away:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Acha, tell me: when does my car insurance expire?"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I opened &lt;strong&gt;Ask Almirah&lt;/strong&gt; and typed his exact question. In 1.2 seconds, running purely on the local laptop model, the answer popped up:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"According to your Private Car Package Policy Schedule, the Expiry / Renewal Date is 2026-10-22."&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Beneath the answer sat three clickable citation badges. Uncle Rajesh clicked the citation: the screen instantly opened the side-by-side verification viewer with the exact policy period bounding box highlighted in warm amber gold on his original scanned paper.&lt;/p&gt;

&lt;p&gt;He leaned back in his wooden chair, tapped the desk with his pen, smiled, and said:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Kagaz toh almirah mein hi rahenge, par ab chashma laga ke dhoondhna nahi padega. Aur internet band hai na? Badhiya hai."&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;(The papers will still stay in the almirah, but now I don't have to put on reading glasses to search for them. And the internet is off, right? Excellent.)&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I will take that as the highest possible code review.&lt;/p&gt;




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

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/qkjj2PO7gig" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🎬 &lt;strong&gt;YouTube 1-Minute Walkthrough&lt;/strong&gt;: &lt;a href="https://youtu.be/qkjj2PO7gig" rel="noopener noreferrer"&gt;https://youtu.be/qkjj2PO7gig&lt;/a&gt; &lt;em&gt;(1080p 60fps with clear voiceover walkthrough)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;🌐 &lt;strong&gt;Live Cloud Demo&lt;/strong&gt;: &lt;a href="https://the-almirah.onrender.com" rel="noopener noreferrer"&gt;https://the-almirah.onrender.com&lt;/a&gt; &lt;em&gt;(Hosted on Render free tier; spins down on inactivity, takes ~50s to wake up on first visit)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;🖥️ &lt;strong&gt;Offline Local Host&lt;/strong&gt;: Clone and run with zero internet (&lt;code&gt;http://localhost:3001&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What the 1-Minute Demo Shows:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Interactive 3D Cabinet&lt;/strong&gt;: Real Three.js walnut almirah with dynamic drawer open/close animations and urgency glow shaders.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Color-Coded Drawers&lt;/strong&gt;: Signal Red for immediate deadlines, Amber for upcoming renewals, Slate for permanent records.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Side-by-Side Visual Verification&lt;/strong&gt;: Hovering any extracted field (Policy Number, Insurer, Expiry Date) highlights its exact pixel bounding box on the original document image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grounded RAG Q&amp;amp;A&lt;/strong&gt;: Asks conversational questions and receives answers strictly grounded in document text with clickable citation badges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-Hallucination Guardrail&lt;/strong&gt;: When asked about unfiled papers (&lt;em&gt;"What is my passport number?"&lt;/em&gt;), the system explicitly refuses to guess instead of inventing data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deadlines &amp;amp; Schedules&lt;/strong&gt;: Chronological countdown ledger with one-tap filtering by drawer and urgency status.&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;The entire codebase is open-source under the MIT license:&lt;/p&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/Shreyansh00987" rel="noopener noreferrer"&gt;
        Shreyansh00987
      &lt;/a&gt; / &lt;a href="https://github.com/Shreyansh00987/The-Almirah" rel="noopener noreferrer"&gt;
        The-Almirah
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      The Almirah - 100% Offline 3D Document Keeper &amp;amp; Grounded RAG Cabinet for Dad. Built with open-source AI (Ollama Qwen2.5, BGE-M3, Three.js, FastAPI, Next.js).
    &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;The Almirah — Local Offline Document Keeper&lt;/h1&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;A 100% local, offline document keeper and 3D cabinet that extracts structured fields and deadlines from photographed paper documents using open-source models, filing them into a 3D walnut Almirah whose drawers glow by deadline proximity.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="https://the-almirah.onrender.com" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8e369c0449560a39d4976c6b0e1cd9b5159e30920269cec9a0d199bd4b93627b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6976655f44656d6f2d52656e6465722d3436453342373f7374796c653d666f722d7468652d6261646765266c6f676f3d72656e646572266c6f676f436f6c6f723d7768697465" alt="Live Demo on Render"&gt;&lt;/a&gt;
&lt;a href="https://github.com/Shreyansh00987/The-Almirah" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e5e9c02ca7bdde1278e63e2d0c128b30ccecc2afb5bc2328e77e9a5a6d25ba98/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4769744875622d5265706f7369746f72792d3138313731373f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465" alt="GitHub Repository"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🌟 Weekend Hackathon: Built for a Friend (Dad)&lt;/h2&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Ship something that solves a real problem for a friend or someone you love. Pick one real person and build something for them."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Who it was built for&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Rajesh Sharma (Dad)&lt;/strong&gt;, an older adult who for over 35 years has kept every land registry, mediclaim schedule, vehicle insurance policy, and appliance warranty card locked in a heavy double-door Godrej almirah (wardrobe) in his study.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;The Real Problem&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;Every year, a deadline would slip past—a car insurance renewal lapsed by 10 days, or a warranty booklet went missing right when the water purifier broke down. Digging through tied bundles of…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Shreyansh00987/The-Almirah" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/Shreyansh00987/The-Almirah" rel="noopener noreferrer"&gt;https://github.com/Shreyansh00987/The-Almirah&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tech Topics&lt;/strong&gt;: &lt;code&gt;open-source&lt;/code&gt;, &lt;code&gt;ai&lt;/code&gt;, &lt;code&gt;build-for-a-friend&lt;/code&gt;, &lt;code&gt;rag&lt;/code&gt;, &lt;code&gt;threejs&lt;/code&gt;, &lt;code&gt;fastapi&lt;/code&gt;, &lt;code&gt;nextjs&lt;/code&gt;, &lt;code&gt;ollama&lt;/code&gt;, &lt;code&gt;privacy&lt;/code&gt;, &lt;code&gt;offline-first&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;The Almirah is designed around an air-gapped dual-engine architecture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ Photographed Document Scan / Camera Upload ]
                      │
                      ▼
   ┌────────────────────────────────────────────────────────┐
   │ Local Extraction Engine (100% Offline)                 │
   │  - Primary: Qwen2.5-VL-7B (Local Vision-Language Model)│
   │  - Fast CPU Fallback: PyMuPDF + Tesseract (&amp;lt;400ms)     │
   └──────────────────────────┬─────────────────────────────┘
                              │
                              ▼
   ┌────────────────────────────────────────────────────────┐
   │ Structured Schema Normalization                        │
   │  - Model: Qwen2.5-7B-Instruct (Ollama Structured JSON) │
   │  - Fields: Document Type, Provider, Identifier,        │
   │            Issue Date, Expiry Date, Amount, Drawer     │
   │  - Exact Pixel Coordinates: [ymin, xmin, ymax, xmax]   │
   └──────────────────────────┬─────────────────────────────┘
                              │
                              ▼
   ┌────────────────────────────────────────────────────────┐
   │ Human-in-the-Loop Side-by-Side Verification Screen     │
   │  - Hover field ➔ Highlights golden bbox on original    │
   │  - One-tap human confirmation commit                   │
   └──────────────────────────┬─────────────────────────────┘
                              │
                              ▼
   ┌────────────────────────────────────────────────────────┐
   │ Storage &amp;amp; Grounded Retrieval (RAG)                     │
   │  - Local SQLite Database (almirah.db)                  │
   │  - Embeddings: BAAI/bge-m3 (Local Ollama)              │
   │  - Cosine Similarity &amp;amp; Hybrid BM25 Keyword Search      │
   │  - Zero-Guess Guardrail Engine                         │
   └──────────────────────────┬─────────────────────────────┘
                              │
                              ▼
   ┌────────────────────────────────────────────────────────┐
   │ 3D Archival Presentation                               │
   │  - Three.js / React Three Fiber + Drei                 │
   │  - Procedural Chamfered Walnut Wood &amp;amp; Brass Hardware   │
   │  - Dynamic Deadline Color Coding &amp;amp; Urgency Shaders     │
   └────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Tech Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Open-Source AI Models&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Qwen2.5-VL-7B&lt;/strong&gt; (via Ollama): Multi-modal document vision understanding and pixel bounding box coordinates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Qwen2.5-7B-Instruct&lt;/strong&gt;: Deterministic JSON extraction adhering strictly to Pydantic schemas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BAAI/bge-m3&lt;/strong&gt;: High-performance multilingual embedding model running locally for hybrid semantic search.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend&lt;/strong&gt;: &lt;strong&gt;FastAPI&lt;/strong&gt; + &lt;strong&gt;SQLite&lt;/strong&gt;, document image normalization with &lt;strong&gt;Pillow&lt;/strong&gt; and &lt;strong&gt;NumPy&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: &lt;strong&gt;Next.js 14 (App Router)&lt;/strong&gt; + &lt;strong&gt;Three.js&lt;/strong&gt; / &lt;strong&gt;@react-three/fiber&lt;/strong&gt; + &lt;strong&gt;Tailwind CSS&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-Contained Security&lt;/strong&gt;: Self-hosted WOFF2 fonts (&lt;em&gt;Source Serif 4&lt;/em&gt; and &lt;em&gt;Inter&lt;/em&gt;) and strict Content Security Policy (&lt;code&gt;connect-src 'self'&lt;/code&gt;), ensuring zero network telemetry.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;This project could &lt;strong&gt;never&lt;/strong&gt; have been built with closed, proprietary cloud APIs (like OpenAI GPT-4o or Google Cloud Document AI):&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Data Sovereignty &amp;amp; Family Privacy
&lt;/h3&gt;

&lt;p&gt;Our parents' most sensitive documents—land deeds, tax returns, vehicle chassis numbers, and health policies—should &lt;strong&gt;never&lt;/strong&gt; live on servers owned by third-party corporations. Open-weight models running on local hardware ensure that not a single byte of sensitive family history ever leaves the physical room.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Zero Hallucinations on Critical Dates
&lt;/h3&gt;

&lt;p&gt;Closed chatbot APIs are notorious for politely hallucinating dates or guessing when unconfident. In family administration, an invented expiry date is catastrophic. Open-weight local models allowed us to enforce &lt;strong&gt;strict JSON grammar masks&lt;/strong&gt; and a deterministic &lt;strong&gt;Zero-Guess Guardrail&lt;/strong&gt;: if a fact is not verified in the local corpus, the model explicitly refuses to speculate.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Permanence &amp;amp; $0.00 Running Cost
&lt;/h3&gt;

&lt;p&gt;Commercial LLMs charge subscription tiers and per-token API fees. For a family archiving papers over decades, paying recurring fees to remember an electricity bill or a car warranty is impractical. Open-weight models run on Uncle Rajesh’s existing laptop with &lt;strong&gt;zero recurring cost forever&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Air-Gapped Resiliency
&lt;/h3&gt;

&lt;p&gt;When severe monsoon storms knock out home internet or cellular towers, closed APIs become useless white error screens. The Almirah runs on a battery-powered laptop in airplane mode with 100% functionality.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;This project was conceptualized, architected, and built alongside Google DeepMind's &lt;strong&gt;Antigravity&lt;/strong&gt; coding agent. The complete commit history, prompt logs, and step-by-step design decisions are documented openly in the repository:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📖 &lt;strong&gt;Build Log&lt;/strong&gt;: &lt;a href="https://github.com/Shreyansh00987/The-Almirah/blob/main/docs/BUILD_LOG.md" rel="noopener noreferrer"&gt;docs/BUILD_LOG.md&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🏗️ &lt;strong&gt;Architecture Spec&lt;/strong&gt;: &lt;a href="https://github.com/Shreyansh00987/The-Almirah/blob/main/docs/ARCHITECTURE.md" rel="noopener noreferrer"&gt;docs/ARCHITECTURE.md&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📊 &lt;strong&gt;Evaluation Benchmarks&lt;/strong&gt;: &lt;a href="https://github.com/Shreyansh00987/The-Almirah/blob/main/docs/EVAL.md" rel="noopener noreferrer"&gt;docs/EVAL.md&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




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

&lt;ul&gt;
&lt;li&gt;🏆 &lt;strong&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/strong&gt; (Grand Prize)&lt;/li&gt;
&lt;li&gt;🌟 &lt;strong&gt;Open-Source AI &amp;amp; Local Inference Track&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Honest Caveats &amp;amp; Evaluation
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Extraction Accuracy&lt;/strong&gt;: On our synthetic benchmark of Indian documents (vehicle policies, municipal tax receipts, water purifier AMC cards), Qwen2.5-VL-7B achieved &lt;strong&gt;96.8% accuracy&lt;/strong&gt; on critical date and policy number extraction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human-in-the-Loop Requirement&lt;/strong&gt;: Handwritten notes and smudged municipal stamps can still fool 7B models. That is why The Almirah &lt;em&gt;never&lt;/em&gt; commits a date without the side-by-side golden bounding box verification screen where the user confirms with one click.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hosted Demo Note&lt;/strong&gt;: The live Render demo runs an optimized deterministic mock/cache for document processing because Render's free tier (512MB RAM) cannot fit a 7B vision model. To run the full unquantized 7B model locally, follow the simple 2-command Ollama setup in the &lt;a href="https://github.com/Shreyansh00987/The-Almirah" rel="noopener noreferrer"&gt;GitHub README&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What's Next for The Almirah
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi-page Lease Assembly&lt;/strong&gt;: Expanding beyond single-sheet schedules to multi-page lease deed stitching.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Regional Language Marginalia&lt;/strong&gt;: Fine-tuning lightweight local vision adapters for handwritten Hindi (Devanagari) annotations often scribbled on Indian registry deeds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tactile Sound Effects&lt;/strong&gt;: Adding subtle wooden creaks and brass handle clicks recorded directly from a real Godrej cabinet.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Built with love for Uncle Rajesh. Because the things that matter most to our families deserve both the warmth of craftsmanship and the uncompromising safety of open-source AI.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Racksmith: The Autonomous Modular Synth Planner Powered by Sanity Context MCP</title>
      <dc:creator>Shreyansh Agrahari</dc:creator>
      <pubDate>Thu, 01 Oct 2026 21:59:45 +0000</pubDate>
      <link>https://dev.to/shreyansh_agrahari_2009db/racksmith-the-autonomous-modular-synth-planner-powered-by-sanity-context-mcp-pk</link>
      <guid>https://dev.to/shreyansh_agrahari_2009db/racksmith-the-autonomous-modular-synth-planner-powered-by-sanity-context-mcp-pk</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/sanity-2026-09-16"&gt;Sanity Challenge, Path One: Ship an Agent That Queries Real Content&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚡ Quick Links &amp;amp; Production Deployments
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🚀 &lt;strong&gt;Live Production Application:&lt;/strong&gt; &lt;a href="https://racksmith.vercel.app" rel="noopener noreferrer"&gt;https://racksmith.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📂 &lt;strong&gt;Live Sanity CMS Studio:&lt;/strong&gt; &lt;a href="https://racksmith.vercel.app/studio" rel="noopener noreferrer"&gt;https://racksmith.vercel.app/studio&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💻 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/Shreyansh00987/Racksmith" rel="noopener noreferrer"&gt;https://github.com/Shreyansh00987/Racksmith&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🎥 &lt;strong&gt;YouTube Walkthrough Video:&lt;/strong&gt; &lt;a href="https://youtu.be/6P5E7SOY9S0" rel="noopener noreferrer"&gt;https://youtu.be/6P5E7SOY9S0&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🏷️ &lt;strong&gt;Sanity Project ID:&lt;/strong&gt; &lt;code&gt;r674mqrk&lt;/code&gt; (Dataset: &lt;code&gt;production&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;Building a Eurorack modular synthesizer is notoriously treacherous. Beginners and professional sound designers alike routinely damage expensive hardware due to four silent traps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Physical Depth Collisions&lt;/strong&gt;: Eurorack cases are not empty boxes. They contain power distribution bus boards, DC switching supplies, and internal support rails. A module that is 55mm deep (such as a vintage Doepfer A-110-1 VCO) will physically crash against the bus board in a shallow skiff case (such as the Intellijel Palette 62, max clearance 45.5mm), cracking the PCB or shorting pins.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Power Rail Blowouts &amp;amp; Inrush Current&lt;/strong&gt;: Eurorack power supplies deliver three distinct DC voltage rails: &lt;code&gt;+12V&lt;/code&gt;, &lt;code&gt;-12V&lt;/code&gt;, and &lt;code&gt;+5V&lt;/code&gt;. When powering on, analog oscillators and digital DSP modules draw an inrush surge exceeding 150–200% of steady-state draw. Exceeding &lt;strong&gt;80% of rated rail capacity&lt;/strong&gt; causes power supplies to brown out, produce high-pitched ground whistle, or fry voltage regulators.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manufacturer Specification Contradictions&lt;/strong&gt;: Different sources document conflicting specifications for the exact same module. Printed manuals often cite quiescent (idle) current draw, while official engineering errata or lab oscilloscope tests reveal peak current under heavy modulation. Similarly, through-hole (THT) vintage revisions often measure 15–20mm deeper than modern surface-mount (SMD) re-issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Catastrophic Failure of Unstructured Vector RAG&lt;/strong&gt;: Standard vector embeddings fail on Eurorack planning. If an LLM performs cosine similarity over raw forum threads or PDF scrapes, it conflates revision years, hallucinates dimensions, and fails elementary arithmetic on multi-rail power sums.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Solution: Racksmith
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Racksmith&lt;/strong&gt; solves this by pairing an autonomous AI agent (powered by the Vercel AI SDK and Gemini 3.8 Flash) with a &lt;strong&gt;Sanity Knowledge Lake&lt;/strong&gt; via a standards-compliant &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt; server. The agent queries structured documents with field-level provenance, evaluates safety through a &lt;strong&gt;deterministic mathematical validation engine&lt;/strong&gt;, surfaces real-world manufacturer errata in an interactive resolution modal, and renders the result in a &lt;strong&gt;photorealistic 3D interactive hardware visualizer&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;               +------------------------------------------------+
               |              User Browser Client               |
               | (Next.js 16 + React Three Fiber 3D + Zustand)  |
               +-----------------------+------------------------+
                                       |
                   +-------------------+-------------------+
                   | User Prompt / GUI Actions             |
                   v                                       v
         +--------------------+                 +---------------------+
         |  AI Agent Router   |                 | 5-Step Golden Path  |
         |  (Vercel AI SDK +  |                 | Demo Controller     |
         |  Gemini 3.8 Flash) |                 +----------+----------+
         +---------+----------+                            |
                   | Tool Calls                            |
                   v                                       |
         +-------------------------------------+           |
         | Model Context Protocol (MCP) Client |           |
         |  - searchSanityKnowledge            |           |
         |  - getModule / getCase              |           |
         |  - getContradictions                |           |
         |  - validateRackDeterministic        |           |
         |  - saveUserDecision                 |           |
         +-----------------+-------------------+           |
                           | Linked Transport              |
                           v                               |
         +-------------------------------------+           |
         |      Sanity Context MCP Server      |           |
         | (Model Context Protocol Spec 1.2.0) |           |
         +-----------------+-------------------+           |
                           | GROQ / Lake Fetch             |
                           v                               |
         +-------------------------------------+           |
         |     Sanity Lake (r674mqrk)          |           |
         |  - 33 Modules                       |           |
         |  - 4 Cases                          |           |
         |  - 8 Manufacturers                  |           |
         |  - 6 Claims with Provenance         |           |
         |  - 3 Contradictions with Errata     |           |
         |  - UserDecisions (Persisted)        |           |
         +-----------------+-------------------+           |
                           |                               |
                           +---------------+---------------+
                                           |
                                           v
                       +---------------------------------------+
                       |    Deterministic Validation Engine    |
                       |  - HP Width Boundary Check            |
                       |  - Mechanical Depth Collision Check   |
                       |  - 3-Rail Power &amp;amp; 80% Headroom Buffer |
                       +-------------------+-------------------+
                                           |
                                           v
                       +---------------------------------------+
                       |   Photorealistic 3D Eurorack Rack     |
                       | (Anodized Faceplates, Jacks, Collide) |
                       +---------------------------------------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






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

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/6P5E7SOY9S0" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Interactive Application:&lt;/strong&gt; &lt;a href="https://racksmith.vercel.app" rel="noopener noreferrer"&gt;https://racksmith.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Embedded Sanity Studio:&lt;/strong&gt; &lt;a href="https://racksmith.vercel.app/studio" rel="noopener noreferrer"&gt;https://racksmith.vercel.app/studio&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🤖 End-to-End Walkthrough: Autonomous AI Agent via Sanity MCP
&lt;/h3&gt;

&lt;p&gt;In this demonstration, the AI Agent plans a modular synth system autonomously using natural language while querying real content from Sanity:&lt;/p&gt;

&lt;h4&gt;
  
  
  1. AI Agent Standby State
&lt;/h4&gt;

&lt;p&gt;The user navigates to the &lt;strong&gt;AI Agent&lt;/strong&gt; tab. The agent is initialized with direct tool bindings to the Sanity Context MCP server.&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%2F1n4mcuzi2qw3w5sppend.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%2F1n4mcuzi2qw3w5sppend.png" alt="Agent Step 1 - Ready State" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Natural Language Prompt
&lt;/h4&gt;

&lt;p&gt;The user enters a complex hardware request:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Build an ambient sound design rack with complex modulation and reverb, make sure modules fit in depth and don't exceed power limits."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&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%2Feqyyeizy06s8i6oe98jy.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%2Feqyyeizy06s8i6oe98jy.png" alt="Agent Step 2 - Prompt Typed" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Agent Execution &amp;amp; Sanity MCP Tool Calling
&lt;/h4&gt;

&lt;p&gt;The agent executes tool calls against the Sanity MCP Server:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;searchSanityKnowledge&lt;/code&gt;: Queries Sanity for ambient sound sources and filters.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;getModule&lt;/code&gt;: Retrieves exact dimensions and multi-rail power draws.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;validateRackDeterministic&lt;/code&gt;: Passes candidate configurations through the mathematical engine, automatically rejecting modules that exceed case depth or violate the 80% power headroom ceiling.&lt;/li&gt;
&lt;/ul&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%2F140jxfqxt2ltj16tnutg.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%2F140jxfqxt2ltj16tnutg.png" alt="Agent Step 3 - MCP Execution" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Autonomous 3D Rack Population
&lt;/h4&gt;

&lt;p&gt;The agent presents its verified reasoning, citing the exact GROQ documents retrieved from Sanity, and directly mounts the optimal modules (Plaits, Rings, Beads, Maths SMD) onto the 3D hardware rack without human intervention.&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%2Flyxlmmho2qy16doxerg2.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%2Flyxlmmho2qy16doxerg2.png" alt="Agent Step 4 - Rack Built" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;




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

&lt;p&gt;The complete source code is public and open source on GitHub:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Shreyansh00987/Racksmith" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shields.io%2Fbadge%2FGitHub-Shreyansh00987%252FRacksmith-blue%3Fstyle%3Dfor-the-badge%26logo%3Dgithub" alt="GitHub Repository" width="320" height="28"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://github.com/Shreyansh00987/Racksmith" rel="noopener noreferrer"&gt;https://github.com/Shreyansh00987/Racksmith&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Tech Stack:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Framework:&lt;/strong&gt; Next.js 16 (App Router, React 19, Turbopack)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content &amp;amp; Knowledge Lake:&lt;/strong&gt; Sanity Lake (&lt;code&gt;r674mqrk&lt;/code&gt;, dataset &lt;code&gt;production&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Protocol:&lt;/strong&gt; Model Context Protocol (MCP Standard Spec 1.2.0)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Engine:&lt;/strong&gt; Vercel AI SDK (&lt;code&gt;ai/rsc&lt;/code&gt;) + Google Gemini 3.8 Flash&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3D Visualization:&lt;/strong&gt; React Three Fiber + Three.js + Drei&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State Management:&lt;/strong&gt; Zustand&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment:&lt;/strong&gt; Vercel&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How I Used Sanity
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why Structured Content Beats Unstructured Vector RAG
&lt;/h3&gt;

&lt;p&gt;If Sanity were replaced with a generic vector database, &lt;strong&gt;Racksmith would fail&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A modular synthesizer build requires strict relational invariants:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;module.depthMM + clearanceBuffer &amp;lt;= case.maxDepthMM&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sum(module.powerPlus12) &amp;lt;= case.powerCapacityPlus12 * 0.80&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In an unstructured vector store, a search for &lt;em&gt;"Make Noise Maths power draw"&lt;/em&gt; returns chunk embeddings where &lt;em&gt;"Draws 60mA"&lt;/em&gt; and &lt;em&gt;"Draws 90mA under active cycle"&lt;/em&gt; look like identical high-confidence semantic matches. An LLM has no mechanism to determine which claim corresponds to which revision or test methodology.&lt;/p&gt;

&lt;p&gt;With Sanity, specifications are stored as &lt;strong&gt;typed, structured entities with field-level provenance&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Structured Schemas in Sanity:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;module&lt;/code&gt;&lt;/strong&gt;: Encapsulates width (&lt;code&gt;hp&lt;/code&gt;), mechanical depth (&lt;code&gt;depthMM&lt;/code&gt;), 3-rail current (&lt;code&gt;powerPlus12&lt;/code&gt;, &lt;code&gt;powerMinus12&lt;/code&gt;, &lt;code&gt;powerPlus5&lt;/code&gt;), category, and manufacturer reference.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;case&lt;/code&gt;&lt;/strong&gt;: Defines total HP, row count, depth clearance (&lt;code&gt;maxDepthMM&lt;/code&gt;), and power supply ratings (&lt;code&gt;powerPlus12&lt;/code&gt;, &lt;code&gt;powerMinus12&lt;/code&gt;, &lt;code&gt;powerPlus5&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;manufacturer&lt;/code&gt;&lt;/strong&gt;: Authoritative maker profile with website and technical support links.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;claim&lt;/code&gt;&lt;/strong&gt;: Represents a specific technical assertion (&lt;code&gt;field&lt;/code&gt;, &lt;code&gt;value&lt;/code&gt;, &lt;code&gt;unit&lt;/code&gt;, &lt;code&gt;sourceURL&lt;/code&gt;, &lt;code&gt;revision&lt;/code&gt;, &lt;code&gt;confidence&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;contradiction&lt;/code&gt;&lt;/strong&gt;: First-class document linking conflicting claims (&lt;code&gt;claimA&lt;/code&gt; &amp;lt;-&amp;gt; &lt;code&gt;claimB&lt;/code&gt;) with &lt;code&gt;explanation&lt;/code&gt;, &lt;code&gt;conflictType&lt;/code&gt;, and &lt;code&gt;impactAnalysis&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;userDecision&lt;/code&gt;&lt;/strong&gt;: Records the user's resolution back into the Sanity dataset so that future AI agent invocations honor the user's vetted hardware reality.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  MCP Tools Built on Sanity Context:
&lt;/h3&gt;

&lt;p&gt;The Next.js application exposes an MCP server (&lt;code&gt;/api/mcp&lt;/code&gt;) implementing 5 core tools:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Example: Sanity MCP Tool for Discrepancy &amp;amp; Errata Retrieval&lt;/span&gt;
&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;getContradictions&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Retrieve known specification contradictions and manufacturer errata&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;moduleId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;optional&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;moduleId&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;moduleId&lt;/span&gt;
      &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;`*[_type == "contradiction" &amp;amp;&amp;amp; (claimA-&amp;gt;module._ref == $moduleId || claimB-&amp;gt;module._ref == $moduleId)]{
          _id, title, explanation, impactAnalysis,
          claimA-&amp;gt;{ field, value, unit, source, revision },
          claimB-&amp;gt;{ field, value, unit, source, revision }
        }`&lt;/span&gt;
      &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`*[_type == "contradiction"]{
          _id, title, explanation, impactAnalysis,
          claimA-&amp;gt;{ field, value, unit, source, revision },
          claimB-&amp;gt;{ field, value, unit, source, revision }
        }`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;sanityClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;moduleId&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;};&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;h3&gt;
  
  
  Deterministic Validation Engine
&lt;/h3&gt;

&lt;p&gt;The agent does not guess math. When an agent wants to evaluate a rack configuration, it calls the &lt;code&gt;validateRackDeterministic&lt;/code&gt; MCP tool:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;validateRack&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Module&lt;/span&gt;&lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="nx"&gt;targetCase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Case&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;ValidationResult&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;totalHp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;acc&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hpOverflow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;totalHp&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;targetCase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;totalHp&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;depthCollisions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;modules&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;depthMM&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;targetCase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;maxDepthMM&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;module&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;moduleDepth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;depthMM&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;maxDepth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;targetCase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;maxDepthMM&lt;/span&gt; &lt;span class="p"&gt;}));&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;currentPlus12&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;acc&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;powerPlus12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;maxPlus12Safe&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;targetCase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;powerCapacityPlus12&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.80&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;power12Overload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;currentPlus12&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;maxPlus12Safe&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;isValid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;hpOverflow&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;depthCollisions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;power12Overload&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;metrics&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;totalHp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;currentPlus12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;maxPlus12Safe&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="nx"&gt;depthCollisions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;hpOverflow&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;power12Overload&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;h2&gt;
  
  
  Sanity Project Details
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sanity Project ID:&lt;/strong&gt; &lt;code&gt;r674mqrk&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dataset:&lt;/strong&gt; &lt;code&gt;production&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Embedded Studio:&lt;/strong&gt; &lt;a href="https://racksmith.vercel.app/studio" rel="noopener noreferrer"&gt;https://racksmith.vercel.app/studio&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CORS Origins Configured:&lt;/strong&gt; &lt;code&gt;https://racksmith.vercel.app&lt;/code&gt;, &lt;code&gt;http://localhost:3000&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public Dataset Query Endpoint:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  https://r674mqrk.api.sanity.io/v2024-01-01/data/query/production?query=*[_type=="module"][0...5]{name,hp,depthMM,powerPlus12}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Agent Session
&lt;/h2&gt;

&lt;p&gt;Below is a curated transcript excerpt demonstrating how the agent invokes Sanity MCP tools to safely resolve an ambiguous hardware request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Build an ambient sound design rack with complex modulation and reverb, make sure modules fit in depth and don't exceed power limits."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"assistant"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"thought"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"The user wants an ambient rack. I must query Sanity Knowledge Lake for modules tagged with 'ambient', 'reverb', or 'modulation'. I will check their depths against standard case clearances."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"tool_call"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"searchSanityKnowledge"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"arguments"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ambient modulation reverb granular"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"tool"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"searchSanityKnowledge"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Mutable Instruments Beads"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"category"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"granular"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"hp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"depthMM"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"powerPlus12"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Mutable Instruments Rings"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"category"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"resonator"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"hp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"depthMM"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"powerPlus12"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Make Noise Maths"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"category"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"modulation"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"hp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"depthMM"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"powerPlus12"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;90&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"assistant"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"thought"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"I will check for known contradictions on Make Noise Maths before adding it."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"tool_call"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"getContradictions"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"arguments"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"moduleId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"module-make-noise-maths"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"tool"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"getContradictions"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Make Noise Maths Power &amp;amp; Depth Errata"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"explanation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Vintage THT units draw 60mA quiescent and measure 45mm deep. Modern SMD units draw up to 90mA active cycle and measure 25mm deep."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"impactAnalysis"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Vintage revision will collide with shallow skiff cases (Palette 62)."&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"assistant"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"thought"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Selecting the Modern SMD revision guarantees 25mm depth, safely fitting within the 45.5mm skiff limit. Now validating total power."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"tool_call"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"validateRackDeterministic"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"arguments"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"caseId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"case-palette-62"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"moduleIds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"module-plaits"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"module-rings"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"module-beads"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"module-maths-smd"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"tool"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"validateRackDeterministic"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"isValid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"totalHp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"maxHp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;62&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"powerPlus12"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;360&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"maxPowerPlus12Allowed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;960&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"depthCollision"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"assistant"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"I have assembled an ambient sound design rack for you! I verified through the Sanity Knowledge Lake that Make Noise Maths has a known errata between vintage THT (45mm) and modern SMD (25mm). By selecting the modern SMD revision, all 4 modules (Plaits, Rings, Beads, and Maths) safely fit into your 62HP case with 0 depth collisions and consume only 360mA on the +12V rail (well below your 80% safety threshold of 960mA)."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;em&gt;Built with ❤️ for the DEV &amp;amp; Sanity Community by Shreyansh (&lt;a href="https://github.com/Shreyansh00987" rel="noopener noreferrer"&gt;@Shreyansh00987&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>sanitychallenge</category>
      <category>sanity</category>
      <category>ai</category>
    </item>
    <item>
      <title>CHRONOS-HEIST: A Playable Multi-Era Temporal Mystery Game Powered by Sanity Content Lake</title>
      <dc:creator>Shreyansh Agrahari</dc:creator>
      <pubDate>Wed, 30 Sep 2026 21:02:30 +0000</pubDate>
      <link>https://dev.to/shreyansh_agrahari_2009db/chronos-heist-a-playable-multi-era-temporal-mystery-game-powered-by-sanity-content-lake-gg1</link>
      <guid>https://dev.to/shreyansh_agrahari_2009db/chronos-heist-a-playable-multi-era-temporal-mystery-game-powered-by-sanity-content-lake-gg1</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/sanity-2026-09-16"&gt;Sanity Challenge, Path Two: Vibe-Code Something Strange&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




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

&lt;p&gt;&lt;strong&gt;CHRONOS-HEIST&lt;/strong&gt; is a playable, multi-era temporal mystery game where &lt;strong&gt;changing the past rewrites the future in real time&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Instead of treating a game world as ephemeral React state or a rigid SQL table, &lt;strong&gt;every room, object, physical wall, grandfather clock, causal rule, and paradox is modeled as structured content inside Sanity Content Lake&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  🕰️ The World: The Clockmaker's Vault
&lt;/h3&gt;

&lt;p&gt;Three distinct iterations of the exact same physical vault room exist concurrently across a 106-year temporal axis:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;1920 (The Origin)&lt;/strong&gt;: Mechanical clocks, ticking pendulums, gaslight amber warmth, a hand-carved mahogany workbench, a brass rotary safe combination lock, and archival gramophone cylinders.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1970 (The Echo)&lt;/strong&gt;: A Cold-War electronics retrofit featuring green cathode-ray oscilloscopes, reel-to-reel magnetic tapes, and armored industrial conduits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2026 (The Consequence)&lt;/strong&gt;: An abandoned cyber-temporal research bunker protected by biometric laser tripwires, quantum terminals, tachyon fissures, and the floating gyroscopic Chronos Core.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  ⚡ The Core Mechanic: Real-Time Zero-Refresh Causality
&lt;/h3&gt;

&lt;p&gt;When an operative in 1920 cracks the rotary safe combination (&lt;code&gt;19 - 70 - 26&lt;/code&gt;), takes the &lt;strong&gt;Antique Brass Vault Key&lt;/strong&gt;, and hides it inside the &lt;strong&gt;North Wall lime mortar cavity&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;An atomic &lt;code&gt;temporalAction&lt;/code&gt; document is committed to Sanity Content Lake.&lt;/li&gt;
&lt;li&gt;The server-side &lt;strong&gt;Causality Engine&lt;/strong&gt; evaluates cross-era relationships (&lt;code&gt;causalityLink&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Sanity’s &lt;strong&gt;Live Query engine (&lt;code&gt;next-sanity/live&lt;/code&gt;)&lt;/strong&gt; immediately broadcasts the mutation.&lt;/li&gt;
&lt;li&gt;With &lt;strong&gt;zero page refresh&lt;/strong&gt;, the 1970 electrical conduit records an anomalous density spike, and the 2026 cyber vault dynamically materializes a &lt;strong&gt;hidden resonance compartment&lt;/strong&gt;, exposing the legendary &lt;strong&gt;Chronos Core Cylinder&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The action triggers a structured &lt;strong&gt;5-Stage Sanity Workflow&lt;/strong&gt;, alerting the Game Master command center to authorize and seal the timeline.&lt;/li&gt;
&lt;/ol&gt;




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

&lt;ul&gt;
&lt;li&gt;🚀 &lt;strong&gt;Live Production Deployment&lt;/strong&gt;: &lt;a href="https://chronos-heist.vercel.app" rel="noopener noreferrer"&gt;https://chronos-heist.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🎮 &lt;strong&gt;3D Vault Direct Play&lt;/strong&gt;: &lt;a href="https://chronos-heist.vercel.app/game/CHRONOS-ALPHA" rel="noopener noreferrer"&gt;https://chronos-heist.vercel.app/game/CHRONOS-ALPHA&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🛡️ &lt;strong&gt;Game Master Center&lt;/strong&gt;: &lt;a href="https://chronos-heist.vercel.app/gm/CHRONOS-ALPHA" rel="noopener noreferrer"&gt;https://chronos-heist.vercel.app/gm/CHRONOS-ALPHA&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;Interactive D3 Causality Graph&lt;/strong&gt;: &lt;a href="https://chronos-heist.vercel.app/causality" rel="noopener noreferrer"&gt;https://chronos-heist.vercel.app/causality&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🎛️ &lt;strong&gt;Sanity Studio Live&lt;/strong&gt;: &lt;a href="https://chronos-heist.vercel.app/studio" rel="noopener noreferrer"&gt;https://chronos-heist.vercel.app/studio&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🎬 Video Walkthrough
&lt;/h3&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/X6kC3aGUWMA" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Demo Video Link:&lt;/strong&gt; &lt;a href="https://youtu.be/X6kC3aGUWMA" rel="noopener noreferrer"&gt;https://youtu.be/X6kC3aGUWMA&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




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

&lt;ul&gt;
&lt;li&gt;🐙 &lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/Shreyansh00987/chronos-heist" rel="noopener noreferrer"&gt;https://github.com/Shreyansh00987/chronos-heist&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tech Stack&lt;/strong&gt;: Next.js 16 (App Router + Turbopack), Sanity Content Lake (v5 Studio + &lt;code&gt;next-sanity/live&lt;/code&gt;), Three.js WebGL 3D Canvas, D3.js Force Simulation, Web Audio API, TypeScript, Tailwind CSS.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  My Build Process
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🤖 AI-Native IDE &amp;amp; Prompting Approach
&lt;/h3&gt;

&lt;p&gt;This entire project was prompted into existence using &lt;strong&gt;Google Antigravity&lt;/strong&gt;, DeepMind's advanced AI-native agentic coding IDE. &lt;/p&gt;

&lt;p&gt;Rather than generating simple boilerplate, the prompt strategy was centered on &lt;strong&gt;treating Sanity as the single source of truth for physical causality across time&lt;/strong&gt;:&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Content Modeling Prompts That Worked
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Model physical space across time. Do not hardcode rooms. Create a Sanity schema where a 'room' document 
has a reference to an 'era' (1920, 1970, 2026), and a 'causalityLink' document that explicitly defines 
how an action on an object in the past modifies attributes of an object or room in a downstream era."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This resulted in 10 clean, relational Sanity schemas (&lt;code&gt;era&lt;/code&gt;, &lt;code&gt;room&lt;/code&gt;, &lt;code&gt;gameObject&lt;/code&gt;, &lt;code&gt;temporalAction&lt;/code&gt;, &lt;code&gt;causalityLink&lt;/code&gt;, &lt;code&gt;paradox&lt;/code&gt;, &lt;code&gt;timelineState&lt;/code&gt;, &lt;code&gt;gameSession&lt;/code&gt;, &lt;code&gt;player&lt;/code&gt;, &lt;code&gt;workflowTransition&lt;/code&gt;).&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Reaching Past the Studio: The App SDK Bonus
&lt;/h4&gt;

&lt;p&gt;Instead of a standard read-only portfolio or blog, we built a full &lt;strong&gt;App SDK real-time temporal console&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A floating &lt;strong&gt;Sanity App SDK Console&lt;/strong&gt; dock with a real-time &lt;strong&gt;Lake RTT Latency Probe&lt;/strong&gt; measuring live transaction round-trip times directly to Sanity Content Lake.&lt;/li&gt;
&lt;li&gt;Bi-directional client mutations allowing players to trigger temporal actions and inspect raw GROQ payloads in real-time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  3. Reaching Past the Studio: Structured 5-Stage Workflows
&lt;/h4&gt;

&lt;p&gt;We modeled human + agent collaboration directly next to the content. Whenever a past action is taken:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PAST_ACTION_COMMITTED 
        ↓
CAUSALITY_AGENT (Autonomous heuristic impact analysis)
        ↓
FUTURE_STATE_RECALCULATION (Downstream patches computed)
        ↓
GAME_MASTER_REVIEW (Human GM sign-off UI)
        ↓
TIMELINE_SEALED (Immutable canonical record)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the &lt;strong&gt;Game Master Command Center&lt;/strong&gt; (&lt;code&gt;/gm/CHRONOS-ALPHA&lt;/code&gt;), a human operator inspects the AI agent’s confidence scores and authorizes timeline sealing.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Where the Model Got Stuck &amp;amp; How We Course-Corrected
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Three.js Canvas Lighting &amp;amp; Contrast&lt;/strong&gt;: Early iterations generated dark, moody 3D rooms with retro CRT overlays that obscured the mechanical models. We course-corrected by introducing high-contrast lighting: brass point lights, a glowing green banker's desk lamp, ceiling spotlights, and removing the darkening scanline veil from the CRT canvas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vercel Framework Detection&lt;/strong&gt;: Deploying Next.js 16 with Turbopack initially caused Vercel CLI to expect a static &lt;code&gt;dist&lt;/code&gt; folder. We added an explicit &lt;code&gt;vercel.json&lt;/code&gt; with &lt;code&gt;"framework": "nextjs"&lt;/code&gt;, which immediately unlocked seamless Edge and Serverless route compilation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live 3D State Sync&lt;/strong&gt;: We tied Next.js Server Actions directly to &lt;code&gt;next-sanity/live&lt;/code&gt;. When &lt;code&gt;client.patch().set().commit()&lt;/code&gt; completes on Sanity Content Lake, the 3D WebGL canvas re-renders hidden compartments without a single page refresh.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Sanity Project Details
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sanity Project ID&lt;/strong&gt;: &lt;code&gt;ed3z3z76&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dataset&lt;/strong&gt;: &lt;code&gt;production&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sanity Studio Access&lt;/strong&gt;: &lt;a href="https://chronos-heist.vercel.app/studio" rel="noopener noreferrer"&gt;https://chronos-heist.vercel.app/studio&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📊 Structured Content Hierarchy
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Eras&lt;/strong&gt;: 1920 (Origin), 1970 (Echo), 2026 (Consequence).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rooms&lt;/strong&gt;: 3 physical rooms with relational linkages (&lt;code&gt;linkedRooms[]&lt;/code&gt;), dynamic hidden compartments (&lt;code&gt;hiddenCompartments[]&lt;/code&gt;), and spatial coordinates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Game Objects&lt;/strong&gt;: Physical interactable artifacts with &lt;code&gt;affectsCausality&lt;/code&gt; flags.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Causality Matrix&lt;/strong&gt;: Directed graph of causal dependencies (&lt;code&gt;sourceObject&lt;/code&gt;, &lt;code&gt;targetObject&lt;/code&gt;, &lt;code&gt;deltaType&lt;/code&gt;, &lt;code&gt;probability&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Studio Tool&lt;/strong&gt;: We mounted our bespoke &lt;strong&gt;D3 Force-Directed Causality Graph&lt;/strong&gt; directly inside Sanity Studio as an operations tool alongside document editors.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Agent Session
&lt;/h2&gt;

&lt;p&gt;The full multi-turn autonomous coding session was orchestrated via the &lt;strong&gt;Google Antigravity IDE&lt;/strong&gt;.&lt;br&gt;
Key milestones accomplished across the session:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Architecture Planning&lt;/strong&gt;: Designing the relational temporal data model for Sanity Lake.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Schema &amp;amp; Studio Scaffolding&lt;/strong&gt;: 10 schemas, custom structure hierarchy, and embedded D3 causality tool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Immersive 3D WebGL Canvas&lt;/strong&gt;: 360° orbital controls, raycasting, sector radar minimap, grandfather clock, and rotary safe dial.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Minigames&lt;/strong&gt;: 1920 rotary safe combination lock (&lt;code&gt;19-70-26&lt;/code&gt;) and 1970 cathode oscilloscope frequency tuner (432 Hz).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Procedural Web Audio Engine&lt;/strong&gt;: Synthesizing 1920 gramophone transmissions, 1970 radio intercepts, and 2026 quantum AI audio with live equalizers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated CI/CD&lt;/strong&gt;: Pushing full repository to GitHub and deploying live production builds to Vercel with zero downtime.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;em&gt;Built with ❤️ for the Sanity Hackathon 2026. Step through the timeline today at &lt;a href="https://chronos-heist.vercel.app" rel="noopener noreferrer"&gt;chronos-heist.vercel.app&lt;/a&gt;!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>sanitychallenge</category>
      <category>sanity</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
