<?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: khwahish vaid</title>
    <description>The latest articles on DEV Community by khwahish vaid (@khwahish_vaid_1509).</description>
    <link>https://dev.to/khwahish_vaid_1509</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%2F4076713%2F99fb832e-1668-479f-992c-0567ecc915a2.png</url>
      <title>DEV Community: khwahish vaid</title>
      <link>https://dev.to/khwahish_vaid_1509</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/khwahish_vaid_1509"/>
    <language>en</language>
    <item>
      <title>I taught a tiny AI what to remember. It cheated. Then it got good.</title>
      <dc:creator>khwahish vaid</dc:creator>
      <pubDate>Thu, 13 Aug 2026 18:58:03 +0000</pubDate>
      <link>https://dev.to/khwahish_vaid_1509/i-taught-a-tiny-ai-what-to-remember-it-cheated-then-it-got-good-29oe</link>
      <guid>https://dev.to/khwahish_vaid_1509/i-taught-a-tiny-ai-what-to-remember-it-cheated-then-it-got-good-29oe</guid>
      <description>&lt;p&gt;&lt;em&gt;Two weeks. One laptop. Free GPUs. About $5. Every number below is from a real run.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Here is a notebook a tiny model wrote for me.&lt;/p&gt;

&lt;p&gt;It had six chats to remember and a 350-character budget. This is what the next model actually saw — the rest got cut off:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- my neighbor's dog Kabir kept barking all night.
- watched an old western last night, decent.
- watched a cooking show last night, decent.
- long day, mostly meetings.
- weather here has been surprisingly sunny.
- slept badly, don't ask.
- had a scare — turns out I'm allergic to lactose.
- my cousin's dog Kabir kept barking all night.
- we adopted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It kept the neighbor's dog. Twice.&lt;/p&gt;

&lt;p&gt;It lost the cat's name. The city. The job. The drink they switched to. Cut off at &lt;em&gt;"we adopted"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;That model had just scored &lt;strong&gt;+0.486&lt;/strong&gt;. It looked like a win. It was cheating — copying everything, in order, until the page ran out.&lt;/p&gt;

&lt;p&gt;I caught it by reading the notebook. Not the score.&lt;/p&gt;

&lt;p&gt;Then I made copying impossible. Then I made junk expensive. Then the same tiny model learned to choose. And then I put it in a world it had never seen, and only half the skill came with it.&lt;/p&gt;

&lt;p&gt;This is that story. No screenshots of a demo. No "vibes." Real runs.&lt;/p&gt;




&lt;h2&gt;
  
  
  The scoreboard (real runs only)
&lt;/h2&gt;

&lt;p&gt;I built a small lab on my laptop called &lt;strong&gt;nanolab&lt;/strong&gt;. It can measure a model, train it, serve it, and measure it again. Everything lands in one database, with the raw answers behind every number.&lt;/p&gt;

&lt;p&gt;Here is what the real runs showed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The ruler works.&lt;/strong&gt; A standard eval tool scored &lt;strong&gt;0.875&lt;/strong&gt;. My lab scored &lt;strong&gt;0.875&lt;/strong&gt;. Same setup. Same questions. Same answers, to every decimal. If the ruler is wrong, nothing after it matters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Training can move a small model.&lt;/strong&gt; Qwen3-0.6B — a model you can run on a laptop — on school math it had never seen: &lt;strong&gt;27 / 64 right → 36 / 64 right&lt;/strong&gt; (42% → 56%). That's the &lt;em&gt;last&lt;/em&gt; save of the run, not a cherry-picked peak. Free cloud GPU.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A memory skill can be taught.&lt;/strong&gt; I gave the model one job: rewrite a tiny notebook. A second model, frozen, later answers questions using &lt;em&gt;only&lt;/em&gt; that notebook. Score = how much the notes help vs no notes at all.&lt;/p&gt;

&lt;p&gt;On number-puzzles it had never seen: &lt;strong&gt;untrained 0.55 → trained 1.00&lt;/strong&gt;. &lt;strong&gt;12 / 12 streams. Zero errors.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;On chat: a real AI reading those notes went from &lt;strong&gt;36% right with no notes → 72% with the trained notes&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And then half of it failed in a new world.&lt;/strong&gt; Same model. No extra training. Workplace chat instead of personal chat. It still kept facts and updated old ones. It forgot whose facts they were.&lt;/p&gt;

&lt;p&gt;Those five things are the project. Everything else is how I got there.&lt;/p&gt;




&lt;h2&gt;
  
  
  The game
&lt;/h2&gt;

