{"slug": "neither-half-alone-a-measured-and-gate-between-a-model-and-its-state", "title": "Neither half alone: a measured AND gate between a model and its state", "summary": "Rajnish Choubey designed AXI, a host-side architecture that pairs an LLM's proposed state change with a deterministic gate and host-side completion, admitting a change only when both the model's proposal and the host's exact state agree. In a 400-step test on Gemini 3.8 Flash, applying model replies as written left state exact on 85 steps, a refuse-only gate on 84, and AXI on all 400, at $0.00117 per correct step versus $0.00524 and $0.00573. A separate test found none of 22 model-written state summaries matched the true state, which the authors cite as evidence that host-held state avoids lossy drift.", "body_md": "*Architecture by Rajnish Choubey; tests by Shalendra Gaur (with an AI assistant as a tool: this article was written with AI assistance and every number is read from a saved file in the repository linked at the end). AXI is a layer on the host side, for the company that runs the model; the model is unchanged and every claim here is about the state the host holds.*\n\nRajnish Choubey's note \"Logic AND Myth\" describes a gate that fires only when both of its inputs are live at the same moment. One input supplies the voltage, the uncontained leap. The other supplies the circuit, the deterministic structure that carries the current without burning down the house.\n\nRead as engineering, that is AXI. The model supplies the proposal, the host supplies the circuit, and a change goes through only when both are live. The application holds the exact state, the model proposes one change per step, a deterministic gate admits or refuses it, and the prompt for the next step is rebuilt, short, from the held state. It fits any LLM application that holds state, short jobs and long, from the first step.\n\nAn AND gate makes a testable claim: take either input away and the output fails. That claim was run.\n\nGemini 3.8 Flash, the first 400 requests of a 4,000-request job on a service graph, one change per step. The same stream, kept three ways:\n\n| How the state was kept | Steps with exactly the right state (of 400) | Dollars per step with the right state | \n|---|---|---|\n| The model's reply applied as written: the proposal with no circuit | 85 (broken on 223) | $0.00524, 4.5 times AXI | \n| A gate that only refuses bad replies | 84 (never broken) | $0.00573, 4.9 times AXI | \n| AXI: the proposal, the gate, and the host completing what the reply left out | 400 | $0.00117 | \n\nThe model's own replies were right 98% of the time. Applied as written, that left the state exact on 21% of the steps, because a slip that nothing catches stays in the state and every later step builds on it. The gate that only refuses is never corrupted, but its state is off the right one from step 210 to the end: refusing a reply does not supply what the reply left out. With both, the state was right on all 400 steps. The cost rows are arithmetic added after the results, at list prices of $0.75 in and $3.75 out per million tokens, thinking counted as output.\n\nThe prompt is rebuilt from the held state, so it only has to be enough for the next step, and the exact state is what makes it enough. Over all 4,000 steps the state the host held was exactly right on 4,000 and broken on none, and the prompt followed the size of the graph, not the step number: a mean of 648.8 tokens in the first tenth of the run and 755.4 in the last. On a separate 1,500-step job with about 40 lines of operations log in every request, the prompt was 2,824 tokens at every step.\n\nA common alternative is to let the model write the state down as a summary and carry that forward. In a test on a 14B model, over three jobs of 600 steps, the model wrote 22 such summaries of the state. None of the 22 equalled the true state: 19 differed (13 of them finished before the length limit, so the model wrote a state that was wrong, not a cut one) and 3 stopped at the limit before the edges line. A state the host holds cannot be lossy in that way, and a state the model rewrites can. The test page lists every arm side by side.\n\nReplay the saved 4,000-step run without a key or a GPU:\n\n```\ngit clone https://github.com/gaurshalendra2412/axi-runtime\ncd axi-runtime/python\npython3 quickstart_replay.py\n```\n\nIt prints 4,000 of 4,000, 3,954 of 4,000, 85 of 400 and 4.5 times. The summaries test is on this page: [https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/MEMORY_ARMS_TEST.md](https://github.com/gaurshalendra2412/axi-runtime/blob/main/docs/MEMORY_ARMS_TEST.md)", "url": "https://wpnews.pro/news/neither-half-alone-a-measured-and-gate-between-a-model-and-its-state", "canonical_source": "https://dev.to/shalendra_gaur_ecd0567a49/neither-half-alone-a-measured-and-gate-between-a-model-and-its-state-1i81", "published_at": "2026-12-04 15:02:07+00:00", "updated_at": "2026-12-04 15:14:55.332597+00:00", "lang": "en", "topics": ["large-language-models", "ai-agents", "ai-tools", "mlops"], "entities": ["Rajnish Choubey", "Shalendra Gaur", "AXI", "Gemini 3.8 Flash", "Google"], "also_reported_by": [], "takeaway": "Holding exact state on the host, gating each model-proposed change, and having the host complete what the reply omits kept state correct on 400 of 400 steps at $0.00117 per step, versus 85 of 400 at $0.00524 when replies were applied as written.", "recommendation": {"advice": "Keep authoritative state on the host, let the model propose one change per step, and gate each change deterministically instead of trusting model-written summaries, which failed to match true state in all 22 tested cases.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/neither-half-alone-a-measured-and-gate-between-a-model-and-its-state", "markdown": "https://wpnews.pro/news/neither-half-alone-a-measured-and-gate-between-a-model-and-its-state.md", "text": "https://wpnews.pro/news/neither-half-alone-a-measured-and-gate-between-a-model-and-its-state.txt", "jsonld": "https://wpnews.pro/news/neither-half-alone-a-measured-and-gate-between-a-model-and-its-state.jsonld"}}