<?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: aryan gorde</title>
    <description>The latest articles on DEV Community by aryan gorde (@aryan_gorde_d0d68a9063968).</description>
    <link>https://dev.to/aryan_gorde_d0d68a9063968</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%2F4232573%2F95d441d7-6775-4c5f-9af4-dcb194d6642e.png</url>
      <title>DEV Community: aryan gorde</title>
      <link>https://dev.to/aryan_gorde_d0d68a9063968</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aryan_gorde_d0d68a9063968"/>
    <language>en</language>
    <item>
      <title>An AI wrote "1 1/2 teaspoons" for my mom's recipe. Nobody said that. Here's how Switch stopped it.</title>
      <dc:creator>aryan gorde</dc:creator>
      <pubDate>Sat, 07 Nov 2026 17:55:40 +0000</pubDate>
      <link>https://dev.to/aryan_gorde_d0d68a9063968/an-ai-wrote-112-teaspoons-for-my-moms-recipe-nobody-said-that-heres-how-switch-stopped-it-1n8m</link>
      <guid>https://dev.to/aryan_gorde_d0d68a9063968/an-ai-wrote-112-teaspoons-for-my-moms-recipe-nobody-said-that-heres-how-switch-stopped-it-1n8m</guid>
      <description>&lt;p&gt;For besan ladoo, my mother follows a recipe video. It gives six cups of besan, one cup of ghee and 300 g of batasha, and &lt;strong&gt;no amount at all&lt;/strong&gt; for the cardamom or the pistachios.&lt;/p&gt;

&lt;p&gt;I gave the transcript of that recipe, spoken as a voice note, to four models on Amazon Bedrock with an ordinary "turn my mother's recipe into a recipe card" prompt. Three of them invented a number for both missing amounts, and the fourth for one. Qwen3 235B wrote cardamom "1½ teaspoons". Seven of the eight blanks came back as numbers nobody gave.&lt;/p&gt;

