# Three ways one software agent could finish six tasks ahead

Two computer programs try the same 36 jobs. One passes 28 and the other passes 34. Perhaps the second program did everything the first could do, plus six more. Or perhaps it missed a job the first one passed and made up for it by passing seven others.

Both stories fit the totals. In our examples the six-pass lead stays the same. What changes is the number of jobs that only one program passed, and how those jobs divide between the two. That division tells us something the totals alone can’t.

For these examples we needed a fixed list of jobs. We took the 36 task IDs shared by two selections from Terminal-Bench v4.1.0, a test for software agents that carry out computer tasks. The selections came from different hardware limits, but for each example we assume both agents attempt the same jobs under the same conditions. Every pass, failure and missing result below is invented. [Terminal-Bench resource census and filter](https://sapien1.com/research/terminal-bench-resource-settings)

## What happened on tasks where only one agent passed?

Read across one row for a possible set of results. Each task belongs in exactly one of the first four columns, according to how A and B did on it. Compare ‘Only A passes’ with ‘Only B passes’. B has six more in every row. The last column measures how unusual that division would be if neither agent had an overall advantage.

**Three outcome patterns with the same pass totals**

| Both pass | Only A passes | Only B passes | Both fail | Exact two-sided p-value |
| ---: | ---: | ---: | ---: | ---: |
| 28 | 0 | 6 | 2 | 0.03125 |
| 27 | 1 | 7 | 1 | 0.0703125 |
| 26 | 2 | 8 | 0 | 0.109375 |

In the first row all six tasks with differing outcomes went to B. In the last row ten tasks had a single winner. B alone passed eight and A alone passed two. The exact McNemar test focuses on those disagreements. Suppose a task is as likely to be passed by A alone as by B alone, and one task’s paired result is independent of another’s. Given the number of disagreements observed, how often would they divide at least this unevenly, in either direction?

That chance is the two-sided p-value. Taking 0.05 as an illustrative threshold for evidence of unequal overall pass probabilities, only the first row falls below it. All three still have the same six-pass lead. [Exact McNemar test](https://www.statsmodels.org/stable/generated/statsmodels.stats.contingency_tables.mcnemar.html)

For a real comparison, keep the same task list and grading rule for both agents. Match each result to the task ID. If one file contains the same ID twice, find out whether it was a retry or a copied row. For retries, keep attempt IDs and decide how attempts count before comparing agents. Resolve unexpected IDs and list missing results separately.

For a separate look at repeated results, [check how duplicate copies affect a comparison](https://sapien1.com/research/check-duplicate-evaluation-results).

## Report how many tasks have both results

Suppose A records 28 passes in 35 results and B records 33 passes in 35 results. If the same task is missing from both files, each of the other 35 tasks has a result from A and a result from B. That gives us 35 complete pairs. In our example, B alone passes five of them and A alone passes none. Those pairs give a p-value of 0.0625.

If the missing tasks differ, each agent still reports 35 results, but only 34 tasks have both results. In this example B alone passes four of the paired tasks and A alone passes none, giving 0.125. Each calculation uses only the complete pairs. The two individual totals cannot tell you how many pairs there were.

## Check what a missing result could change

Start with 35 complete pairs again, five passes for B alone and none for A alone. B also passed the last task. A’s result on that task is missing.

If A failed it, six tasks in the full set of 36 would be passes for B alone, and the p-value would be 0.03125. If A passed too, the last task would add no disagreement and the value would stay 0.0625. One unresolved result puts the two possible conclusions on opposite sides of the illustrative 0.05 threshold.

Keep the unresolved task ID beside the observed pairs. If the grading rules allow either a pass or a fail, show what each would do to the full comparison and identify both as hypothetical.

If a benchmark run stops early, [check how missing grades could change the average](https://sapien1.com/research/report-an-incomplete-evaluation).

## Related research

- [Ten assignments per agent can leave fewer than two shared tasks on average](https://sapien1.com/research/size-a-paired-benchmark-preview)
- [If one program solved 32 tasks and another solved 34, who did better?](https://sapien1.com/research/benchmark-score-comparability)

[Testing models](https://sapien1.com/research#evaluations)
