Expand description
Verbatim stages: text the model must say word for word, verified.
A regulated call has lines that must be read exactly: a disclosure, a consent statement, the terms of a payment. An instruction to “read this verbatim” is a request, not a guarantee. A verbatim stage turns it into a guarantee at the governance level.
- While the stage is active, the stack publishes the required text under
VERBATIM_KEY. - At the end of each model turn, the control lane looks for the text in
the model’s output transcript (
contained_similarity) and writes the verdict toverbatim_flag(step). The text may be surrounded by other words in the same turn, such as a greeting before a disclosure. It also emitsLiveEvent::VerbatimChecked. - The stage completes only once the flag is true. A paraphrase keeps the conversation in the stage, where the posture asks for the exact text again.
The check needs output transcription, since it reads what was actually said. Without a transcript nothing is verified, and the stage does not complete.
Structs§
- Verbatim
Requirement - The published requirement of the active verbatim stage.
- Verbatim
Verdict - The outcome of one verbatim check.
Constants§
- VERBATIM_
KEY - The state key under which the active verbatim requirement is published.
- VERBATIM_
MIN_ SIMILARITY - How close (0–1, word level) the spoken text must be to the required text. Tolerates a transcription slip or two in a long passage, not a paraphrase.
Functions§
- check_
turn - Check a finished model turn against the active verbatim requirement, if
any, and record the verdict in state.
heardis the turn’s output transcript; an empty transcript checks nothing. - contained_
similarity - How closely
expectedappears somewhere inheard: the bestsimilaritybetweenexpectedand a run of consecutive words ofheardabout as long as it (within a tenth either way). A model turn that says the required text and something else, such as “Welcome to Bright Smile. This call may be recorded. How can I help?”, scores as the text alone. - similarity
- Word-level similarity of
heardtoexpected, from 0 to 1: one minus the word edit distance over the length of the longer text, after lowercasing and dropping punctuation. - verbatim_
flag - The state key holding whether
step’s text was said verbatim.