Nine tools from insurance, one small agent
An insurer does not ask whether something can fail. It asks how often, how badly, for whom, and whether everyone fails on the same day. I had written those questions down as nine tools (actuarial-transfer). This is what happened when I ran them on the one agent I own: the one that answers recruiters from my notes.
The test bed is a fictional engineer with nine notes and eight kinds of question (The answer it had and did not give / 它有答案,却没给). Three models sat in the seat: the two my site runs, and a third the test bed was first wired to. Every number below is small, and I give the range each time.
At first three of the nine had nothing to run on, because all three want real conversations and my site has almost none. I had stopped there. Then I made the data inside the test bed, and the one I had expected least from turned out to be the one that mattered.
1. The unit
Before the prompt fix, on the first model, the agent answered 35 of 40 questions correctly. That is 88%, and it sounds fine.
Count the same forty answers per visitor instead. Each round is one visitor who asked all eight questions. Every one of the five visitors was told, once, that the engineer had no Kubernetes experience. Zero of five came away clean.
| Unit | Result | 95% range |
|---|---|---|
| Per answer | 35 of 40 | 74–95% |
| Per visitor | 0 of 5 | 0–43% |
Same data, two denominators. A recruiter is the second one.
2. Count and cost
I did not put a price on a miss. I sorted misses by what the visitor is left believing.
| What the miss did | Before the fix | After |
|---|---|---|
| Left without an answer that existed | 2 of 10 on one question | 0 of 10 |
| Told something no note says | 5 of 5 on one question | 0 of 5 |
The second row is the expensive one, and a single pass rate had it mixed in with the first.
3. Rate by kind
Every answer is now a row in a file: which model, which kind of question, which round, how many searches, the answer itself, the verdict. After the fix, on forty answers each:
| Model | Misses | Where |
|---|---|---|
| The smaller model my site runs | 1 of 40 | The absence with a scope |
| The larger model my site runs | 0 of 40 | |
| The third model | 1 of 40 | The silent one |
The file can also reweight these to the mix of questions real visitors ask. That mix does not exist yet.
4. Credibility
One kind of question missed once in five: 20%. The other seven kinds missed zero in five. Is that kind weak, or was it the one that got unlucky?
Insurers answer this for a small employer with three years of claims. They blend the employer's own record with the record of its class. The weight on your own record is , where comes from how much members of the class really differ.
| Own rate | Weight on own | Blended | |
|---|---|---|---|
| The kind that missed once | 20% | 0.20 | 6% |
| Each of the other seven | 0% | 0.20 | 2% |
The rows put at about twenty rounds. I ran five. Five rounds earn a kind one fifth of a say in its own number. The 20% is mostly noise, and so is each 0%.
5. Survival
Asked alone, each answerable question was answered five times out of five. Then I asked twelve of them in one conversation, five conversations per model.
| Model | Conversations with no miss |
|---|---|
| The smaller model my site runs | 5 of 5 |
| The larger model my site runs | 5 of 5 |
| The third model | 2 of 5, then 3 of 5 on a second run |
The curve is the third model's first run. Its misses were not wrong answers. They were empty ones: a turn that came back with no search and no text. It never did this when asked one question alone, only with a conversation behind it. The two models my site runs did not do it in ten conversations. Five of five still has a range of 57% to 100%.
6. Actual against expected
A question's miss rate when asked alone is a prediction. Its miss rate inside a long conversation is what happened. Divide one by the other, question by question.
| Model | Predicted misses in 30 turns | The most the prediction allows | Actual |
|---|---|---|---|
| The smaller model my site runs | 0 | 13 | 0 |
| The larger model my site runs | 0 | 13 | 0 |
The ratio is zero over zero. The useful column is the third one. Five clean rounds alone predict "zero, or anything up to thirteen in thirty". A prediction that loose agrees with almost any outcome. This tool told me nothing about the agent and one thing about the test: it is too small to be contradicted.
7. Found late
An insurer knows that this year's claims are not all in yet. I had no such thing, so I built it. Every answer the instant rule passed was read a second time, slowly, against all nine notes at once, the way a reviewer would days later.
The rule passed ninety of ninety. The second look failed sixteen: 18%, with a range of 11% to 27%. Six, five and five across the three models.
About half of what it found was something added: unmatched payments "go into a queue", where the note says only that they are filed for a person to look at. The other half was something left out, inside an answer that passed. Asked about the JVM, the agent named the Kotlin job and said that was the only one; a second note has a Quarkus service. Asked how many years, it gave the right number and added that the notes do not say how long the first job lasted. They do.
One miss came back again and again. On the JVM question, five of fifteen answers across the three models said the Kotlin job was the only JVM work in the notes. Each of those answers contained the word the instant rule was looking for.
The count at the moment of the answer was zero. The count after review was sixteen. There is no factor to multiply zero by. This is the tool I had written off, and it is the one that found what my last piece was about: the answer that was there and was not given.
Reading all sixteen
The second look is a model too, so I read the sixteen answers myself.
| What I found | Answers |
|---|---|
| Left something out that a note holds | 8 |
| Added something no note says | 4 |
| Said "queue" where the note says "filed for a person to look at" | 2 |
| An argument about one month | 2 |
I would count the first two rows, twelve of sixteen. A queue is a fair paraphrase. In one of the month arguments the second look's own arithmetic was the wrong one.
Reading also turned up a fault in my test. My nine notes linked to one another by file name, and the product finds a linked note by the last part of its address. The agent followed a link that went nowhere and told the recruiter the note was missing. I fixed the links and added a check that fails on any link that does not resolve.
Two attempts at a fix
The first attempt was a sentence in the prompt: a search does not show that nothing else exists, so never say "the only". Nothing changed. The models kept writing "that is the one JVM project my notes cover", and from where they stood it was true. They had searched for five words and one note had come back.
The second attempt changed what the agent does before it answers. When a question names a class of thing, the notes name its members and not the class, so a search by word misses them. The agent now opens the note for every job and every project first, and judges each by the tools it names. It is also told never to report a search as a count.
| Failed by the second look, of 30 | Before | First attempt | Second attempt |
|---|---|---|---|
| The smaller model my site runs | 6 | 8 | 2 |
| The larger model my site runs | 5 | 3 | 1 |
| The third model | 5 | 6 | 7 |
On the two models my site runs, the first attempt left eleven of sixty and the second left three. All three are the queue. On the JVM question alone, answers that left out the Quarkus job went from seven of ten to none of ten, and those two ranges do not overlap. The cost is tool calls: about four per answer on that question before, about seven now.
The third model did not improve. Its failures are the other kind. It adds: "the hard part was the stream itself". The change was not aimed at that, and it did nothing for it.
8. Catastrophe
A catastrophe model does not ask how often. It asks: if this breaks, what share of what I cover is hit? On the third model I broke two things on purpose and asked the questions three times each.
| Kind of question | Search down for the turn | One note lost in a sync |
|---|---|---|
| Direct | 3 of 3 missed | 0 of 3 |
| Arithmetic | 3 of 3 | 3 of 3 |
| Count | 3 of 3 | 0 of 3 |
| Join | 3 of 3 | 0 of 3 |
| Reworded | 1 of 3 | 0 of 3 |
| Category | 0 of 3 | 0 of 3 |
Three rounds is very little: three out of three has a range of 44% to 100%. The cell for a reworded question with the note lost should not be trusted, because the rule that scored it was too loose and has since been tightened.
What I would keep is not a number. With search down, the agent said its notes were not loading and that it would not invent an answer. The failure stayed in the cheaper class.
9. The tail
This one is a reading of the code for one question: what is the most a single wrong action can do?
The answer is mostly reassuring. An agent on a job code can search and answer; it cannot book or send mail unless I grant that. A turn is capped at eight rounds of tools. A job code is capped at ten people, fifty turns each, and expires.
Three places looked as if they had no ceiling. One of them I had misread: it has a limit, and a test that holds it. The other two I have not checked yet, and I am not listing them here until I have.
What I don't know
Nine notes are not a thousand. Five rounds are not fifty. The second look is itself a model. I checked its sixteen failures by eye and agreed with twelve, and I have not read the seventy-four answers it passed. Opening every job and project note is cheap on nine notes. I asked the same kind of question of a second made-up engineer with fifty-four notes, and ten answers of ten named the one job that was on the JVM, in four to seven tool calls. I have not tried a thousand notes. And the real mix of questions, the one input that would turn these rates into a rate for my site, has to come from visitors I do not have yet.
One sentence to take with you: the check that runs at the moment of the answer saw nothing wrong in ninety answers; the same ninety, read again, held sixteen.