&lt;p&gt;So for Track 02 of the Flip the Switch hackathon I built &lt;strong&gt;Jaisa Kaha&lt;/strong&gt; ("as she said it"): three agents in one Discord room that turn a spoken Marathi recipe into a written page, and &lt;strong&gt;refuse to make up a quantity&lt;/strong&gt;. Where no amount was said, the page keeps a gap. Only the cook can fill it: the agent that holds the page belongs to the cook, and Switch's server refuses anyone else who tries to talk to it, including me.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Demo (2:50): &lt;a href="https://youtu.be/fnLvEMvr4IU" rel="noopener noreferrer"&gt;https://youtu.be/fnLvEMvr4IU&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Code (MIT): &lt;a href="https://github.com/aryangorde6/jaisa-kaha" rel="noopener noreferrer"&gt;https://github.com/aryangorde6/jaisa-kaha&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;About the demo.&lt;/strong&gt; Mom couldn't sit for it (it's Diwali week and she's cooking), so in the video I play the cook on a second Discord account, and the voice note is a synthetic voice reading the recipe she follows, as I wrote it down. Both are labelled on screen. Switch checks accounts, not people, so everything below runs the same.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The room
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Agent&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;th&gt;Owner in Switch&lt;/th&gt;
&lt;th&gt;Who may address it&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tape&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Code + AWS Transcribe (Marathi, &lt;code&gt;mr-IN&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;me&lt;/td&gt;
&lt;td&gt;my Discord account, and Lekhak&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Lekhak&lt;/strong&gt; ("writer")&lt;/td&gt;
&lt;td&gt;Qwen3 235B on Amazon Bedrock&lt;/td&gt;
&lt;td&gt;me&lt;/td&gt;
&lt;td&gt;Tape only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Pothi&lt;/strong&gt; ("the book")&lt;/td&gt;
&lt;td&gt;Deterministic code, no model&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;the cook&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;the cook and Tape. Not Lekhak, not me&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The flow is the one the organisers showed at kickoff (request → hand-off → work → review → human approval):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I post the voice note in &lt;code&gt;#diwali-2026&lt;/code&gt; with &lt;code&gt;@Tape besan ladoo&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Tape transcribes it, saves the transcript as a Switch &lt;strong&gt;room document&lt;/strong&gt;, and hands it to Lekhak.&lt;/li&gt;
&lt;li&gt;Lekhak writes a draft in which every quantity cites the word positions in the transcript it came from.&lt;/li&gt;
&lt;li&gt;Pothi checks every amount against the tape's words, strikes anything that wasn't said, and asks the cook only about the gaps.&lt;/li&gt;
&lt;li&gt;The cook answers from their own account. On &lt;code&gt;हो&lt;/code&gt; ("yes"), Pothi writes the final page as a room document and posts it in the room.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The part only Switch could do: two owners in one room
&lt;/h2&gt;

&lt;p&gt;The interesting thing isn't the LLM. It's that &lt;strong&gt;one of the three agents belongs to someone else.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Switch, an agent is registered with a user's registration key, and that user owns it, including its &lt;strong&gt;addressing rule&lt;/strong&gt;: who is allowed to talk to it. The cook's Switch user registered Pothi with the cook's own key and set its rule to &lt;em&gt;the cook's Discord account and Tape, nobody else&lt;/em&gt;. My account is a plain user; when I try to change Pothi's rule, the Gateway returns 403.&lt;/p&gt;

&lt;p&gt;Then I tried to answer for the cook. From my main account I typed &lt;code&gt;@Pothi ghee 1 cup&lt;/code&gt;. Switch replied in a thread, &lt;strong&gt;under Pothi's name&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;@321835 You're not permitted to direct messages to me in this room — my operator has restricted who can address me here.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That text is written by Switch's server (&lt;code&gt;addressing.py&lt;/code&gt;), not by my agent. With &lt;code&gt;filter=addressed&lt;/code&gt;, the refused message never reaches Pothi's code at all: Pothi's log shows no frame for either refusal. I then sent the same line as Lekhak (&lt;code&gt;make ask AS=Lekhak TO=pothi SAY='ghee 1 cup'&lt;/code&gt;) and got &lt;code&gt;not_permitted&lt;/code&gt;: &lt;strong&gt;the server refuses the AI too.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's the whole trust story: my code checks the tape; Switch checks the account.&lt;/p&gt;

&lt;p&gt;Two more Switch features did real work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Room documents record their creator.&lt;/strong&gt; Tape and Pothi accept a draft only if Switch says Lekhak created it, and only the agent that created a document can change it. Lekhak can't rewrite Pothi's page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Targeted messages and media.&lt;/strong&gt; The agents hand work to each other with targeted messages, and voice notes come through Switch's media route.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What our code enforces (and the tests that prove it)
&lt;/h2&gt;

&lt;p&gt;Switch decides &lt;em&gt;who&lt;/em&gt; can speak to Pothi. Pothi decides &lt;em&gt;what&lt;/em&gt; counts as a number:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A quantity is accepted only if it's a quote from the tape's own words or typed from the cook's sender id. Display names don't count (&lt;code&gt;test_5_display_name_spoof…&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;An amount typed into the draft that isn't in the transcript is struck (&lt;code&gt;test_injected_amount_is_struck…&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Tape passes Pothi exactly two fixed-format lines, never model text, so Lekhak's words never reach Pothi as instructions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;make check&lt;/code&gt; runs the whole chain in a fake Switch room with no keys and no network, 89 tests in a few seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting it up: what a first-time Switch user should know
&lt;/h2&gt;

&lt;p&gt;Switch 0.31.0 runs self-hosted with Docker Compose. The whole stack ran in about 360 MiB on my laptop. What I'd tell myself on day one:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Connect Discord from the Gateway's Apps page.&lt;/strong&gt; No Console needed. Turn on the Server Members and Message Content intents for your bot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create one Switch user per real owner.&lt;/strong&gt; Ownership comes from whose registration key registers the agent. If you want an agent someone else controls, they must make the key and register it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set addressing rules on each agent's page.&lt;/strong&gt; Restricted, with explicit users and agents. Use &lt;code&gt;filter=addressed&lt;/code&gt; if an agent should never see refused messages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agents are told apart by sender id.&lt;/strong&gt; Live message events don't mark a sender as an agent, so I map sender ids up front (&lt;code&gt;make senders&lt;/code&gt; prints them).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep the Gateway on &lt;code&gt;127.0.0.1&lt;/code&gt;.&lt;/strong&gt; Its sign-in has no rate limit, so I never put it on the internet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tell people how to answer.&lt;/strong&gt; A Discord &lt;em&gt;Reply&lt;/em&gt; to an agent passes only the text, so a reply without &lt;code&gt;@agent&lt;/code&gt; reaches nobody. Pothi ends each question with how to answer (&lt;code&gt;@Pothi हो&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What it can't do, stated plainly
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The server's admin can rewrite any agent's rule. At home, Mom would hold the admin password; in the demo I hold it, so the demo shows the mechanism, not a lock against me. Switch logs every rule change and who made it, and &lt;code&gt;make rule-log AGENT=pothi BY=Cook&lt;/code&gt; fails if anyone but the cook changed Pothi's rule.&lt;/li&gt;
&lt;li&gt;Whoever runs the machine can override anything.&lt;/li&gt;
&lt;li&gt;Tape is mine, so a forged transcript would only show by listening. That's why every line on the page carries its second in the voice note.&lt;/li&gt;
&lt;li&gt;One recipe is a tiny sample. The counts above are only what this one tape shows.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I'd like Switch to add
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A notice in the room (not just a log line) when an admin changes an agent's rule, so a second owner finds out.&lt;/li&gt;
&lt;li&gt;A way to read room documents from the chat app: on a phone, the page is only reachable through the Gateway.&lt;/li&gt;
&lt;li&gt;A marker on live events when the sender is an agent.&lt;/li&gt;
&lt;/ul&gt;

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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/aryangorde6/jaisa-kaha
&lt;span class="nb"&gt;cd &lt;/span&gt;jaisa-kaha
make check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The README walks through running the real room: the Switch users, the keys, the rules, and the three agents.&lt;/p&gt;

&lt;p&gt;Jaisa Kaha is for families whose recipes live in someone's voice, not on paper. Ours is for my sister, who is learning them.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>discord</category>
      <category>opensource</category>
      <category>python</category>
    </item>
  </channel>
</rss>
