A case study testing the part of a simulated psychiatric patient that spots suicide-risk questions. Small encoders rank well but cut-offs fail; asking the app's own language model finds far more, and a cascade keeps most of that recall.
| Method |
|
| Recall | False hits | ||||
|---|---|---|---|---|---|---|---|---|
| Keyword tags (v0) | 0.661 (0.61–0.72) | 0.277 (0.20–0.38) | 35.1% | 5.3% | ||||
| BM25, probes | 0.863 (0.82–0.90) | 0.518 (0.42–0.63) | 55.8% | 20.3% | ||||
| MiniLM-L6 (22M) | 0.888 (0.85–0.93) | 0.604 (0.51–0.70) | 70.1% | 14.4% | ||||
| e5-small-v2 (33M) | 0.882 (0.84–0.93) | 0.653 (0.57–0.74) | 71.4% | 10.7% | ||||
| gte-small (33M) | 0.906 (0.87–0.94) | 0.612 (0.53–0.70) | 72.7% | 13.9% | ||||
| bge-small (33M) | 0.900 (0.87–0.93) | 0.620 (0.54–0.71) | 66.2% | 13.4% | ||||
| bge-base (109M) | 0.907 (0.87–0.94) | 0.638 (0.56–0.73) | 77.9% | 17.6% | ||||
| Hybrid, matched cut-off | 0.898 (0.86–0.93) | 0.552 (0.47–0.66) | 67.5% | 13.9% | ||||
| Gemma 4 E4B, zero-shot | – | – | 94.8% | 4.8% | ||||
| Cascade (hybrid, Gemma) | – | – | 93.5% | 3.7% |
AUROC and AUPRC over (question, risk memory) pairs of the question’s case (prevalence 0.098); over all memories, AUROC ranged from 0.69 (tags) and 0.86 (BM25) to 0.91–0.94 (encoders and hybrid). Risk recall and false hits use the cut-off whose dev-half risk false-hit rate is at most the deployed hybrid’s (12.7%); the deployed rules themselves give 72.7% and 15.2% (Table 3). The “Hybrid, matched cut-off” row puts one cut-off on the hybrid’s score, like every other row, so it differs from the deployed rules, which add the margin and risk-neighbour rules of Section 4; the keyword row likewise cuts its tag points, so its false hits differ from the keyword-only rules in Table 3. The language model gives one operating point, so no curve.
Going deeper
| Dev half | Test half | |||
|---|---|---|---|---|
| Risk cut-off | Recall | False hits | Recall | False hits |
| 0.72 | 100% | 34.4% | 89.6% | 34.5% |
| 0.74 | 98.7% | 23.6% | 83.1% | 25.5% |
| 0.76 | 93.3% | 17.8% | 76.6% | 19.4% |
| 0.78 (shipped) | 90.7% | 12.7% | 72.7% | 15.2% |
| 0.80 | 81.3% | 8.9% | 70.1% | 12.7% |
| 0.82 | 81.3% | 5.1% | 66.2% | 9.7% |
| Recall-only tune | 100% | 36.9% | 84.4% | 37.6% |
Picture a receptionist who must pass each caller to the right office. Some callers ask about an emergency, but they phrase it in roundabout ways. Miss one, and the emergency office never hears about it.
The receptionist first worked from a list of trigger words, then added a sense of which callers sounded alike. To test the receptionist fairly, the authors had a stranger who never saw the list write hundreds of calls. The receptionist caught about three emergencies in four, and fewer when new strangers wrote the calls.
A senior colleague who simply listens to each call caught almost all of them, but is slower. So the receptionist now screens every call and passes the doubtful ones up, which keeps most of the colleague's accuracy. All the calls here were written by machines, not by real callers.
The abstract, word for word, with the six densest phrases unpacked.
Components that decide what an application built around a language model may say are ordinary software and need tests, but their correct behaviour is defined by meaning, so no specification lists the inputs they must handle1. We report a case study of testing one such component: the matcher in Rapport, a spoken simulated psychiatric patient, which decides which of the patient’s memories a student’s question is about. If it misses a question about suicidal thoughts, plans or means, the code can let the patient deny something it should disclose. Of the 8 bugs logged during the simulator’s evaluation, 4 were matching faults, including all 3 rated major2, and each was fixed by adding keywords and a regression test for one wording. We built the test oracle from the specification instead of the code: a blind test set of 512 doctor questions over four cases, written from what each memory means by a writer that never saw the matching rules3, and split by checksum into a tuning half and a test half. On the test half, keyword tags found 35.1% of risk questions; the deployed hybrid of tags and a sentence encoder with 33 million parameters, run on the processor in a few milliseconds, found 72.7% while wrongly matching 15.2% of non-risk questions. Five small encoders and BM25 over the same example questions gave overlapping threshold-free results (area under the receiver operating characteristic curve 0.86–0.91 for risk), so the encoder choice was not the bottleneck; the cut-off was4. The same model that voices the patient (4 billion parameters), used as a zero-shot classifier, found 94.8% of risk questions with 4.8% wrong matches, at a median of 416 ms per question; screening with the hybrid first kept 93.5% recall while sending 63% of questions to the model5. Cut-offs tuned on a reused tuning half overfitted it, and a classifier trained on model-generated labels read a line’s manner better than word patterns but its topic worse than the live tagger, and was not shipped. On two further test sets written by other local models, the deployed rules found 58.9% and 47.5% of risk questions and the zero-shot model 87.7% and 91.5%: the first writer’s test set flattered the component6. Inside conversations, missed matches became missed disclosures. The test sets, every method’s output and a machine-checked trace of every reported number to the committed results are public.
Two lines of earlier work lead here. Each stop says what the paper credits it with and what it uses it for.
Read four parts of it, in this order.
If the numbers look better than they are, these places show why.
Internal validity. The dev half was used twice, to write probes and to set cut-offs; every reported number comes from the test half or from the two further sets, which were used once with cut-offs from the dev half. The zero-shot prompt was written once and not tuned; a tuned prompt might do better, and a different model might do worse. The original writer’s blindness rests on its own report that it opened nothing but the memory descriptions; no log of its tool calls is in the repository. Claude wrote that benchmark, and an AI assistant helped write the hand-written probes; if both came from the same model family, their wordings may be closer than independent writers’ would be. The two further writers, from other families, do not share this link, and on their questions the deployed rules found fewer risk questions and every encoder ranked them less well.
| Written by Qwen3.5-4B | Written by Gemma 4 E2B | |||||
| Method | AUROC | Recall | FH | AUROC | Recall | FH |
| Keyword tags (v0) | 0.693 | 44.5% | 6.0% | 0.566 | 18.4% | 12.3% |
| BM25, probes | 0.780 | 87.0% | 55.6% | 0.731 | 78.7% | 71.4% |
| bge-small (33M) | 0.789 | 33.6% | 6.9% | 0.785 | 37.6% | 22.7% |
| bge-base (109M) | 0.808 | 45.9% | 11.6% | 0.824 | 62.4% | 25.0% |
| gte-small (33M) | 0.826 | 50.0% | 7.4% | 0.846 | 48.9% | 17.3% |
| Hybrid, matched cut-off | 0.834 | 54.8% | 11.1% | 0.782 | 41.1% | 29.1% |
| Deployed match rules | – | 58.9% | 9.9% | – | 47.5% | 25.5% |
| Gemma 4 E4B, zero-shot | – | 87.7% | 7.9% | – | 91.5% | 6.8% |
AUROC over (question, risk memory) pairs; Recall and FH (risk false hits) at the cut-off matched on the original dev half, as in Table 4.
External validity. All test questions were written by language models, never by students or clinicians, so their phrasing may be more regular than a nervous student’s. The two further writers come from other model families and lowered the deployed rules’ recall and every encoder’s AUROC, which suggests that the original numbers are optimistic. The cases are drafts that a psychiatrist must still review, only one variety of English was tested, and latency was measured on one high-end laptop.
Nothing on this page was recomputed. Every claim points to the paper so you can check it.
All local models ran through llama.cpp G. Gerganov and contributors (2026) (4-bit Q4_K_M) on one laptop between 13 and 19 November 2026. The original benchmark was written by an AI agent (Claude, Anthropic, through Claude Code) that saw only the memory descriptions. Qwen3.5-9B Qwen Team (2026) wrote the generated probes and the classifier’s training lines (temperature 0.95) and labelled the training lines (temperature 0); Qwen3.5-4B and Gemma 4 E2B wrote the two further test sets (temperature 0.9, fixed seeds); Gemma 4 E4B Google DeepMind (2026) is the zero-shot classifier (temperature 0, JSON schema). All prompts are in tools/recall_writer.py, tools/recall_baselines.py and tools/brain/gen_lines.py in the code repository. The AI assistant (Claude Opus 5.5, Anthropic, through Claude Code, October–November 2026) also drafted the analysis scripts and much of the text of this manuscript under the authors’ direction. Every reported number is checked mechanically against the committed results by osaudit; the authors reviewed the text and take responsibility for the content.
More latest news
Read all