Lesson 17 / Unit 5: Recognition Evaluation
Entity Accuracy
Score complete digit strings so a low average edit rate cannot hide unusable identifiers.
For an identifier, one wrong digit can invalidate the whole result. Exact match asks whether the entire predicted string equals its reference. It complements edit rate rather than replacing it.
Two Metrics
The retained model matched 62 of 120 evaluation sequences exactly, or about 51.7%. Its digit error rate was about 27.0%. These values describe different units: whole sequences and individual reference digits.
| Reference | Hypothesis | Exact match | Digit edits |
|---|---|---|---|
007 | 07 | No | 1 |
77 | 7 | No | 1 |
42 | 42 | Yes | 0 |
This table is a constructed example. The measured predictions are available in Error Inspection and the lab’s results.json.
Slice Results
for length in (1, 2, 3): group = [r for r in predictions if len(r['reference']) == length] correct = sum(r['reference'] == r['hypothesis'] for r in group) print(length, correct, len(group))Include the group size. A longer string has more opportunities to fail, and a small slice can move sharply after one example. Also inspect leading zeros and adjacent repeats; these are useful stress cases for this vocabulary and decoder.
Action Boundary
A format check can reject an impossible identifier, but it cannot establish that a valid identifier is the one the caller intended. Recognition, domain validation and confirmation are separate sources of evidence.
Carry both edit counts and exact matches into Channel Robustness. For production context, compare the STT guide’s entity discussion; this tiny course model is not a safe identifier capture system.
We do this work for teams shipping voice agents: Self-Hosted Voice Agent .
Edit this lesson on GitHub ↗Discussion
Questions, corrections and war stories welcome. Sign in with GitHub to comment.