Readback
Source code on GitHub (opens in a new tab)

How Readback proves it did not mishear

Readback is a voice agent that takes prescription orders. Every value carries the spoken words that produced it, the recognizer’s certainty over those words and an independent validator’s verdict, and it enters the order only when a validator passed it or the caller confirmed it aloud. What this cannot prove is stated as plainly.

Certainty cannot tell sound-alike names apart

A recognizer can be fully certain it heard morphine while the caller said hydromorphone. Certainty describes the acoustics, not which of two similar names was meant: a look-alike, sound-alike pair.

A look-alike name at full certainty
SaidHeardRecognizer certaintyGate verdictThreshold and validators only
hydromorphonemorphineon the ISMP list with hydromorphonecertainty 1.00outranked by the published pairRE-ASKE_LASA_HITWritten: morphine

So a drug name on the published ISMP List of Confused Drug Names triggers a mandatory re-ask even at certainty 1.00, and the re-ask is contrastive: the agent names both drugs, and only a spoken name answers it, never a yes. This is a rule, not a threshold, and the product does not weaken it into one.

When the agent asks again, and which question it asks

5 fields are always read back once, whatever else happens (E_READ_BACK_REQUIRED): drug name, strength, quantity, directions (sig) and patient name. The three reasons below change which question is asked, and only the third will not take a yes for an answer.

The recognizer was unsure

The lowest certainty across the source words fell under the threshold for that field. The minimum is used rather than the mean, because a mean hides the single failed word that happens to be the drug name.

A dosage spoken too quietly
SaidHeardRecognizer certaintyGate verdictThreshold and validators only
ten milligramsten milligramscertainty 0.61RE-ASKE_LOW_CONFIDENCEAlso asks:E_LOW_CONFIDENCE

The pair rule stops every seeded mishearing, and puts its longer question to 21 of 59 correct names

The measured catch beside its cost, each with the command that produced it and the size of its set. The split by mechanism and the cost in seconds are on the measurements page.

What the pair rule catches

Written without the pair ruleseeded pair mishearings, each answered by a reflex yes
20/20
Written with the pair rule
0/20

npx tsx scripts/measure/ab-gate.ts n = 20, text candidates

What the pair rule costs on correct names

Correct drug names put to the pair rule's longer, contrastive question
21 of 5935.6% [24.6%, 48.3%]

make coverage-matrix n = 59, recorded confidences from synthesised speech through the live recognizer, scored against the full 2023 ISMP list

How much of the catalogue the pair rule touches.
FigureValueInputCommandn
Distinct pairs in the full 2023 ISMP list, the product rule514textnpx tsx scripts/measure/ismp-coverage.ts514
Catalogue drugs carrying a name on the ISMP list502 of 3730 (13.5%)textnpx tsx scripts/measure/ismp-coverage.ts3730