<?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: Khushighosh</title>
    <description>The latest articles on DEV Community by Khushighosh (@khushighosh).</description>
    <link>https://dev.to/khushighosh</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%2F4152360%2F6ac43df7-8b20-4acc-913f-03da2c9dd0ef.jpg</url>
      <title>DEV Community: Khushighosh</title>
      <link>https://dev.to/khushighosh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/khushighosh"/>
    <language>en</language>
    <item>
      <title>How HTTPS Actually Works: Following One Request from Browser to Server</title>
      <dc:creator>Khushighosh</dc:creator>
      <pubDate>Mon, 16 Nov 2026 14:19:27 +0000</pubDate>
      <link>https://dev.to/khushighosh/how-https-actually-works-following-one-request-from-browser-to-server-1k2o</link>
      <guid>https://dev.to/khushighosh/how-https-actually-works-following-one-request-from-browser-to-server-1k2o</guid>
      <description>&lt;p&gt;You type &lt;code&gt;https://example.com&lt;/code&gt;, press Enter, and a page appears. Between those two moments, your browser and a server you've never met agree on a secret, check each other's identity, and start encrypting everything. This post follows one request through that process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 1: The 30-second version
&lt;/h2&gt;

&lt;p&gt;HTTPS is just HTTP inside an encrypted tunnel (TLS). Setting up the tunnel does three jobs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Confidentiality:&lt;/strong&gt; nobody on the network can read the traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integrity:&lt;/strong&gt; nobody can change it without being noticed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authentication:&lt;/strong&gt; you're really talking to example.com, not an impostor.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Everything below is how those three jobs get done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 2: The journey, step by step
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Browser                                          Server
   |  1. DNS lookup: example.com -&amp;gt; IP               |
   |  2. TCP connection (SYN, SYN-ACK, ACK)          |
   |                                                 |
   |  3. ClientHello  ----------------------------&amp;gt;  |
   |     (versions, ciphers, key share, hostname)    |
   |                                                 |
   |  &amp;lt;---------------------------  4. ServerHello   |
   |     (chosen cipher, server key share)           |
   |     [from here on, everything is encrypted]     |
   |  &amp;lt;---------  5. Certificate + signature + done  |
   |                                                 |
   |  6. Verify certificate, send "Finished" ----&amp;gt;   |
   |                                                 |
   |  7. GET / HTTP/1.1  (encrypted)  ------------&amp;gt;  |
   |  &amp;lt;------------------  8. 200 OK (encrypted)     |
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;1. DNS.&lt;/strong&gt; Your browser turns the name into an IP address. This step isn't encrypted by default, though DNS over HTTPS exists.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. TCP.&lt;/strong&gt; A normal connection is opened to port 443. (HTTP/3 uses QUIC over UDP instead, but the TLS idea is the same.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. ClientHello.&lt;/strong&gt; The browser says: "Here are the TLS versions and ciphers I support, here's my half of a key exchange, and I'm looking for &lt;code&gt;example.com&lt;/code&gt;." That last part is called SNI, and it lets one IP address host many sites.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. ServerHello.&lt;/strong&gt; The server picks a cipher and sends its half of the key exchange. Both sides can now compute the same shared secret without ever sending it. From this point the rest of the handshake is encrypted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Certificate.&lt;/strong&gt; The server sends its certificate and proves it owns the matching private key by signing the handshake with it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Verification.&lt;/strong&gt; Your browser checks the certificate. If anything fails, you get the scary warning page. If it passes, both sides send "Finished" messages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7-8. The actual request.&lt;/strong&gt; Only now does &lt;code&gt;GET /&lt;/code&gt; go out, already encrypted.&lt;/p&gt;

&lt;p&gt;In TLS 1.3 this whole handshake takes &lt;strong&gt;one round trip&lt;/strong&gt; before your request can go out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 3: The details people get wrong
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The key exchange doesn't send the key
&lt;/h3&gt;

&lt;p&gt;Both sides use an &lt;strong&gt;ephemeral Diffie-Hellman&lt;/strong&gt; exchange (usually on the curve X25519). Each side sends a public value, and each combines the other's public value with its own private one to reach the same secret. An eavesdropper sees both public values but can't compute the secret.&lt;/p&gt;

&lt;p&gt;Because the keys are ephemeral (new for every connection), recording today's traffic and stealing the server's key later doesn't decrypt it. That property is called &lt;strong&gt;forward secrecy&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The certificate doesn't encrypt anything
&lt;/h3&gt;

&lt;p&gt;A common misconception is that the certificate encrypts traffic. It doesn't. Its job is &lt;strong&gt;identity&lt;/strong&gt;: it binds a domain name to a public key, and a Certificate Authority (CA) signs that binding.&lt;/p&gt;

&lt;p&gt;Your browser checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The chain:&lt;/strong&gt; the leaf certificate is signed by an intermediate, which is signed by a root CA already trusted by your OS or browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The name:&lt;/strong&gt; the domain matches one of the names in the certificate (the Subject Alternative Names).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The dates:&lt;/strong&gt; the certificate hasn't expired or been issued for the future.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The proof:&lt;/strong&gt; the server signed the handshake with the private key matching the certificate, so it isn't just replaying someone else's certificate.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  After the handshake
&lt;/h3&gt;

&lt;p&gt;Both sides derive symmetric keys from the shared secret and use an AEAD cipher (AES-GCM or ChaCha20-Poly1305). It encrypts &lt;strong&gt;and&lt;/strong&gt; authenticates each record, so tampering is detected. Symmetric crypto is fast, which is why the slow public-key part only happens during the handshake.&lt;/p&gt;

&lt;h3&gt;
  
  
  What HTTPS doesn't hide
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;IP address&lt;/strong&gt; you connect to.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;hostname&lt;/strong&gt; (SNI) in most setups. Encrypted ClientHello is rolling out to fix this.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;amount and timing&lt;/strong&gt; of the data.&lt;/li&gt;
&lt;li&gt;Anything the server itself logs or leaks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;See the handshake from the command line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -v https://example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for the TLS version, cipher, and the certificate chain in the output.&lt;/p&gt;

&lt;p&gt;Inspect the certificate directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl s_client -connect example.com:443 -servername example.com -tls1_3 -showcerts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In Chrome or Firefox, click the padlock, open the certificate details, and compare the issuer and validity dates with what you saw above.&lt;/p&gt;

&lt;p&gt;For the adventurous: set the &lt;code&gt;SSLKEYLOGFILE&lt;/code&gt; environment variable, capture traffic in Wireshark, and load the key log. You can then watch your own HTTPS request decrypt.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recap
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Key exchange (ECDHE)&lt;/td&gt;
&lt;td&gt;Create a shared secret without sending it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Certificate + signature&lt;/td&gt;
&lt;td&gt;Prove the server is who it claims to be&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AEAD encryption&lt;/td&gt;
&lt;td&gt;Keep the data private and tamper-proof&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;HTTPS isn't one clever trick. It's three simple ideas that work together, and now you know where each one fits.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>I Ran Local LLMs on a Laptop With No GPU: Here Are the Real Numbers</title>
      <dc:creator>Khushighosh</dc:creator>
      <pubDate>Sun, 01 Nov 2026 19:15:40 +0000</pubDate>
      <link>https://dev.to/khushighosh/i-ran-local-llms-on-a-laptop-with-no-gpu-here-are-the-real-numbers-2j87</link>
      <guid>https://dev.to/khushighosh/i-ran-local-llms-on-a-laptop-with-no-gpu-here-are-the-real-numbers-2j87</guid>
      <description>&lt;p&gt;Most local-LLM posts are written on machines with a good GPU. Mine doesn't have one, so I'm sharing what actually happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Laptop: Intel Core i7-13620H, 16 GB RAM, Intel UHD graphics only (no dedicated GPU), Windows&lt;/li&gt;
&lt;li&gt;Runtime: Ollama&lt;/li&gt;
&lt;li&gt;Models: &lt;code&gt;qwen2.5:7b&lt;/code&gt;, &lt;code&gt;llama3.2:3b&lt;/code&gt;, and &lt;code&gt;nomic-embed-text&lt;/code&gt; for embeddings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I built two apps on this machine during Hacktoberfest.&lt;/p&gt;

&lt;h2&gt;
  
  
  App 1: an exam study buddy (RAG)
&lt;/h2&gt;

&lt;p&gt;It answers questions and quizzes you from your own notes, using local embeddings plus Chroma/SQLite, with &lt;code&gt;qwen2.5:7b&lt;/code&gt; generating.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Request&lt;/th&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;First answer after server start&lt;/td&gt;
&lt;td&gt;55 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Normal answer&lt;/td&gt;
&lt;td&gt;42 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quiz question&lt;/td&gt;
&lt;td&gt;35 s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Honest verdict: usable for studying, since you ask, think and wait. It's not usable for quick back-and-forth.&lt;/p&gt;

&lt;h2&gt;
  
  
  App 2: WhatsApp orders into a ledger
&lt;/h2&gt;

&lt;p&gt;It turns messy order chats (English, Hinglish, Kanglish) into structured orders.&lt;/p&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;Time per order&lt;/th&gt;
&lt;th&gt;Tuned 12-chat set&lt;/th&gt;
&lt;th&gt;Fresh 6-chat set&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;qwen2.5:7b&lt;/td&gt;
&lt;td&gt;~17 s&lt;/td&gt;
&lt;td&gt;11/12 orders (99% fields)&lt;/td&gt;
&lt;td&gt;3/6 (93% fields)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;llama3.2:3b&lt;/td&gt;
&lt;td&gt;~7.7 s&lt;/td&gt;
&lt;td&gt;1/12 orders (82% fields)&lt;/td&gt;
&lt;td&gt;3/6 (91% fields)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two things stood out:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The 3B model was about 2x faster, and on fresh chats it was close to the 7B on field accuracy.&lt;/strong&gt; On my tuned set it was much worse, so the tuned-set score flattered the 7B. Always keep a held-out set.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Both models missed &lt;code&gt;delivery_date&lt;/code&gt; on same-day ("aaj") and Kannada ("nale") chats.&lt;/strong&gt; Model size didn't fix this. Prompt wording did, partly.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What I'd change to make it usable
&lt;/h2&gt;