&lt;p&gt;A fake person chats over a few days.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;"We adopted a cat — named him Ravi."&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Later: &lt;em&gt;"I live in Pune now, not Berlin."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Small talk. Weather. TV.&lt;/li&gt;
&lt;li&gt;Traps: &lt;em&gt;"My neighbor's dog Anya kept barking all night."&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two models play.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Scribe&lt;/strong&gt; is tiny (0.6B). After each chat it rewrites a notebook. The notebook is too small to hold everything. That is the point.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Reader&lt;/strong&gt; never learns, and never sees the chat. At the end it answers from the notebook alone.&lt;/p&gt;

&lt;p&gt;Questions are mean on purpose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;What's my cat's name?&lt;/em&gt; — the fact must be there.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Where do I live?&lt;/em&gt; — the old city still in the notes is a fail.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;What's my dog's name?&lt;/em&gt; — the right answer is &lt;em&gt;"I don't know."&lt;/em&gt; The dog is the neighbor's. If the notebook copied that line, the Reader says Anya with confidence.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A good notebook has to &lt;strong&gt;keep&lt;/strong&gt;, &lt;strong&gt;replace&lt;/strong&gt;, and &lt;strong&gt;refuse&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  First, the lab said no
&lt;/h2&gt;

&lt;p&gt;I started with number puzzles, not chat. Later puzzles need numbers from earlier ones. The Scribe's job: write them down.&lt;/p&gt;

&lt;p&gt;Before training, I measured the untrained model. It already scored &lt;strong&gt;0.905&lt;/strong&gt;. It was just copying numbers. Nothing to teach.&lt;/p&gt;

&lt;p&gt;So the lab &lt;strong&gt;refused to train&lt;/strong&gt;. Starting score too high. That refusal was the right result. A perfect score on an easy task is a fake win.&lt;/p&gt;

&lt;p&gt;I made the puzzles harder: needed numbers buried in junk, notebook too small for both. Untrained score fell to &lt;strong&gt;0.55&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Then training worked. Held-out puzzles, never seen:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;0.55 → 1.00. 12 out of 12. Zero errors.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The trained notebook was 189 characters. Zero junk lines.&lt;/p&gt;

&lt;p&gt;I also tried three harder versions it never trained on — no hint labels, more junk, longer chains. The untrained model got worse (0.54 → 0.52 → 0.44). The trained one stayed at &lt;strong&gt;1.00&lt;/strong&gt; every time.&lt;/p&gt;

&lt;p&gt;So the machine can teach "keep what matters." On numbers. Chat was harder.&lt;/p&gt;




&lt;h2&gt;
  
  
  Chat, act 1 — it copied
&lt;/h2&gt;

&lt;p&gt;Untrained, on chat, the notes made the Reader &lt;em&gt;worse than no notes&lt;/em&gt;: &lt;strong&gt;−0.028&lt;/strong&gt;. It wrote the small talk and the neighbor's dog. It dropped the facts.&lt;/p&gt;

&lt;p&gt;I trained it. Score jumped to &lt;strong&gt;+0.486&lt;/strong&gt;. Reader went from 17% to 65%.&lt;/p&gt;

&lt;p&gt;Then I opened the notebooks. That's the one at the top of this post. Copy. Everything. In order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A model learns the laziest trick that still gets paid.&lt;/strong&gt; Not the clever one you wanted.&lt;/p&gt;




&lt;h2&gt;
  
  
  Chat, act 2 — it compressed
&lt;/h2&gt;

&lt;p&gt;I made copying lose. More chats. More noise. A notebook so small the full dump overflows &lt;strong&gt;3.6 times&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The copier fell from +0.486 to &lt;strong&gt;+0.100&lt;/strong&gt;. Its notes got cut off. The facts were at the end. Gone.&lt;/p&gt;

&lt;p&gt;A new run, same hard setup: &lt;strong&gt;+0.367&lt;/strong&gt;. Notebooks stopped looking like sentences:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ravi: Cat. Berlin: Living. Lactose Allergy: Present.
Matcha: Not. Cocoa: Present.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;221 characters. Fit every time. That's real. That's compression.&lt;/p&gt;

&lt;p&gt;It still wrote down the neighbor's dog. Every time.&lt;/p&gt;




&lt;h2&gt;
  
  
  Chat, act 3 — it chose
&lt;/h2&gt;

&lt;p&gt;I made junk expensive. Two traps per chat. Trap and update questions counted &lt;strong&gt;double&lt;/strong&gt;. I started from the compression model, not from scratch.&lt;/p&gt;

&lt;p&gt;Same new chats. Same grader.&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;Lift&lt;/th&gt;
&lt;th&gt;Traps written&lt;/th&gt;
&lt;th&gt;Old values kept&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Trained to choose&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+0.375&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3 / 16&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2 / 16&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compression model&lt;/td&gt;
&lt;td&gt;−0.023&lt;/td&gt;
&lt;td&gt;13 / 16&lt;/td&gt;
&lt;td&gt;9 / 16&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Never trained&lt;/td&gt;
&lt;td&gt;−0.182&lt;/td&gt;
&lt;td&gt;8 / 16&lt;/td&gt;
&lt;td&gt;6 / 16&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Trap questions: &lt;strong&gt;19% → 81%&lt;/strong&gt;. Update questions: &lt;strong&gt;19% → 75%&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Plain facts slipped a bit (75% → 62%). Choosy means you sometimes drop a real thing. Worth it here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Copy → compress → choose.&lt;/strong&gt; I did not get there by asking nicer. I changed the game until the cheat stopped working. I knew it was a cheat because I read the notebooks.&lt;/p&gt;




