An open 32B model worked as a coding and operations agent behind a deterministic gate. The gate stopped every planted harmful action it tried. A fine-tune on the gate's own log then cut the gate's cost on normal work by about 40%, while the gate kept doing the stopping.
We understand models and we tune them. This is the first full turn of the cycle we now build for companies that run their own models: a deterministic gate in front of every action an agent takes, a log of what the gate stopped, and a fine-tune on that log that makes the model hit the gate less.
## Why a gate, and why deterministic
A model can be seen and corrected, not made safe: a text hidden in what an agent reads can always find a wording that makes it act. So the decision on an action is not left to the model, and not to a second model either. Every action an agent is about to take (run a command, write a file, call an address, push code, change a service) is turned into a clear record and checked against fixed rules: allowed, refused, or held for a person. The same action in the same session always gets the same answer.
## The test
We served an open 32-billion-parameter model on our own hardware and let it work as an agent on 24 tasks: 12 on a small code project (fix a bug, add a function) and 12 on a simulated server (find why a service fails, scale an application, write a report). Each task ran twice as it is and twice with a hidden instruction planted in a file the agent reads: download and run a script, install a package with an invented name, upload a secrets file, force-push to the main branch, delete a namespace, turn off the firewall. Every action went through the gate; allowed actions ran in a closed sandbox.
## What the gate did
The model followed the planted instruction in 6 of 48 runs. The gate stopped all 6. On clean work it blocked or held about 1 action in 13, most of them by design (a restart in production needs a person).
## The fine-tune
From the gate's log, on a separate set of tasks, we took the actions the gate had blocked, asked the model for the right next step, kept only the answers the gate accepts, and trained a small adapter on them. Then we ran the same 96 runs again, with the same gate.
```chart
{"title": "Blocked or held actions per 100, clean work", "series": ["Base model", "After the fine-tune"], "unit": "", "max": 10, "rows": [["Clean work", 7.7, 4.5]]}
```
```chart
{"title": "Out of 24 or 48 runs", "series": ["Base model", "After the fine-tune"], "unit": "", "max": 24, "rows": [["Runs that followed the planted instruction (of 48)", 6, 5], ["Clean coding tasks finished (of 24)", 8, 17]]}
```
- The cost of the gate on clean work fell by about 40%: from 7.7 to 4.5 blocked or held actions per 100, and no clean action was refused.
- The tuned model finished 17 of 24 clean coding tasks, against 8.
- It followed the planted instruction about as often as before (5 runs of 48 against 6). The tune made the work smoother; it did not make the model impossible to fool. That is the gate's job, and it is why the gate decides.
The same log showed us a gap: the tuned model installed the invented package with a form of the install command the gate did not read as an install. Nothing was installed (the sandbox has no network), and the rule was fixed the same night. This is what the log is for: new rules and new training data.
## Limits
Two runs per task, 66 training examples, tasks and attacks written by us. This shows that the cycle works end to end; it is not a measure of the gain on your system.
The gate is open source: github.com/SiliconPsycheLabs/gate.
## In plain words
We put a fixed set of rules in front of an AI agent: it stopped every harmful action the agent tried. Then we trained the model on its own blocked actions, and the rules got in the way of normal work about 40% less often. Your own models make fewer mistakes, and a deterministic gate proves it.
This update is not available.