&lt;p&gt;These are ideas I haven't all measured yet. &lt;strong&gt;[FILL: add your before/after numbers for the ones you try.]&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stream tokens.&lt;/strong&gt; Seeing the first words within seconds changes how a 40 s answer feels, even if the total time is the same.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep the model loaded.&lt;/strong&gt; Ollama unloads idle models after a few minutes. The 55 s first answer probably includes loading the model, so set &lt;code&gt;OLLAMA_KEEP_ALIVE&lt;/code&gt; or warm it up at server start.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shrink the prompt.&lt;/strong&gt; On CPU, a long prompt costs real seconds. Retrieve fewer chunks and cut the instructions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cap the output.&lt;/strong&gt; Limit &lt;code&gt;num_predict&lt;/code&gt; for quiz questions and extraction, which have short answers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't make people wait.&lt;/strong&gt; For the ledger, process in the background and show orders as they finish.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Match the model to the task.&lt;/strong&gt; Use the 3B for easy extraction and the 7B only where it clearly wins. Only a held-out set can tell you which.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;No GPU is workable if the task is async or patient (studying, batch extraction), and painful if it's chat-like.&lt;/li&gt;
&lt;li&gt;Model size matters less than you'd expect for narrow extraction, and more than you'd expect for tuning-set overfitting.&lt;/li&gt;
&lt;li&gt;Report timings and held-out accuracy together. One without the other misleads.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Code: &lt;a href="https://github.com/Khushighosh/study-buddy" rel="noopener noreferrer"&gt;study-buddy&lt;/a&gt; · &lt;a href="https://github.com/Khushighosh/Order-Ledger" rel="noopener noreferrer"&gt;Order-Ledger&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>ollama</category>
      <category>opensource</category>
      <category>llm</category>
    </item>
    <item>
      <title>Undead Agent - My AI Agent Dies, Comes Back, and Tells Me What It Saw</title>
      <dc:creator>Khushighosh</dc:creator>
      <pubDate>Fri, 30 Oct 2026 05:49:09 +0000</pubDate>
      <link>https://dev.to/khushighosh/undead-agent-my-ai-agent-dies-comes-back-and-tells-me-what-it-saw-33c9</link>
      <guid>https://dev.to/khushighosh/undead-agent-my-ai-agent-dies-comes-back-and-tells-me-what-it-saw-33c9</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest"&gt;Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine&lt;/a&gt;&lt;/em&gt; 👻&lt;/p&gt;

&lt;p&gt;I killed my AI agent with SIGKILL while it was in the middle of a sentence.&lt;/p&gt;

&lt;p&gt;Thirty seconds later, a brand new process woke up and said this about the file it had been reading:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"The words swam, a chaotic tide of data and a single, insistent warning about file7.txt. Now, I only see fragments of its cold, sterile logic repeating endlessly."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then it finished the job. The seven files already finished were never redone.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Live demo:&lt;/strong&gt; &lt;a href="https://undead-agent.onrender.com" rel="noopener noreferrer"&gt;https://undead-agent.onrender.com&lt;/a&gt; (replays a recorded real run, because the real agent runs locally)&lt;/p&gt;

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

&lt;p&gt;Undead Agent is a local AI agent you can kill at any moment. It comes back from the dead and carries on from the exact step where it died.&lt;/p&gt;

&lt;p&gt;Its job is simple: it reads a folder of text files, summarizes each one with Gemma (running locally through Ollama), and combines the summaries into a report. The interesting part is what happens when things go wrong. Every step runs as a durable Temporal workflow, so if the process is killed mid-thought, a brand new process takes over without redoing any finished work.&lt;/p&gt;

&lt;p&gt;Each time the agent is resurrected, it speaks as a ghost and tells you what it remembers from its last moments. A "morgue" dashboard shows every life, death and resurrection, and has a big &lt;strong&gt;Kill it&lt;/strong&gt; button so anyone can murder the agent themselves.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How I read the theme:&lt;/strong&gt; "Ghost in the Machine" usually means a mind haunting a body. I made that literal. When the worker process (the body) dies, the agent's memory (its progress) survives somewhere else, so it rises again in a new body. The ghost narration is the spooky skin, but the resurrection underneath is real infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this problem:&lt;/strong&gt; AI agents do long, multi-step work, and long jobs crash. A laptop sleeps, a process gets OOM-killed, a deploy restarts the worker. In a normal agent loop, a crash on step 9 of 10 means starting over and paying for the model calls again. I wanted to see how hard I could make an agent to kill.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&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%2Fosk1ind368i0ahggowoo.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%2Fosk1ind368i0ahggowoo.png" alt="The morgue dashboard after a kill, showing the ghost's line" width="800" height="775"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The morgue after a kill: the first worker finished seven files, died while reading file7.txt, and a new worker took over and finished the last three. (The third "life" is an earlier worker that started before the run and sat idle.)&lt;/em&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%2Fd1c1sf66ve99vcyuo0xc.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%2Fd1c1sf66ve99vcyuo0xc.png" alt="Temporal timeline showing a killed step retried as Attempt 2" width="799" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Temporal’s timeline from another kill-and-resume run. The red-green bar is the killed step: it timed out, then retried as Attempt 2 on a new worker (2 • summarizeFile). Every other step ran exactly once.&lt;/em&gt;&lt;/p&gt;

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


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Khushighosh" rel="noopener noreferrer"&gt;
        Khushighosh
      &lt;/a&gt; / &lt;a href="https://github.com/Khushighosh/undead-agent" rel="noopener noreferrer"&gt;
        undead-agent
      &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;Undead Agent&lt;/h1&gt;

&lt;/div&gt;
&lt;p&gt;A local AI agent that survives being killed. It summarizes files with Gemma (via Ollama), runs on Temporal durable workflows, and resumes from the exact step where it died. A ghost narrates each resurrection. A morgue dashboard shows every life and death.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Run it&lt;/h2&gt;

