cd /news/large-language-models/neither-half-alone-a-measured-and-ga… · home › topics › large-language-models › article
[ARTICLE · art-181855] src=dev.to ↗ pub= topic=large-language-models verified=true sentiment=↑ positive

Neither half alone: a measured AND gate between a model and its state

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.

recommendation

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.

more in playbook: Designing agent systems
by read3 min views1 publishedDec 4, 2026

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.

Rajnish 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.

Read 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.

An AND gate makes a testable claim: take either input away and the output fails. That claim was run.

Gemini 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:

How the state was kept Steps with exactly the right state (of 400) Dollars per step with the right state
The model's reply applied as written: the proposal with no circuit 85 (broken on 223) $0.00524, 4.5 times AXI
A gate that only refuses bad replies 84 (never broken) $0.00573, 4.9 times AXI
AXI: the proposal, the gate, and the host completing what the reply left out 400 $0.00117

The 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.

The 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.

A 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.

Replay the saved 4,000-step run without a key or a GPU:

git clone https://github.com/gaurshalendra2412/axi-runtime
cd axi-runtime/python
python3 quickstart_replay.py

It 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

── more in #large-language-models 4 stories · sorted by recency
── more on @rajnish choubey 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/neither-half-alone-a…] indexed:0 read:3min 2026-12-04 · —