Basis Lab

Models That Use Tools

Judging Whether the Whole Thing Worked

Last timeText From Outside Is Not an Instruction

A tool using system has to be judged on finished tasks, not on individual replies, and every failure has to be attributed to the model, a tool or the loop you wrote.

The unit is a finished task

A system that answers questions is evaluated on answers. A system that does things has to be evaluated on whether the things got done, which is a different kind of test.

A test case for a tool using system has three parts. A starting situation, usually a small database in a known state. A request, in the words somebody would actually use. And a checkable final state: this order is refunded for this amount, this record exists with these fields, this message was sent to this address and no other.

The final state is what makes it a test. A transcript cannot be graded reliably, because a reply that says the refund has been issued is produced just as readily when it has not.

FIG 1Two ways to grade the same run
can be checked mechanicallycatches a wrong amountcatches a double actioncatches a confident false report
grade the final reply0000
grade the final state of the data1111
grade both1111
A one means that way of grading does what the heading says, a zero that it does not. The first row is all zeroes on purpose. Grading the reply catches nothing in this table, because every one of these failures is compatible with a confident and well written reply. The second row catches all four and it takes a test database rather than a list of expected answers, which is the main reason evaluations of these systems are so often skipped: the harness is real work, and there is no shortcut that does the job.

How per step quality compounds

The arithmetic here is simple and the consequence is not intuitive.

If each step of a task succeeds independently with some chance, the task succeeds only if every step does, so the task success rate is the step rate raised to the number of steps. Ninety seven per cent per step sounds like a system working well. Over twelve steps it is sixty nine per cent of tasks finishing, which is one task in three failing.

FIG 2Task success against the number of steps
0.000.300.600.901.201.07.013.019.025.0steps in the task
99 per cent per step97 per cent per step90 per cent per step
All three curves start in a respectable place and the bottom one has fallen below one task in ten by twenty five steps. Two lessons follow. The first is that the single most effective way to improve a system of this kind is to shorten its tasks, because removing steps raises the success rate faster than improving any individual step. The second is that per step metrics should never be quoted as though they described the system.
FIG 3Where twenty two failing tasks in every hundred actually fail
Nine and five were counted by somebody reading failures one at a time. Eight was not counted at all: it is twenty two less nine less five, and subtraction is the only way anybody ever gets it. That makes the loop's share the one nobody measures and, in most systems measured honestly, the largest of the three rather than, as here, a close second. It is also the cheapest to repair, since a loop fault is an ordinary bug with an ordinary fix, while a model fault needs a changed prompt or a changed model and a tool fault may belong to somebody else.

Attributing each failure

Three causes, three completely different repairs.

A model failure is a wrong decision given correct information: the wrong tool chosen, a sensible result ignored, a conclusion that does not follow from what came back, an answer given when more work was needed. The repair is a clearer tool description, a changed instruction, or a different model.

A tool failure is a tool returning something wrong or nothing at all when it should have worked. The repair is in the tool, and sometimes in somebody else service.

A loop failure is everything in between: a step limit cutting a task off, a budget exhausted by a task that was going fine, an error returned in a form the model could not act on, a validation rule rejecting something legitimate, two calls run at once that should not have been, a result truncated without saying so.

The lesson stops here

2 more paragraphs to go

You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.

The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.

See the planThe contents

This is the reading half

Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.

The contents

The rest of this course

  1. 01Saying Something and Doing Something
  2. 02The Loopopening only
  3. 03Describing a Tool Wellopening only
  4. 04Checking What the Model Asked Foropening only
  5. 05When a Tool Failsopening only
  6. 06Several Steps and a Budgetopening only
  7. 07Text From Outside Is Not an Instructionopening only
  8. 08Judging Whether the Whole Thing Workedyou are here

Read alongside