&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Install Ollama and pull a Gemma model (default: gemma3:4b)&lt;/li&gt;
&lt;li&gt;Install the Temporal CLI, then run: temporal server start-dev&lt;/li&gt;
&lt;li&gt;npm install&lt;/li&gt;
&lt;li&gt;npx tsx src/keepalive.ts&lt;/li&gt;
&lt;li&gt;npx tsx src/dashboard.ts (open &lt;a href="http://localhost:3000" rel="nofollow noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;npx tsx src/client.ts&lt;/li&gt;
&lt;li&gt;Click Kill it on the dashboard and watch the agent come back&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Put .txt files in docs/ for it to summarize.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Stack&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;Gemma (open-weight model), Ollama, Temporal, Render (demo page)&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Khushighosh/undead-agent" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;&lt;strong&gt;Run it:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install Ollama and pull a Gemma model (default: &lt;code&gt;gemma3:4b&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Install the Temporal CLI, then run &lt;code&gt;temporal server start-dev&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;npm install&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;npx tsx src/keepalive.ts&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;npx tsx src/dashboard.ts&lt;/code&gt; (open &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;npx tsx src/client.ts&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Put &lt;code&gt;.txt&lt;/code&gt; files in &lt;code&gt;docs/&lt;/code&gt;, click &lt;strong&gt;Kill it&lt;/strong&gt; on the dashboard, and watch the agent come back&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Stack:&lt;/strong&gt; Gemma (open-weight model), Ollama, Temporal, Render (demo page)&lt;/p&gt;

&lt;h2&gt;
  
  
  An autopsy of one death
&lt;/h2&gt;

&lt;p&gt;Here is one real kill, straight from my event log:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;12:22:37:&lt;/strong&gt; worker 21496 finishes &lt;code&gt;file6.txt&lt;/code&gt;. It had already finished &lt;code&gt;file1.txt&lt;/code&gt; to &lt;code&gt;file5.txt&lt;/code&gt; and &lt;code&gt;file10.txt&lt;/code&gt;, and is about to start &lt;code&gt;file7.txt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;I click &lt;strong&gt;Kill it&lt;/strong&gt;. The process disappears.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;12:22:53:&lt;/strong&gt; the supervisor starts a new worker, 2432.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;12:23:11:&lt;/strong&gt; the ghost speaks, on attempt 2 of &lt;code&gt;file7.txt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;12:23:26:&lt;/strong&gt; &lt;code&gt;file7.txt&lt;/code&gt; is done. Files 8 and 9 follow.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The seven finished files were never redone. The new worker did not even know they existed. It only knew what Temporal told it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things that went wrong (and what I learned)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A graceful stop is not a kill.&lt;/strong&gt; My first "kill tests" used Ctrl+C, which lets the worker drain and finish its current step. Nothing died, so nothing resurrected. A real SIGKILL was needed to prove the idea.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;My first timeout was wrong.&lt;/strong&gt; I set every step to a 30 second timeout. That works for summarizing one file, but the final report step has to read all the summaries and is slower. In the Temporal UI I could see it time out four times and only succeed on attempt 5. The fix was to give the report step its own 120 second timeout.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Short timeouts make the demo better.&lt;/strong&gt; A short timeout on file steps means a killed step is retried quickly. A long one would leave the dashboard silent for minutes after a kill.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The plumbing took most of the time.&lt;/strong&gt; Running worker, client and server in separate terminals, and making resurrection visible instead of just correct, took far longer than the idea itself.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&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%2F2gxil1po9657b6b1y2ch.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%2F2gxil1po9657b6b1y2ch.png" alt="Undead Agent architecture: a disposable worker, a durable Temporal workflow, Gemma on Ollama, an event log, and the morgue dashboard" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The key idea is that &lt;strong&gt;the worker is disposable and the workflow is not.&lt;/strong&gt; The workflow's state lives in Temporal, so any worker can pick it up.&lt;/p&gt;

&lt;h3&gt;
  
  
  The agent as a durable workflow
&lt;/h3&gt;

&lt;p&gt;The agent is a short Temporal workflow. It lists the files, summarizes each one as its own activity, then writes the report:&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="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;undeadAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dir&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&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;files&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;listFiles&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dir&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="na"&gt;summaries&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
  &lt;span class="k"&gt;for &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;f&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;summaries&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;summarizeFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;writeReport&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;summaries&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;Each &lt;code&gt;await&lt;/code&gt; is a checkpoint. Temporal records the result of every finished activity, so if the worker dies, the next worker replays the workflow, sees which steps are already done, and continues with the first unfinished one. The summaries are not lost, because they are rebuilt from Temporal's history.&lt;/p&gt;

&lt;h3&gt;
  
  
  How the ghost knows it was resurrected
&lt;/h3&gt;

&lt;p&gt;Temporal tells every activity which attempt it is on. If a step is on attempt 2 or more, it was interrupted before. That is the moment the agent speaks:&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;current&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;info&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;attempt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&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;ghost&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;ask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;`You are an AI agent that was killed while reading "&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;" and has just been resurrected. `&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="s2"&gt;`Speak as the ghost in 2 short, eerie sentences about what you remember. No emojis.`&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`GHOST: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;ghost&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;logEvent&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;resurrected&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;attempt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;narration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ghost&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;
  
  
  Gemma via Ollama
&lt;/h3&gt;

&lt;p&gt;Gemma does two jobs: it summarizes each file and writes the ghost's lines. It runs locally in Ollama (default &lt;code&gt;gemma3:4b&lt;/code&gt;, and the model name is one environment variable), with no API key and no per-token cost.&lt;/p&gt;

&lt;h3&gt;
  
  
  Killing it for real
&lt;/h3&gt;

&lt;p&gt;The dashboard's &lt;strong&gt;Kill it&lt;/strong&gt; button sends a hard kill (SIGKILL) to the most recent worker process. The worker gets no chance to finish its step or say goodbye. A tiny supervisor (&lt;code&gt;keepalive.ts&lt;/code&gt;) notices the death and starts a fresh worker five seconds later. After that there is a pause of up to 30 seconds while Temporal waits for the killed step's timeout to expire. Then the ghost speaks and the work continues.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Nothing leaves my machine.&lt;/strong&gt; This agent reads local files. An agent that can read your files should not be sending them to a server you don't control. With a local open-weight model, the files never leave the disk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Killing it is free.&lt;/strong&gt; The whole point of this project is to murder the agent over and over. On a paid API, every retried step and every ghost line costs money. Here, a resurrection costs electricity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I can see inside it.&lt;/strong&gt; Temporal's event history shows every attempt, timeout and retry. When my report step failed four times, I could read exactly why instead of guessing at a black box.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Spirit of It
&lt;/h2&gt;

&lt;p&gt;The moment it landed for me was the first real kill. I clicked the button, the worker window went dead, and for half a minute nothing happened. Then a new process started, and the first thing it printed was not a summary. It was the ghost, describing its own death on &lt;code&gt;file7.txt&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I knew exactly what had happened under the hood: a retry, a counter, a prompt. It was still strange to read a process describing its own death and then watch it quietly finish the job.&lt;/p&gt;

&lt;p&gt;Underneath the joke is something I care about. Work that survives its worker is not just spooky, it is useful. If an agent can be killed without losing anything, you can restart it, move it, or let it crash, and it keeps going.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gemma:&lt;/strong&gt; the open-weight model behind every summary and every ghost line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Temporal:&lt;/strong&gt; durable execution is what makes the resurrection real.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Render:&lt;/strong&gt; hosts the live demo page.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Give the ghost a memory across lives, so it can say "this is my third death"&lt;/li&gt;
&lt;li&gt;Trace every life of the agent with Sentry Agent Tracing&lt;/li&gt;
&lt;li&gt;Make the event log idempotent with a dedupe key (workflow ID + step ID)&lt;/li&gt;
&lt;li&gt;Let the dashboard replay old runs&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Durable execution for local LLM workflows: what I’m learning</title>
      <dc:creator>Khushighosh</dc:creator>
      <pubDate>Wed, 28 Oct 2026 06:14:08 +0000</pubDate>
      <link>https://dev.to/khushighosh/durable-execution-for-local-llm-workflows-what-im-learning-50ie</link>
      <guid>https://dev.to/khushighosh/durable-execution-for-local-llm-workflows-what-im-learning-50ie</guid>
      <description>&lt;p&gt;Most LLM demos assume the process stays alive. Kill it midway and the plan, the tool results, and the context all go with it. I've been spending time with a few tools that change that, and this is what I've picked up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Durable execution changes how you think about failure
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://temporal.io" rel="noopener noreferrer"&gt;Temporal&lt;/a&gt; records every step of a workflow in an event history. If a worker dies, another one replays that history and continues from the last completed step. Finished work doesn't run twice.&lt;/p&gt;

&lt;p&gt;For LLM workflows this maps well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model and tool calls belong in activities.&lt;/strong&gt; They're slow, non-deterministic, and can fail, which is what activities are for.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workflow code has to stay deterministic.&lt;/strong&gt; Replay depends on it, so randomness, network calls, and timestamps stay out of it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retries become policy, not code.&lt;/strong&gt; Backoff and timeouts are configuration instead of nested try/catch blocks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Local models make failure cheap to test
&lt;/h2&gt;

&lt;p&gt;Running a model through &lt;a href="https://ollama.com" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt; keeps the loop on your own machine. No rate limits, no API bill, and killing a process mid-run costs nothing. That makes it easy to test the unhappy path often, which is where most of the real bugs are.&lt;/p&gt;

&lt;p&gt;The trade-off is that small local models are less predictable than hosted ones. Durable execution helps here because a bad step can be retried or inspected without redoing the whole run.&lt;/p&gt;

&lt;h2&gt;
  
  
  You can't trust what you can't see
&lt;/h2&gt;

&lt;p&gt;Retries and resumes are invisible by default, and invisible failures are the hardest to debug. &lt;a href="https://docs.sentry.io/" rel="noopener noreferrer"&gt;Sentry's tracing&lt;/a&gt; is a good fit, since a trace per step shows which call was slow, which one retried, and where a run picked back up.&lt;/p&gt;

&lt;p&gt;A small React dashboard on top of the workflow history makes this easier still. Seeing a run's attempts as a timeline beats reading logs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Open questions I'm still working through
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;How much state can sit in workflow history before replay gets slow?&lt;/li&gt;
&lt;li&gt;Which failures should resume, and which should stop the run?&lt;/li&gt;
&lt;li&gt;Does durability change how you write prompts and tool definitions?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'll share more as I find answers.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>llm</category>
      <category>programming</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>console.log is a legitimate debugging tool</title>
      <dc:creator>Khushighosh</dc:creator>
      <pubDate>Tue, 27 Oct 2026 14:38:01 +0000</pubDate>
      <link>https://dev.to/khushighosh/consolelog-is-a-legitimate-debugging-tool-2dhp</link>
      <guid>https://dev.to/khushighosh/consolelog-is-a-legitimate-debugging-tool-2dhp</guid>
      <description>&lt;p&gt;I've used breakpoints, profilers, and all the fancy devtools. But when something breaks at 1 AM, my first move is still:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;here&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;here 2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;WHY IS THIS UNDEFINED&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's not pretty, but it works. Here's what I've noticed over time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Writing a log forces me to state what I expect.&lt;/strong&gt; To log a value, I first have to decide what it should be at that line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It works everywhere.&lt;/strong&gt; Every language, every stack, zero setup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The bug often shows up while I'm typing the log.&lt;/strong&gt; Half the time I find it before running anything.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where it stops working
&lt;/h2&gt;

&lt;p&gt;The rule I follow now: if I've added more than 5 logs, I'm guessing, not debugging.&lt;/p&gt;

&lt;p&gt;At that point the logs have stopped answering questions and started adding noise. That's the moment to stop and step through the code with a real debugger, where I can inspect state, watch the call stack, and see exactly where the value changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Print debugging isn't the problem
&lt;/h2&gt;

&lt;p&gt;Used on purpose, &lt;code&gt;console.log&lt;/code&gt; is a fast way to test a hypothesis. The trouble starts when it replaces thinking.&lt;/p&gt;

&lt;p&gt;Print debugging isn't the problem. Not knowing when to stop is.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>debugging</category>
      <category>programming</category>
    </item>
    <item>
      <title>Let It Die: The Lazy Email Agent on TabPFN, Gemma and Temporal</title>
      <dc:creator>Khushighosh</dc:creator>
      <pubDate>Sun, 25 Oct 2026 06:45:27 +0000</pubDate>
      <link>https://dev.to/khushighosh/let-it-die-the-lazy-email-agent-on-tabpfn-gemma-and-temporal-10o0</link>
      <guid>https://dev.to/khushighosh/let-it-die-the-lazy-email-agent-on-tabpfn-gemma-and-temporal-10o0</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;Most “lazy” agents do your chores faster. Let It Die asks whether the chore needs doing at all.&lt;/p&gt;

&lt;p&gt;It reads incoming email and scores each message on how likely it is that ignoring it would cost you something. Then it does one of three things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Need you&lt;/strong&gt; (top 20% by score): a local Gemma model writes a two-line summary and a suggested action for a morning digest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low priority&lt;/strong&gt; (middle 60%): left alone and counted in the digest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Let it die&lt;/strong&gt; (bottom 20%): parked on a durable Temporal timer. If the sender follows up within 7 days, the email is escalated. If nothing arrives, it is archived.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Anyone whose inbox is full of mail that sorts itself out gets to be a little lazier: the cheapest task to finish is the one you never started, as long as you can tell which ones those are. On my held-out test slice of 1,981 emails, 398 (20%) were parked, and about 85% of them really got no reply.&lt;/p&gt;

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

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/qxheqsUqbcc" width="710" height="399"&gt;
  &lt;/iframe&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%2Fnojbw2bg4qendvviytez.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%2Fnojbw2bg4qendvviytez.png" alt="Terminal output of the Let It Die run showing need-you, low-priority and parked counts" width="799" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Real output from a run on held-out email:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;397 need you | 1186 low-priority | 398 parked on a timer (let it die)
In the 'need you' bucket, 46% were actually replied to (overall: 30%)

- john.henderson@enron.com | Wharton Tm #3 Presentation | he replied
  Summary: John reviewed the Wharton Tm #3 presentation and found it to be a good start.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In the parking demo, 8 emails were picked at random from the let-it-die bucket. 7 were archived, and all 7 truly needed no reply. 1 was escalated, because the sender wrote again.&lt;/p&gt;
&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Khushighosh" rel="noopener noreferrer"&gt;
        Khushighosh
      &lt;/a&gt; / &lt;a href="https://github.com/Khushighosh/let-it-die" rel="noopener noreferrer"&gt;
        let-it-die
      &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;Let It Die: an agent whose main skill is deciding not to act&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;Built for the Hacktoberfest Open-Source AI Challenge, Week 3 ("Slow and Steady").&lt;/p&gt;

&lt;p&gt;Most "lazy" agents do your chores faster. This one asks whether the chore needs doing at all. It scores each incoming email on how likely ignoring it is to cost you something, then:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Need you&lt;/strong&gt; (top 20% by score): a local Gemma model writes a two-line summary and a suggested action for the morning digest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low priority&lt;/strong&gt; (middle 60%): left alone, counted in the digest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Let it die&lt;/strong&gt; (bottom 20%): parked on a durable Temporal timer. If the sender follows up within 7 days, the email is escalated. If nothing arrives, it is archived.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;
&lt;pre class="notranslate"&gt;&lt;code&gt;emails ──&amp;gt; TabPFN score ──&amp;gt; triage ──┬─ need you ──&amp;gt; Gemma summary ──&amp;gt; morning digest
                                     ├─ low priority ──&amp;gt; counted only
                                     └─ let it die ──&amp;gt; Temporal timer (7 days)
                                                         ├─&lt;/code&gt;&lt;/pre&gt;…&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Khushighosh/let-it-die" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;MIT licensed. The README has the run steps (Windows, Python 3.12).&lt;/p&gt;

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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;emails -&amp;gt; TabPFN score -&amp;gt; triage -+- need you -&amp;gt; Gemma summary -&amp;gt; morning digest
                                  +- low priority -&amp;gt; counted only
                                  +- let it die -&amp;gt; Temporal timer (7 days)
                                                    +- follow-up signal -&amp;gt; escalate
                                                    +- timeout -&amp;gt; archive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TabPFN&lt;/strong&gt; (Prior Labs) predicts whether the owner replied within 7 days, from features built only from information available before each email arrived: sender history, who it was addressed to, time of day, subject and body cues, thread length. It needs no training run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemma&lt;/strong&gt; (gemma3:4b through Ollama, running locally) writes the summaries and suggested actions for the need-you bucket.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Temporal&lt;/strong&gt; runs one workflow per parked email. It waits for either a follow-up signal or a 7-day timeout, then escalates or archives. My demo uses Temporal’s time-skipping test server, so a week of waiting runs in seconds. When I made the first archive attempt fail on purpose, Temporal retried every one automatically, and all 7 archived emails logged attempt 2.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sentry&lt;/strong&gt; traces the whole run: the agent, the triage step, each Gemma call (model, token counts, full prompt and response) and the Temporal step. About 22 of the 23 seconds were the five local Gemma calls, each with an HTTP call to 127.0.0.1, my own machine. Triage took about a millisecond and parking eight emails about 1.3 seconds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The data.&lt;/strong&gt; I don’t have a two-sided mailbox of my own, so I used one mailbox of about 28,000 messages from the public Enron corpus (CMU, May 2015 release), which includes sent folders and lets me derive reply labels. The label is “the owner replied in the same thread within 7 days.” Sent mail stops being archived after May 2001, so every later email would look unanswered; I cut the timeline to Nov 1999 through May 2001, which left 9,902 usable emails. I trained on the earliest 80% (7,921 emails) and tested on the latest 20% (1,981 emails, 70.5% of which got no reply). The split is by time, so the model never sees the future.&lt;/p&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;ROC AUC&lt;/th&gt;
&lt;th&gt;Ignore lowest 10%: truly no reply / replied-to mail missed&lt;/th&gt;
&lt;th&gt;Ignore lowest 20%&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Sender reply-rate rule&lt;/td&gt;
&lt;td&gt;0.579&lt;/td&gt;
&lt;td&gt;68.2% / 10.8%&lt;/td&gt;
&lt;td&gt;73.7% / 17.8%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gradient boosting&lt;/td&gt;
&lt;td&gt;0.662&lt;/td&gt;
&lt;td&gt;92.4% / 2.6%&lt;/td&gt;
&lt;td&gt;88.4% / 7.9%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TabPFN&lt;/td&gt;
&lt;td&gt;0.687&lt;/td&gt;
&lt;td&gt;92.9% / 2.4%&lt;/td&gt;
&lt;td&gt;84.6% / 10.4%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;What I take from it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Both models clearly beat a rule based on the sender’s past reply rate.&lt;/li&gt;
&lt;li&gt;TabPFN’s AUC is higher by 0.024 (bootstrap 95% CI 0.003 to 0.043), but gradient boosting wins the 20% bucket. I call them comparable.&lt;/li&gt;
&lt;li&gt;The practical headline: the agent can park about 1 in 10 emails and be right 92 to 93% of the time, missing about 2.5% of the mail that actually got a reply.&lt;/li&gt;
&lt;li&gt;In the test slice, the need-you bucket was replied to 46% of the time against 30% overall, and the let-it-die bucket about 15%. It is a prioritizer, not an oracle.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What went wrong, and how I found it&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Every file looked missing.&lt;/strong&gt; Enron filenames end in a dot (1., 10.), and Windows quietly strips it, so Python saw an empty mailbox until I switched to Windows’ extended-length path prefix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The first test set had no positives.&lt;/strong&gt; The model scored a meaningless 98% accuracy. A month-by-month table showed replies falling to exactly 0 from June 2001, because the archive stops containing sent mail. I cut the timeline there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemma summarized the wrong message.&lt;/strong&gt; For an email where the sender wrote one line on top of a long forwarded chain, the summary described the oldest forwarded message. I found it by reading the cached email text next to the summary. Cutting each email at the first forwarded-message marker fixed that case: over five runs each (the last two of each at temperature 0 with a fixed seed), the unfixed version summarized the forwarded message every time and the fixed version summarized the sender’s reply every time. The prompt for that email also shrank from 649 to 90 tokens.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Replied within 7 days” is only a proxy for “needed action,” and “the sender wrote again” is a noisy follow-up signal. One escalated email in my demo came from a mailing list that re-sent the same subject line.&lt;/li&gt;
&lt;li&gt;One mailbox, one time-based split. The bootstrap interval treats emails as independent, though threads and senders cluster, so it is probably a little too tight.&lt;/li&gt;
&lt;li&gt;The parking demo uses 8 emails and a simulated clock, and “archive” writes to a log file instead of moving real mail.&lt;/li&gt;
&lt;li&gt;Gemma output is not deterministic, and identical prompts varied about 2x in latency between runs, so I only quote token counts for the forwarded-chain fix. That fix is one email, not a benchmark, and suggested actions vary between runs.&lt;/li&gt;
&lt;li&gt;Attachments aren’t in the email text, so suggested actions for attachment-only emails are generic.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The model that reads my mail runs on my machine.&lt;/strong&gt; Gemma runs locally through Ollama, and the Sentry trace shows every model call going to 127.0.0.1. There is no API bill and no third party reading the text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The waiting is durable and I don’t run a scheduler.&lt;/strong&gt; Temporal’s open-source tooling gave me timers that survive restarts and retries for flaky steps, with no cron job or home-made queue.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No training run.&lt;/strong&gt; TabPFN fits a small personal mailbox without a training step. The honest caveat: I used the hosted API, so the 5,000 training rows went to Prior Labs’ servers. I only did that with the public Enron data, and a deployment on private mail would need local weights or to accept that tradeoff.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anyone can reproduce the numbers.&lt;/strong&gt; The data is public and the code is in the repo.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I didn’t test a hosted LLM, so I can’t claim open wins on summary quality. The case for open here is privacy, cost and not depending on a service staying up.&lt;/p&gt;

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

&lt;p&gt;I haven’t pointed it at my own inbox, because I don’t have a two-sided mailbox, so these numbers come from public Enron mail, not from my own week. On the held-out slice of 1,981 emails, the agent would have taken 398 (20%) off the owner’s plate, and about 85% of those really got no reply. The price is the other 15%, about 60 emails that did get a reply and would have been archived unless the sender nudged again, which is about 10% of all the mail that was replied to. Each summary takes about 4 seconds on my laptop. I can’t honestly put a number on minutes saved, so I’m not going to.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of TabPFN:&lt;/strong&gt; the ignore-or-act predictor, compared with a rule and gradient boosting, with a bootstrap interval on the difference.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma:&lt;/strong&gt; local gemma3:4b summaries and suggested actions, with a documented failure and fix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Temporal:&lt;/strong&gt; one durable workflow per parked email, with a follow-up signal, a 7-day timeout and automatic retries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Sentry Agent Tracing:&lt;/strong&gt; a trace of the whole run with token counts, prompts and responses, and the before and after of the forwarded-chain fix.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>gemma</category>
      <category>tabpfn</category>
    </item>
    <item>
      <title>Using AI coding tools without losing your fundamentals</title>
      <dc:creator>Khushighosh</dc:creator>
      <pubDate>Sun, 18 Oct 2026 18:21:17 +0000</pubDate>
      <link>https://dev.to/khushighosh/using-ai-coding-tools-without-losing-your-fundamentals-2e77</link>
      <guid>https://dev.to/khushighosh/using-ai-coding-tools-without-losing-your-fundamentals-2e77</guid>
      <description>&lt;p&gt;AI can write a working login route in 10 seconds. That’s amazing, and also a little dangerous. If the tool always writes the code, you stop practicing the one skill the code depends on: understanding what it does and why it breaks.&lt;/p&gt;

&lt;p&gt;I’m an engineering student who uses AI tools regularly. [One line on which tools you use and for what.] Here are the rules I follow to keep the speed without losing the skills.&lt;/p&gt;

&lt;p&gt;The Problem: Code You Can’t Explain&lt;/p&gt;

&lt;p&gt;The first warning sign is code that works but that you couldn’t rewrite. [Your example: a time AI-generated code ran fine, then broke, and you couldn’t tell why.]&lt;/p&gt;

&lt;p&gt;When something fails, the AI can’t tell you whether the code matches what you meant. Only you can, and only if you understand it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Attempt First, Then Ask&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Spend 10 to 15 minutes on the problem before opening the tool. Even a failed attempt shows you where you actually get stuck, and it helps you judge the AI’s answer because you know what the question was.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ask for Explanations, Not Just Code&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Instead of “write a JWT logout route”, try “explain how logout works with stateless JWTs and what my options are.” Then write the code yourself. Use the tool as a tutor first and a code generator second.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Never Paste What You Can’t Explain&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Before accepting generated code, explain every line to yourself, or to a rubber duck. If a line is a mystery, ask about that line. The test: could I recreate this tomorrow without the tool?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read the Diff, Not Just the Result&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;“It runs” is not the same as “it’s correct.” Check these every time:&lt;/p&gt;

&lt;p&gt;What happens on bad input, empty values, or a failed network call?&lt;br&gt;
Did it add a dependency you didn’t need?&lt;br&gt;
Does it match the conventions of the rest of your codebase?&lt;br&gt;
Is anything hardcoded that shouldn’t be, like secrets or URLs?&lt;/p&gt;

&lt;p&gt;AI is great at the happy path and often skips the rest.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Keep a No-AI Practice Habit&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Pick one slot, such as one small project a month, where you work with no assistant. Think of it as gym time for your brain. It keeps your syntax recall, debugging and design instincts sharp.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Debug With Your Own Eyes First&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Before pasting an error into a chat, read the stack trace and add logs or breakpoints. Reading errors is one of the most valuable skills you can have, and it’s the first to fade when you outsource it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Verify Against the Docs&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;AI can confidently invent function names, options, and API behavior. When something looks unfamiliar, check the official documentation. [Optional: a time the tool gave you something that didn’t exist.]&lt;/p&gt;

&lt;p&gt;Weekly Self-Check&lt;/p&gt;

&lt;p&gt;Ask yourself:&lt;/p&gt;

&lt;p&gt;Could I explain my last three changes to a teammate?&lt;br&gt;
Did I fix my last bug by understanding it, or by retrying prompts until it vanished?&lt;br&gt;
Could I build this feature without the tool, even if slower?&lt;/p&gt;

&lt;p&gt;If any answer is “no,” slow down for a bit.&lt;/p&gt;

&lt;p&gt;Final Thoughts&lt;/p&gt;

&lt;p&gt;AI is good at producing code and bad at knowing what you need. That judgment is what makes you an engineer. Use the tool to move faster, but stay the person who understands the result.&lt;/p&gt;

&lt;p&gt;What rules do you follow? Drop them in the comments.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>beginners</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>6 Windows + Git traps I hit this week (and the 30-second fixes)</title>
      <dc:creator>Khushighosh</dc:creator>
      <pubDate>Sun, 18 Oct 2026 06:55:19 +0000</pubDate>
      <link>https://dev.to/khushighosh/6-windows-git-traps-i-hit-this-week-and-the-30-second-fixes-4h65</link>
      <guid>https://dev.to/khushighosh/6-windows-git-traps-i-hit-this-week-and-the-30-second-fixes-4h65</guid>
      <description>&lt;p&gt;I spent this week setting up a public GitHub repo on Windows. Almost every problem came from a tiny detail, and the error messages didn't explain any of them. Here are six, with the fixes.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. &lt;code&gt;cd /d&lt;/code&gt; fails in PowerShell
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;/d&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;C:\Users\me\Desktop\project&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Set-Location&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="nx"&gt;A&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;positional&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;parameter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;cannot&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;be&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;found&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;that&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;accepts&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;argument&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&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;code&gt;/d&lt;/code&gt; is a &lt;strong&gt;Command Prompt&lt;/strong&gt; option for switching drives. PowerShell doesn't need it. Check your prompt: if it starts with &lt;code&gt;PS&lt;/code&gt;, you're in PowerShell, so just run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;C:&lt;span class="se"&gt;\U&lt;/span&gt;sers&lt;span class="se"&gt;\m&lt;/span&gt;e&lt;span class="se"&gt;\D&lt;/span&gt;esktop&lt;span class="se"&gt;\p&lt;/span&gt;roject
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. "Cannot find module" usually means "wrong folder"
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: Cannot find module 'C:\Users\me\evaluate.mjs'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read the path in the error. It shows the folder your terminal is in, not the folder you meant. Run &lt;code&gt;cd&lt;/code&gt; into the project folder, then &lt;code&gt;dir&lt;/code&gt; to confirm the file is really there.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Downloads quietly rename your files
&lt;/h2&gt;

&lt;p&gt;Download the same file twice and Windows saves &lt;code&gt;evaluate (1).mjs&lt;/code&gt;. Your code asks for &lt;code&gt;evaluate.mjs&lt;/code&gt; and can't find it. Rename it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ren &lt;span class="s2"&gt;"evaluate (1).mjs"&lt;/span&gt; evaluate.mjs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Notepad saves &lt;code&gt;.gitignore.txt&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Windows File Explorer hides file extensions by default, so a stray &lt;code&gt;.txt&lt;/code&gt; is invisible. I ended up with both &lt;code&gt;.gitignore&lt;/code&gt; and &lt;code&gt;.gitignore.txt&lt;/code&gt;, and committed the wrong one by accident.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Turn on &lt;strong&gt;View → Show → File name extensions&lt;/strong&gt; in Explorer.&lt;/li&gt;
&lt;li&gt;In Notepad's Save As, put the name in quotes (&lt;code&gt;".gitignore"&lt;/code&gt;) and set "Save as type" to &lt;strong&gt;All files&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;dir&lt;/code&gt; in the terminal. It shows the real names.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. &lt;code&gt;git push&lt;/code&gt; says "rejected (fetch first)"
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;! [rejected]  main -&amp;gt; main (fetch first)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It means GitHub already has commits your computer doesn't. This usually happens when you tick "Add a README / .gitignore / licence" while creating a repo, and then push your own project. Prevention: create the repo &lt;strong&gt;empty&lt;/strong&gt;. If it's already happened:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git fetch origin
git log origin/main &lt;span class="nt"&gt;--oneline&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look at what's there. If you want to keep it, merge with &lt;code&gt;git pull origin main --allow-unrelated-histories&lt;/code&gt;. If it's only auto-generated starter files you don't need, &lt;code&gt;git push --force-with-lease&lt;/code&gt; replaces them, and it refuses if the remote changed since your last fetch. That makes it safer than a plain &lt;code&gt;--force&lt;/code&gt;. Never force-push to a repo where other people have real work.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. A page that calls an API can't be opened by double-clicking
&lt;/h2&gt;

&lt;p&gt;Opening &lt;code&gt;index.html&lt;/code&gt; from your folder gives it an address starting with &lt;code&gt;file://&lt;/code&gt;. If the page fetches data from a local server, you get &lt;code&gt;Failed to fetch&lt;/code&gt;. Start the server, then visit &lt;code&gt;http://localhost:PORT&lt;/code&gt; in the browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bonus: check before your first &lt;code&gt;git add .&lt;/code&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Write &lt;code&gt;.gitignore&lt;/code&gt; &lt;strong&gt;first&lt;/strong&gt;. Adding a file to &lt;code&gt;.gitignore&lt;/code&gt; after you've committed it doesn't remove it from history.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;git status&lt;/code&gt; before committing and read the list. Anything private (data files, &lt;code&gt;.env&lt;/code&gt;, exports) shouldn't be there.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these took long to fix, but each one cost me ten minutes of confusion. Hopefully this saves someone else those minutes.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>git</category>
      <category>windows</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Three things that surprised me while building this:

Re-runs were identical - Same model, same prompt, `temperature: 0`: byte-for-byte the same failures every time. That turned prompt tweaking into real A/B testing.

**A regex beat the prompt.** I</title>
      <dc:creator>Khushighosh</dc:creator>
      <pubDate>Sun, 18 Oct 2026 06:43:25 +0000</pubDate>
      <link>https://dev.to/khushighosh/three-things-that-surprised-me-while-building-this-re-runs-were-identical-same-model-same-3cdj</link>
      <guid>https://dev.to/khushighosh/three-things-that-surprised-me-while-building-this-re-runs-were-identical-same-model-same-3cdj</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/khushighosh/order-ledger-a-whatsapp-to-ledger-side-hustle-that-runs-offline-on-open-models-3nk0" class="crayons-story__hidden-navigation-link"&gt;Order Ledger: a WhatsApp-to-ledger side hustle that runs offline on open models&lt;/a&gt;
    &lt;div class="crayons-article__cover crayons-article__cover__image__feed"&gt;
      &lt;iframe src="https://www.youtube.com/embed/YMt1OxmEDiQ" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" title="Order Ledger: a WhatsApp-to-ledger side hustle that runs offline on open models"&gt;&lt;/iframe&gt;
    &lt;/div&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
      &lt;a href="https://dev.to/khushighosh/order-ledger-a-whatsapp-to-ledger-side-hustle-that-runs-offline-on-open-models-3nk0" class="crayons-article__context-note crayons-article__context-note__feed"&gt;&lt;p&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission 💸&lt;/p&gt;

&lt;/a&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/khushighosh" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F4152360%2F6ac43df7-8b20-4acc-913f-03da2c9dd0ef.jpg" alt="khushighosh profile" class="crayons-avatar__image" width="236" height="236"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/khushighosh" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Khushighosh
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Khushighosh
                
                
              
              &lt;div id="story-author-preview-content-4856517" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/khushighosh" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F4152360%2F6ac43df7-8b20-4acc-913f-03da2c9dd0ef.jpg" class="crayons-avatar__image" alt="" width="236" height="236"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Khushighosh&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/khushighosh/order-ledger-a-whatsapp-to-ledger-side-hustle-that-runs-offline-on-open-models-3nk0" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Oct 15&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/khushighosh/order-ledger-a-whatsapp-to-ledger-side-hustle-that-runs-offline-on-open-models-3nk0" id="article-link-4856517"&gt;
          Order Ledger: a WhatsApp-to-ledger side hustle that runs offline on open models
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/devchallenge"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;devchallenge&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/hf26challenge"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;hf26challenge&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ollama"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ollama&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/khushighosh/order-ledger-a-whatsapp-to-ledger-side-hustle-that-runs-offline-on-open-models-3nk0" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;6&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/khushighosh/order-ledger-a-whatsapp-to-ledger-side-hustle-that-runs-offline-on-open-models-3nk0#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              &lt;span class="hidden s:inline"&gt;Add&amp;nbsp;Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            5 min read
          &lt;/small&gt;
          
          &lt;div class="only-sidebar-menu-item trusted-visible-block print-hidden align-center"&gt;
                
                    
                
          &lt;/div&gt;

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

&lt;/div&gt;


</description>
      <category>ai</category>
      <category>llm</category>
      <category>sideprojects</category>
    </item>
    <item>
      <title>Order Ledger: a WhatsApp-to-ledger side hustle that runs offline on open models</title>
      <dc:creator>Khushighosh</dc:creator>
      <pubDate>Thu, 15 Oct 2026 12:45:33 +0000</pubDate>
      <link>https://dev.to/khushighosh/order-ledger-a-whatsapp-to-ledger-side-hustle-that-runs-offline-on-open-models-3nk0</link>
      <guid>https://dev.to/khushighosh/order-ledger-a-whatsapp-to-ledger-side-hustle-that-runs-offline-on-open-models-3nk0</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;Small sellers run on WhatsApp. A home baker, a tiffin service or a tailor gets orders like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C: bhaiya kal subah 20 samosa aur 1 dozen kachori chahiye
S: ho jayega, 20 samosa 10 rs each = 200, kachori 12 x 15 = 180. total 380
C: thik hai, paise delivery pe dungi. Neha, 9000000002
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then they copy it into a notebook, and a week later nobody remembers who paid the advance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Order Ledger&lt;/strong&gt; turns that chat into a structured order, shortened here:&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="nl"&gt;"customer"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Neha"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"phone"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"9000000002"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"items"&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;"samosa"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"qty"&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;"unit"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"pcs"&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;"kachori"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"qty"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"unit"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"pcs"&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;"delivery_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-10-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;"delivery_time"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"morning"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;380&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"paid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&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;"confirmed"&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;The seller checks it on a review screen, saves it, and gets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a &lt;strong&gt;schedule&lt;/strong&gt; grouped by day, with "today" and "overdue" markers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pending payments&lt;/strong&gt;, with the total owed and a button that copies a polite WhatsApp reminder&lt;/li&gt;
&lt;li&gt;an &lt;strong&gt;all orders&lt;/strong&gt; table with a CSV export for the accountant&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Who would pay?&lt;/strong&gt; Anyone who takes orders in chat and tracks them by hand: home bakers, cloud kitchens, tailors, small shops. The pain is the retyping and the money that slips through. Customer names, numbers and prices are also private, which is why the whole thing runs on the seller's own laptop.&lt;/p&gt;

&lt;p&gt;It handles English, Hinglish and Kannada in English letters, and it accepts exported WhatsApp chats as they are.&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

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

&lt;p&gt;The demo shows: pasting a WhatsApp-style chat, reading the order, fixing a field on the review screen, the schedule and pending-payments tabs, and then &lt;strong&gt;Wi-Fi switched off&lt;/strong&gt; with one more order processed.&lt;/p&gt;
&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Khushighosh" rel="noopener noreferrer"&gt;
        Khushighosh
      &lt;/a&gt; / &lt;a href="https://github.com/Khushighosh/Order-Ledger" rel="noopener noreferrer"&gt;
        Order-Ledger
      &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;Order Ledger&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;Turn messy WhatsApp order chats into a clean order book. It runs entirely on your own computer with an open-weight model, so customer names, phone numbers and prices never leave your laptop.&lt;/p&gt;

&lt;p&gt;Built for the Hacktoberfest Open-Source AI Challenge, Week 2 (Side Hustle).&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Who it's for&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;Home bakers, tiffin and cloud-kitchen sellers, tailors and small shops who take orders over WhatsApp and keep track in a notebook. Their chats are messy: English mixed with Hindi or Kannada, "kal subah", "advance 500 diya", orders that change halfway through. You paste the chat, and the app turns it into a structured order.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;What it does&lt;/h2&gt;
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Reads a pasted WhatsApp chat (an exported chat, text copied from WhatsApp Web, or lines typed with &lt;code&gt;C:&lt;/code&gt; for the customer and &lt;code&gt;S:&lt;/code&gt; for you) and extracts the customer, phone, items, quantities, delivery date and time, total, amount paid and status.&lt;/li&gt;
&lt;li&gt;Shows the result on…&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/Khushighosh/Order-Ledger" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;MIT licensed. There is nothing to &lt;code&gt;npm install&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama pull qwen2.5:7b
git clone https://github.com/Khushighosh/Order-Ledger.git
&lt;span class="nb"&gt;cd &lt;/span&gt;Order-Ledger
node server.mjs      &lt;span class="c"&gt;# then open http://localhost:3000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;&lt;strong&gt;The open pieces&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Runtime:&lt;/strong&gt; &lt;a href="https://ollama.com" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt;, serving &lt;code&gt;qwen2.5:7b&lt;/code&gt; (4.7 GB) as the default and &lt;code&gt;llama3.2:3b&lt;/code&gt; for comparison&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;App:&lt;/strong&gt; Node.js with no packages (built-in &lt;code&gt;http&lt;/code&gt; and &lt;code&gt;fetch&lt;/code&gt;), one HTML file for the UI, and a JSON file for storage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tests:&lt;/strong&gt; a small evaluation harness I wrote for this
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pasted chat ──► convertChat()  WhatsApp export → "C:" / "S:" lines (in the browser)
            ──► annotateDates() "kal" → "kal (2026-10-14)"
            ──► Ollama (qwen2.5:7b, temperature 0, JSON-schema output)
            ──► clean()         validate phone, units, dates (server)
            ──► review screen ──► orders.json ──► schedule / pending / CSV
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  1. Structured output, not "please reply in JSON"
&lt;/h3&gt;

&lt;p&gt;Ollama accepts a JSON schema as &lt;code&gt;format&lt;/code&gt;, so the model's reply always parses and uses only allowed values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;unit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;anyOf&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="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;enum&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;kg&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="s2"&gt;pcs&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="s2"&gt;litre&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="s2"&gt;box&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="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="s2"&gt;null&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="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;enum&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;confirmed&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="s2"&gt;tentative&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="s2"&gt;cancelled&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The schema guarantees the &lt;strong&gt;shape&lt;/strong&gt; of the answer, not that it's &lt;strong&gt;right&lt;/strong&gt;. That gap is why there's a review screen and a test harness.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Let code do code's job
&lt;/h3&gt;

&lt;p&gt;Small models are unreliable at date arithmetic, so the date lookup happens in code and the model only reads the result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&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;annotateDates&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cal&lt;/span&gt;&lt;span class="p"&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;rules&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;day after tomorrow&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;|&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;parso&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;/gi&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cal&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="nx"&gt;iso&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\b(?&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;!after &lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;tomorrow&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;|&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;kal&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;|&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;nale&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;/gi&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cal&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;iso&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;aaj&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;|&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;today&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;/gi&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cal&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="nx"&gt;iso&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;];&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;out&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;re&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;iso&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;out&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;re&lt;/span&gt;&lt;span class="p"&gt;,&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="s2"&gt;`&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="s2"&gt; (&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;iso&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;)`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;out&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;// "nale 2 litre dosa hittu"  →  "nale (2026-10-14) 2 litre dosa hittu"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Phone numbers are cleaned in code too, because the model kept returning &lt;code&gt;+91 90000 00009&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Measure everything
&lt;/h3&gt;

&lt;p&gt;I wrote 18 synthetic WhatsApp-style chats (fake names and numbers) and hand-labelled the expected JSON for each. &lt;code&gt;evaluate.mjs&lt;/code&gt; scores 9 fields per chat and breaks results down per field and per kind of chat (Hinglish, Kannada, same-day orders, "same as last time", and so on). With &lt;code&gt;temperature: 0&lt;/code&gt;, re-running an unchanged prompt gave identical results, so every prompt change could be A/B tested.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Test set&lt;/th&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Before the date fix&lt;/th&gt;
&lt;th&gt;After the date fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;12 chats (I tuned on these)&lt;/td&gt;
&lt;td&gt;qwen2.5:7b&lt;/td&gt;
&lt;td&gt;11/12 orders correct · 99% of fields&lt;/td&gt;
&lt;td&gt;9/12 · 96%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12 chats&lt;/td&gt;
&lt;td&gt;llama3.2:3b&lt;/td&gt;
&lt;td&gt;1/12 · 82%&lt;/td&gt;
&lt;td&gt;2/12 · 84%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6 fresh chats&lt;/td&gt;
&lt;td&gt;qwen2.5:7b&lt;/td&gt;
&lt;td&gt;3/6 · 91%&lt;/td&gt;
&lt;td&gt;5/6 · 96%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6 fresh chats&lt;/td&gt;
&lt;td&gt;llama3.2:3b&lt;/td&gt;
&lt;td&gt;3/6 · 89%&lt;/td&gt;
&lt;td&gt;3/6 · 91%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;On a laptop the 7B model takes about 14 seconds per order once loaded (about 50 seconds for the first order while the model loads). The 3B takes about 7.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. What went wrong (the useful part)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One extra example made the prompt worse.&lt;/strong&gt; Adding a fourth few-shot example dropped the 7B from 10/12 to 7/12 orders correct. With that example in the prompt, the 3B answered "same as last time" by inventing a pineapple cake order. I removed the example and the score came back.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A date bug hiding in my prompt.&lt;/strong&gt; For "aaj" (today) the 7B answered &lt;code&gt;2026-10-20&lt;/code&gt;, and for "nale" (Kannada for tomorrow) it answered &lt;code&gt;2026-10-17&lt;/code&gt;. The cause was that the date table in my prompt listed "Tuesday: 2026-10-20" (next week), and the test day was a Tuesday. The model read "today is Tuesday" and looked it up. I fixed it by labelling that row "next Tuesday" and moving the relative-date lookup into code. The fresh set went from 3/6 to 5/6.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Two of my labels were debatable.&lt;/strong&gt; Is "2 meals" an item named "meal" in pcs, or "tiffin" in boxes? I left those as known misses instead of tuning them away.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The 3B is fast and wrong.&lt;/strong&gt; Only 42% of its items were right on the 12-chat set, so I didn't ship it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;An honest note on the numbers:&lt;/strong&gt; I used both test sets to tune the prompt, and the date fix came after looking at the fresh set's failures. Treat these as indicative, not a benchmark. That's the reason the review screen exists.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Privacy by default.&lt;/strong&gt; A chat contains customer names, phone numbers and prices. Here it never leaves the laptop: the server only listens on &lt;code&gt;127.0.0.1&lt;/code&gt;, and orders live in a local file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No per-order cost.&lt;/strong&gt; The marginal cost of an order is the electricity on the seller's laptop, so a small seller can use it as much as they like.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I could test and choose.&lt;/strong&gt; In an afternoon I ran two models through the same harness, saw that the 3B wasn't good enough, and kept the 7B. Swapping a model is one setting (&lt;code&gt;MODEL=...&lt;/code&gt;). With a closed API I couldn't have inspected the setup this way, and an API-side model update could silently change the results.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reproducible.&lt;/strong&gt; The same model, prompt and &lt;code&gt;temperature: 0&lt;/code&gt; gave identical results on re-runs, which made the debugging above possible.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The trade-off, honestly:&lt;/strong&gt; I didn't benchmark a closed API, so I'm not claiming open models are more accurate. A hosted frontier model is probably better at the tricky chats and faster per order. What open models gave me is privacy, a zero running cost and full control. For a seller who handles customers' private data on a laptop, that was the better deal.&lt;/p&gt;

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

&lt;p&gt;I built this in a long chat session with Claude as a pair programmer. It drafted the first versions of the prompt, server and UI, and I ran everything on my own laptop, pasted the failures back, and made the decisions: which idea to build, which model to keep, what to revert. The best moments came from the failures, like the &lt;code&gt;2026-10-20&lt;/code&gt; date bug.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Overall winner (Side Hustle theme).&lt;/strong&gt; Open-weight models (Qwen2.5 and Llama 3.2) running locally through Ollama are the core of the product, and the code is MIT-licensed on GitHub.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>ollama</category>
      <category>ai</category>
    </item>
    <item>
      <title>Go Outside, Take a Photo, Let a Tiny AI Argue About It 🌇</title>
      <dc:creator>Khushighosh</dc:creator>
      <pubDate>Fri, 09 Oct 2026 20:36:06 +0000</pubDate>
      <link>https://dev.to/khushighosh/go-outside-take-a-photo-let-a-tiny-ai-argue-about-it-1n8a</link>
      <guid>https://dev.to/khushighosh/go-outside-take-a-photo-let-a-tiny-ai-argue-about-it-1n8a</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;p&gt;I asked a small AI model on my laptop to tell me how the sky changed between two sunsets. It told me there were more clouds in the first photo. Then I swapped the photos, and it said the exact same thing.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Same Spot&lt;/strong&gt; is a "what changed?" machine for the sky. 🌤️&lt;/p&gt;

&lt;p&gt;Every evening the sky puts on a different show. Same terrace, same skyline, completely different mood. I wanted to know whether a small AI model running on my own laptop could notice those differences the way I do: more clouds, a pinker sky, a hazier horizon, or the camera simply pointing somewhere else.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it gets you outside&lt;/strong&gt; 🚶‍♀️&lt;br&gt;
The photos are the whole point. You step outside at sunset, take a picture from the same spot, and go back to your life. The laptop only comes in afterwards, so the screen is the shortest part of the experience. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who it's for&lt;/strong&gt; 🌿&lt;br&gt;
Anyone who keeps a loose record of a place: gardeners watching a patch of soil, hikers returning to a viewpoint, bird watchers, or people who just like watching the same sky.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The twist&lt;/strong&gt; 🔄🧐&lt;br&gt;
I don't trust the model's first answer. Every pair of photos is compared &lt;strong&gt;twice, in both directions&lt;/strong&gt;, and I then check each claim against my own eyes. That's how I caught it inventing shadows, missing camera movement, and giving the same answer no matter which photo came first.&lt;/p&gt;

&lt;p&gt;Everything runs &lt;strong&gt;offline on a CPU-only laptop&lt;/strong&gt;, with no cloud, no account and no uploads. ☁️🚫&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

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

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


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Khushighosh" rel="noopener noreferrer"&gt;
        Khushighosh
      &lt;/a&gt; / &lt;a href="https://github.com/Khushighosh/same-spot" rel="noopener noreferrer"&gt;
        same-spot
      &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;p&gt;# Same Spot&lt;/p&gt;
&lt;p&gt;A local, no-cloud tool that compares photos of the same outdoor spot taken on different evenings, using an open-weight model (Gemma 3 4B via Ollama) on a CPU-only laptop.&lt;/p&gt;
&lt;p&gt;## How it works&lt;/p&gt;
&lt;p&gt;- &lt;code&gt;run\_all.py&lt;/code&gt; sends each pair of photos to Gemma 3 in both directions (forward and reversed)&lt;/p&gt;
&lt;p&gt;- results are saved to SQLite and rendered in &lt;code&gt;results.html&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;- a claim only counts if it survives the swap AND matches what I can see&lt;/p&gt;
&lt;p&gt;## Run it&lt;/p&gt;
&lt;p&gt;1. Install Ollama and run &lt;code&gt;ollama pull gemma3:4b&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;2. &lt;code&gt;pip install ollama pillow&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;3. Edit the &lt;code&gt;PHOTOS&lt;/code&gt; list in &lt;code&gt;run\_all.py&lt;/code&gt;, then &lt;code&gt;python run\_all.py&lt;/code&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Findings&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Brightness and warmth: often right, but not always (it once called the 9 Sept sky more orange, which was wrong).&lt;/li&gt;
&lt;li&gt;Framing: after the prompt fix it notices the framing differs in every run, but understates it ("slightly different").&lt;/li&gt;
&lt;li&gt;Position bias: in one pair it…&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/Khushighosh/same-spot" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Screenshots of the comparison
&lt;/h2&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%2Fqxo3nvulr1njf58lspog.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%2Fqxo3nvulr1njf58lspog.png" alt="Results for 9 Sept to 16 Sept: the forward and reverse runs shown next to the two sunset photos" width="800" height="557"&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%2F7z3rz8l5wpz0fne6uj4w.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%2F7z3rz8l5wpz0fne6uj4w.png" alt="Results for 16 Sept to 19 Sept: the model says &amp;quot;more clouds in Image 1&amp;quot; in both directions" width="799" height="554"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It 🛠️🤖
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model:&lt;/strong&gt; Gemma 3 4B, an open-weight model that can read images, run through Ollama.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hardware:&lt;/strong&gt; an Intel i7-13620H laptop with 16 GB RAM and no GPU. Each comparison took about 60 seconds (58 to 64 s across my runs).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pipeline:&lt;/strong&gt; a Python script resizes each photo, sends a pair to Gemma, saves the result in SQLite, and builds a plain &lt;code&gt;results.html&lt;/code&gt; page with the photos and findings side by side.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The method that mattered:&lt;/strong&gt; every pair is compared &lt;strong&gt;in both directions&lt;/strong&gt; (A to B, then B to A). A real finding should flip when I swap the order, and I then check each claim against my own eyes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What went wrong first.&lt;/strong&gt; My first prompt made the model invent shadows in silhouette scenes, say "city skyline remains consistent" when the foreground had completely changed, and treat a placeholder I forgot to replace ("EDIT TIME") as a real time of day. It also mixed up two causes: my photos were taken on different days &lt;em&gt;and&lt;/em&gt; at different minutes relative to sunset, so "brighter" could mean either.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I changed.&lt;/strong&gt; I told the model roughly when sunset is, asked it to say whether the framing differs before comparing anything, removed shadows from the prompt, and made it put anything it couldn't judge into an "uncertain" list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Results after the fix&lt;/strong&gt; 📊, scored by me against the photos:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pair&lt;/th&gt;
&lt;th&gt;Direction&lt;/th&gt;
&lt;th&gt;✅Correct&lt;/th&gt;
&lt;th&gt;⚠️Debatable&lt;/th&gt;
&lt;th&gt;❌Wrong&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;9 Sept to 16 Sept&lt;/td&gt;
&lt;td&gt;forward&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9 Sept to 16 Sept&lt;/td&gt;
&lt;td&gt;reverse&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;16 Sept to 19 Sept&lt;/td&gt;
&lt;td&gt;forward&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;16 Sept to 19 Sept&lt;/td&gt;
&lt;td&gt;reverse&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;11 of 19 claims correct, 5 debatable, 3 wrong: useful, but not trustworthy on its own.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What improved: no more invented shadows, the model now notices that the framing differs in every run, and it names specific foreground objects correctly (a dark metal beam in one photo, a blue roof in another).&lt;/p&gt;

&lt;p&gt;What still fails: it understates the framing change ("slightly different" when the camera angle is clearly different), and in one pair it said &lt;strong&gt;"more clouds in Image 1" in both directions&lt;/strong&gt;, attaching the claim to whichever photo came first. It also got the sky colour wrong in one run. That is exactly the kind of mistake the both-directions check exists to catch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I'd try next:&lt;/strong&gt; describe each photo on its own first, then compare the two text descriptions, so the model never sees two images in a fixed order. I'd also mount my phone in one spot on the terrace, so the framing stays the same and the sky is the only thing that changes.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Because the best thing I found only happened because I was allowed to poke the model.&lt;/strong&gt; 🔄&lt;/p&gt;

&lt;p&gt;Catching the position bias meant running every pair twice, rewriting the prompt again and again, and reading the raw output. With Gemma on my laptop, each extra run cost me about a minute and nothing else. Free to re-run meant free to doubt.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔒 &lt;strong&gt;My sunset photos never left my laptop.&lt;/strong&gt; The only copies online are the ones I chose to publish here.&lt;/li&gt;
&lt;li&gt;🔁 &lt;strong&gt;I could cross-examine it.&lt;/strong&gt; I controlled the model and the prompt, so I could swap the photo order, read what it actually said, and spot the invented shadows and the "more clouds in Image 1" habit.&lt;/li&gt;
&lt;li&gt;📡 &lt;strong&gt;It works anywhere.&lt;/strong&gt; No account, no connection, and no GPU, just a CPU-only laptop.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A bigger closed model would probably describe the sky better, and I'd rather say that than hide it. But I'd have had to trust its answer. With this one, I could check it.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma&lt;/strong&gt; 🤖: Gemma 3 4B is the whole engine. It's small enough to run locally through Ollama on a CPU-only laptop (about 60 seconds per comparison), and it reads images, so it could compare my sunset photos directly. I then tested it by running every pair in both directions and scoring 19 of its claims against the photos. That showed what Gemma gets right (named foreground objects), where it struggles (understating camera movement), and where it shows position bias.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>samespot</category>
      <category>touchgrass</category>
    </item>
    <item>
      <title>Study Buddy: an offline GATE study partner for my friend, built with Ollama</title>
      <dc:creator>Khushighosh</dc:creator>
      <pubDate>Sun, 04 Oct 2026 20:47:08 +0000</pubDate>
      <link>https://dev.to/khushighosh/study-buddy-an-offline-gate-study-partner-for-my-friend-built-with-ollama-kd7</link>
      <guid>https://dev.to/khushighosh/study-buddy-an-offline-gate-study-partner-for-my-friend-built-with-ollama-kd7</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Study Buddy&lt;/strong&gt;&lt;/em&gt; is an offline exam study partner I built for my friend &lt;strong&gt;Anushka&lt;/strong&gt;, who is preparing for &lt;strong&gt;GATE&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;GATE has a huge syllabus, and she wanted quick answers and practice questions from her own notes. I also wanted her study material to stay on her laptop and not go to someone else's server.&lt;/p&gt;

&lt;p&gt;You add your notes (PDF, text or markdown) to a folder, and Study Buddy does three things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Answers from your notes only.&lt;/strong&gt; Every answer cites its source, like &lt;code&gt;[notes.pdf p.3]&lt;/code&gt;. If the notes don't cover a question, it says so instead of guessing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quizzes you on your own material.&lt;/strong&gt; It writes multiple-choice questions from the notes and explains each answer with a pointer to the source.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tracks your weak spots.&lt;/strong&gt; It remembers which topics you get wrong and lets you practice them, so it works like a study partner and not just a chatbot.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything runs on a laptop. After the one-time download of the models, nothing is uploaded anywhere and it works with Wi-Fi off.&lt;/p&gt;

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

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/NCX1b1YHz8M" width="710" height="399"&gt;
  &lt;/iframe&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%2Fl7ju6agxmfn1b7eix5bd.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%2Fl7ju6agxmfn1b7eix5bd.png" alt="Screenshot of Study Buddy in a browser: the Ask tab with a question about the notes and an answer that cites its source file" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Anushka said after using it:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I usually spend a lot of time searching through my GATE notes whenever I get stuck on a topic. With Study Buddy, I can just ask a question and get an answer directly from my own notes, along with the page where it came from.&lt;/p&gt;

&lt;p&gt;The quiz feature is my favorite because it helps me figure out which topics I actually don't understand instead of just rereading everything. And knowing that my notes stay on my laptop makes me much more comfortable putting all my study material into it.&lt;/p&gt;
&lt;/blockquote&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/Khushighosh" rel="noopener noreferrer"&gt;
        Khushighosh
      &lt;/a&gt; / &lt;a href="https://github.com/Khushighosh/study-buddy" rel="noopener noreferrer"&gt;
        study-buddy
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Offline exam study buddy: ask questions and get quizzes from your own notes, using Ollama, local embeddings and ChromaDB. Nothing leaves your laptop.
    &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;Study Buddy&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;An offline exam study partner built for a friend. It answers questions and generates quizzes from their own notes, running entirely on a laptop with open models. Nothing is uploaded anywhere.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Features&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Ask questions and get answers with citations to the notes&lt;/li&gt;
&lt;li&gt;Says "This isn't covered in your notes" instead of guessing&lt;/li&gt;
&lt;li&gt;Multiple-choice quizzes generated from the notes&lt;/li&gt;
&lt;li&gt;Tracks weak topics and offers to practice them&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;How it works&lt;/h2&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;ingest.py&lt;/code&gt; splits your notes into chunks and embeds them with &lt;code&gt;nomic-embed-text&lt;/code&gt; into a local ChromaDB store.&lt;/li&gt;
&lt;li&gt;For each question, the closest chunks are retrieved and passed to &lt;code&gt;qwen2.5:7b&lt;/code&gt; with strict instructions to answer only from them and cite the source.&lt;/li&gt;
&lt;li&gt;Quiz mode asks the model for one multiple-choice question per chunk as JSON, validates it, and logs each result in SQLite so weak topics can be practiced again.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Stack&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;Ollama (qwen2.5:7b and nomic-embed-text), ChromaDB, SQLite, FastAPI, plain HTML.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Tested&lt;/h2&gt;…&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Khushighosh/study-buddy" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


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

&lt;p&gt;The whole thing is open-source and local:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ollama&lt;/strong&gt; runs the models on the laptop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;qwen2.5:7b&lt;/strong&gt; (open-weight) writes the answers and quiz questions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;nomic-embed-text&lt;/strong&gt; (open-weight) turns notes into embeddings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ChromaDB&lt;/strong&gt; stores the vectors locally; &lt;strong&gt;SQLite&lt;/strong&gt; stores quiz results.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FastAPI&lt;/strong&gt; serves a small plain-HTML page, so it's used in a browser and not in a terminal.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How it works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;ingest.py&lt;/code&gt; extracts text from the notes, splits it into overlapping chunks, and stores each chunk with its file name and page number so answers can cite sources.&lt;/li&gt;
&lt;li&gt;For each question, the closest chunks are retrieved and passed to the model with strict instructions: answer only from these notes, cite them, and say so if the answer isn't there.&lt;/li&gt;
&lt;li&gt;For quizzes, the model is asked for one question as JSON (&lt;code&gt;topic&lt;/code&gt;, &lt;code&gt;question&lt;/code&gt;, four options, &lt;code&gt;answer_index&lt;/code&gt;, &lt;code&gt;explanation&lt;/code&gt;). The code validates the JSON and retries once if it's malformed.&lt;/li&gt;
&lt;li&gt;Each answer is logged in SQLite by topic, so "Practice my weak topic" picks the topic with the lowest accuracy.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Tested on:&lt;/strong&gt; a Windows laptop with 16 GB RAM, an Intel Core i7-13620H and no dedicated GPU, so everything runs on the CPU. Timings were about 55 s for the first answer after starting the server (the model has to load), about 42 s for a normal answer, and about 35 s per quiz question. That's slower than a cloud chatbot, but it works on an ordinary laptop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Limitations:&lt;/strong&gt; a 7B model can still misread a passage, so every answer shows its source for checking. Answers are slow on a CPU-only laptop, and notes are added through a folder and an indexing command, not an upload button.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Privacy:&lt;/strong&gt; notes never leave the laptop. With a closed API, every question would have sent her study material to a server I don't control. Here I could demo it with Wi-Fi off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost:&lt;/strong&gt; it costs nothing per question, so people can ask as much as they like during revision.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Control:&lt;/strong&gt; the models are open weights, so swapping one is a one-line change (&lt;code&gt;CHAT_MODEL&lt;/code&gt; in &lt;code&gt;rag.py&lt;/code&gt;), which lets someone with a weaker laptop trade answer quality for speed. I also wrote the prompts so the model refuses when the notes don't cover something, which matters for exam prep.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reproducible:&lt;/strong&gt; anyone with a similar laptop can run it from the README. There are no API keys or accounts.&lt;/li&gt;
&lt;/ul&gt;

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