The reasoning cache: an experiment in Kosken Labs
Many incidents occur again. A disk fills with old logs. A unit does not start because another process holds its port. A monitor fails one time because the agent lost its connection, and the service was healthy all the time. Each time, the diagnosis reads the same evidence and does the same steps again. A full diagnosis can use 50,000 to 150,000 tokens.
The reasoning cache is an experiment that tries to do this work one time only. It is in Labs, the part of Settings for functions that are not complete. It is off until an owner turns it on.
How the cache works
- The diagnosis solves an incident as usual.
- A builder model reads the transcript of that diagnosis and writes its steps as code. The code reads the same evidence with the same read-only tools. It checks the evidence that showed the cause, and it writes the cause.
- Kosken runs the code on the same incident. A judge compares the result with the diagnosis. The builder gets up to five tries. An entry that does not pass is not kept.
- For a new incident, the cache finds the entry with the nearest description. A small model reads only the values from the incident text, such as the name of the unit. Then the code runs.
The code checks the evidence before it gives a cause. When the evidence does not show the pattern of the entry, the code stops, and the incident goes to the full diagnosis. In one test, an entry for a false alarm saw that a unit was not active. It stopped with this reason: "this is a real fault, not a transient monitor read". A wrong cause is worse than no answer, so the cache gives no answer when it is not sure.
What we measured
We ran the experiment on 8 recorded incidents from our test lab. The table shows the last run.
| Number | Result |
|---|---|
| Entries built | 8 of 8 |
| Answers of the cache with the cause of the diagnosis | 8 of 8 |
| The same incidents in other words | 14 of 14 right |
| The same incidents with other names and values | 6 of 7 right, 1 partly right |
| Answers with a wrong cause | 0 |
| Tokens of a diagnosis, of an answer of the cache | 76,353 and 3,617: about 21 times fewer |
| Tokens to build one entry | about 0.9 times one diagnosis |
These numbers are a possible benefit, not a promise:
- All 8 incidents were of one kind: a false alarm after a lost connection. We do not know the numbers for a full disk or a port conflict yet.
- We recorded the evidence before the test. Live evidence can have other forms.
- Tokens are not money. Providers charge less for repeated context, and a diagnosis repeats much context. The saving in money is probably smaller than the saving in tokens.
Silent mode
In silent mode, the cache does not answer an incident. After each diagnosis, the cache also answers the same incident with the evidence that the diagnosis read. It reads nothing new from the machine. Nobody sees this answer on the incident, and the incident does not change. A judge compares the answer with the diagnosis. The Labs tab shows the result: the answers, the answers with the same cause, the answers with another cause, and the tokens of both.
Silent mode is not the shadow mode of a machine. Shadow mode is a dry run of recipes. Silent mode only compares two answers.
How to turn it on
- Open Settings, then Labs. You must be an owner of the workspace.
- Select Reasoning cache and click Save.
- Get eval cases. On a solved incident, click Save as an eval case and write the right cause.
- On Evals, click Reasoning cache experiment. The run builds an entry for each active case and tests it. The page shows each step while the run continues.
- On the page of the run, read the code of each entry. Click Add to the cache for each entry that you approve.
- Go back to Settings, Labs. After the next diagnoses, the silent answers show there. You can edit the description of an entry, turn it off, or delete it.
The cache only reads. An owner approves each entry before it answers. When an entry matches an incident, the answer and its comparison cost about 5,000 tokens. When no entry matches, the cache uses no tokens.
What comes next
Silent mode must first show enough right answers for several kinds of incidents, and few or no wrong ones. Then the next stage shows the answer of the cache on the incident at once. The full diagnosis still runs. A later stage can replace the diagnosis when an entry matches. Each stage needs its own numbers first.
Kosken is free for up to 5 machines. Start for Free, then turn on the experiment in Labs.