# Real classifiers on public banking queries: readings added after the results

The round's design (`DESIGN-text-classifier.md`, which keeps the round's earlier title) and its protocol stay frozen. Nothing here
changes a stored answer, a frozen file, a stored result or a prediction's verdict. The first results raised questions those files
do not answer. Each reading below was written down and committed before its code ran, but after the results had been seen, so each
is built for a result already read. The page labels each one "worked out after the results", and none enters the count of predictions
that held. No model is called: everything comes from the stored labels and count matrices. Code: `textclass/after_results.py`. Output:
`textclass/results/after-results.json`. Tests: `tests/test_text_classifier_after.py`.

## The readings

R1. What the definitions are worth. Each language model's accuracy on prompt version 2 (driver names only) against bag of words' median
and 5th to 95th percentile at 400 and 800 labels. The names were also written by me, knowing the labels, and a prompt written by someone
blind to the intents is not tested, so this brackets the question and does not answer it.

R2. What the alarm rule could detect at this size. Part (a), from the stored labels and the frozen rule: for each of the 200 shuffles, each
driver and each language model's version 1 labels, the rise above the baseline that the rule needs in period 14, which is 4 times its scale,
in messages and as points of a 118-message period; reported as the median over shuffles per driver. Part (b), a simulation: each driver's count
in each period is drawn independently from a rounded normal approximation to the binomial, at that model's version 1 shares for periods 1 to
13 and its version 2 shares after, 1,000 seeded runs at each of 118, 300, 500, 800, 1,100, 1,500 and 2,000 messages a period, with a no-change
control on version 1 shares throughout. The alarm is the frozen one: any driver, period 14 or 15. Pass bar for using part (b) on the page: at
118 messages, each model's simulated rate lies within 10 points of its measured rate, for the prompt change and for the no-change control. If
it does not, the page does not quote part (b) and says so. Part (b) assumes the messages of a larger queue look like these.

R3. The third rule for the repeated requests. Change 1 on the page compares the first answer stored with the repeat answer. The frozen code,
run on every stored answer, kept whichever record sorted first in the staged file: the records as serialised lines, sorted, then read in order.
This reading rebuilds every result that way with the frozen analysis code, and rebuilds the repeat-answer rule as a check on the stored note, and
reports accuracy on prompt version 2, messages moved, false alarms and any prediction whose verdict differs.

R4. What a small labelled sample says about a classifier. For each language model, the accuracy inside each of the 200 draws at 100, 400 and 800
labels: median and 5th to 95th percentile, beside its accuracy on the stream. The draws come from the pool, whose mix differs from the stream's.

R5. Bag of words' correction, looked at closer. Median out-of-fold accuracy (a model trained on 80% of the labels, as its matrix is measured) against
median accuracy on the stream (a model trained on all of them), per budget. At 100 labels: how many draws had a singular matrix and kept raw shares,
how many of those had a driver never predicted out of fold, the median corrected gap without those draws, and how many draws were folded fewer than
5 times.

R5, extended after its first pass and before this part's code ran. Overall out-of-fold accuracy read about level with stream accuracy, so the same
comparison for driver D, the spike driver: the median share of D messages labelled D out of fold against on the stream, per budget. Also the stored
accuracy of the record the baseline's smoke test printed before the protocol was frozen (100 labels, C = 1, first draw).

R6. The paired comparison and the training draw. Each language model's accuracy minus bag of words' first 800-label draw, median draw and 95th
percentile draw. The paired intervals hold the training sample fixed.

R7. Run noise in the worst-driver gap. For each language model, the raw worst-driver gap on the 1,000 messages of the three same-prompt runs, per run,
against the dataset's shares on those 1,000 messages.

## Limits

These are descriptive. None was predicted, none has a blind check, and each could have been chosen because of what it would show. R2(b) rests on the
stated independence and normal approximation. A same-batch repeat, which would give a like-for-like noise floor for the prompt comparison, needs new
model calls and is left to a later round.

## Added later, before its code ran

One more reading, written down and committed before its code ran, after the results and the readings above had been seen. Code, output and
tests are in the same files as the readings above.

R8. A partial same-batch noise check. The 33 prompt version 2 requests answered twice (Change 1 on the page) repeat the same prompt on the
same batch of messages. For each of the two models they belong to: the messages with a label in both answers, read with the frozen parser,
and how many of them get a different driver in the two answers, with a Wilson 95% interval that treats messages as independent; beside it,
that model's flip rate between same-prompt runs of prompt version 1 in new batches, as the frozen results store it. The two differ in prompt
version and in messages (pool and stream together), and cover only the two GPT models, so this can show whether keeping the batch fixed
visibly lowered the noise here. It cannot measure the gap a same-batch repeat of prompt version 1 would.

Also changed on the page, with no new figure: prediction 7 is marked a weak test, because a confusion matrix estimated from a few hundred
messages per driver leaves some gap by its own sampling error, so that prediction could hardly fail. Its verdict and the count of predictions
that held do not change.

## Added in a later fix round, before its code ran

One more reading, written down and committed before its code ran, after the results and every reading above had been seen. Code, output
and tests are in the same files as the readings above.

R9. What a team holding 100 labels would see of bag of words. The page says a measurement on 100 labels told every model apart from bag of
words, and backed it by setting each model's accuracy inside the draws (R4) against bag of words' accuracy on the stream, which a team holding
only those labels cannot see. Bag of words' own reading on the labels it holds is its out-of-fold accuracy (R5). For each budget: the 5th and
95th percentile of that out-of-fold accuracy over the 200 draws, beside the median R5 already gives. At 100 labels, for each language model:
in how many of the 200 draws its accuracy inside the draw is higher than bag of words' out-of-fold accuracy on the same draw (the same 100
messages), and the smallest such lead, in points. Pass bar for the page's sentence: it stays only if every model leads in all 200 draws;
otherwise the page gives each model's count in its place.