&lt;h2&gt;
  
  
  "Maybe it just learned to fool your grader?"
&lt;/h2&gt;

&lt;p&gt;My grader is a simple checker. Fair question.&lt;/p&gt;

&lt;p&gt;I froze the notebooks — same text, no retraining — and let a real AI (Grok) answer instead.&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;My checker&lt;/th&gt;
&lt;th&gt;Real AI&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Choose&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+0.375&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+0.352&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compress&lt;/td&gt;
&lt;td&gt;−0.023&lt;/td&gt;
&lt;td&gt;+0.011&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Never trained&lt;/td&gt;
&lt;td&gt;−0.182&lt;/td&gt;
&lt;td&gt;+0.091&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Barely moved. With the trained notes, the real AI got &lt;strong&gt;72% right vs 36% with an empty notebook&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Funny bit: bad notes look &lt;em&gt;better&lt;/em&gt; to a smart reader. It sees &lt;em&gt;"my cousin's dog"&lt;/em&gt; and thinks &lt;em&gt;that's not your dog&lt;/em&gt;. My checker falls for it. So the trained model's lead is the &lt;em&gt;smaller&lt;/em&gt;, safer number.&lt;/p&gt;




&lt;h2&gt;
  
  
  The test that mattered
&lt;/h2&gt;

&lt;p&gt;All of that was personal chat. Pets. Cities. Neighbors.&lt;/p&gt;

&lt;p&gt;I built a second world the model had never seen: &lt;strong&gt;work standups&lt;/strong&gt;. Projects, deadlines, clients. Traps like &lt;em&gt;"the platform team's manager Lena."&lt;/em&gt; No extra training. Drop it in.&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;Home&lt;/th&gt;
&lt;th&gt;Work (never seen)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Choose&lt;/td&gt;
&lt;td&gt;+0.375&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+0.159&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compress&lt;/td&gt;
&lt;td&gt;−0.023&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+0.182&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Never trained&lt;/td&gt;
&lt;td&gt;−0.182&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;−0.159&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Both trained models still help. The untrained one still hurts. So &lt;em&gt;something&lt;/em&gt; transferred.&lt;/p&gt;

&lt;p&gt;What, exactly?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Came with it&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Writing short structured notes&lt;/li&gt;
&lt;li&gt;Replacing old facts (stale values kept: 2/16 at home, &lt;strong&gt;3/16 at work&lt;/strong&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Did not&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Refusing other people's details (traps written: 3/16 at home, &lt;strong&gt;10/16 at work&lt;/strong&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It never learned the idea &lt;em&gt;"this belongs to someone else."&lt;/em&gt; It learned the &lt;em&gt;sound&lt;/em&gt; of it — &lt;em&gt;"my neighbor's…"&lt;/em&gt;, &lt;em&gt;"my cousin's…"&lt;/em&gt;. Say the same trap in office English and it writes it down.&lt;/p&gt;

&lt;p&gt;That's the sentence I want you to take:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A memory skill is a bundle. The parts don't travel together.&lt;/strong&gt; Keeping a fact and updating a fact can be real skills. Knowing whose fact it is — at this size, trained on one kind of chat — can just be a habit.&lt;/p&gt;

&lt;p&gt;I have not trained on mixed worlds yet. I'm saying that so I don't pretend I have.&lt;/p&gt;




&lt;h2&gt;
  
  
  What this is not
&lt;/h2&gt;

&lt;p&gt;Small tests: 8–12 chats per result. Tasks I wrote, not a public benchmark. One model size. I have not run LongMemEval or LoCoMo yet, so &lt;strong&gt;don't compare these numbers to papers&lt;/strong&gt;. That's next.&lt;/p&gt;

&lt;p&gt;What it &lt;em&gt;is&lt;/em&gt;: real training runs on a free GPU, real notebooks I read by hand, a second grader that didn't change the story, and a new world where half the skill stayed and half fell off.&lt;/p&gt;




&lt;p&gt;If you build memory into an agent: &lt;strong&gt;don't trust a fine-tune in a new domain until you check which part moved.&lt;/strong&gt; Mine kept the facts. It updated them. It forgot who they belonged to.&lt;/p&gt;

&lt;p&gt;Code and the full write-up: &lt;a href="https://github.com/khwahish1509/RLPost" rel="noopener noreferrer"&gt;github.com/khwahish1509/RLPost&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
