Repository navigation
Judge prompts: shared rules for spelled codes, mixed-language speech, glosses and politeness - #250
fanny-riols wants to merge 22 commits into
Conversation
- The cultural-norms exception now also covers formal register and set service phrases. It allows one such phrase per function (acknowledge, hold, return from hold, thank, close), and a single short courtesy or empathy phrase is never filler on its own. - It does not cover repetition: the same formula twice in one turn, stacked acknowledgements, or a term given together with its synonym or translation are still filler. - Length is judged by how long the turn takes to say and how many information units it carries, not by written length. Polite constructions and numbers written out in words can look long without being long to hear.
- violating_policies: a phrase or clause in another language inside an
otherwise correct-language turn ("one moment", "Let me check that") is
part of "not communicating in the specified language". Established
loanwords, codes, IDs, acronyms, product names and proper nouns are
never a violation.
- failing_to_disambiguate: a value that only contains letters or digits
that sound alike is not by itself a flag. Phonetic confusability counts
only when the trace shows the ambiguity mattered: a failed lookup, a
user correction, two versions of the value, or a real homophone.
- The fabricating_tool_parameters note on confusable letters now points
to the language-specific guidance.
New violation 5: a term immediately followed by its translation, equivalent or abbreviation in parentheses or after a slash, such as "paid time off (PTO)" or "PIN / passcode". TTS does not voice the parentheses or slash, so the listener hears both forms back to back. A word, code or abbreviation used on its own is not a violation.
New block "Spelled codes and mixed-language speech":
- Letters and digits in spelled codes must be said with their names in
the expected language. A letter or digit name from another language
(the English "jay" or "six" in a non-English turn) is wrong_language,
plus entity_error if it sounds like a different letter or digit.
- Spelling-alphabet words ("A as in Anna") are valid.
- Confusable letters and digits are flagged only when the other one is
clearly heard, not because of transcription or poor audio.
- A phrase or sentence in another language inside the turn is
wrong_language, even when the rest of the turn is correct.
- Proper nouns, product names, codes, acronyms and established loanwords
are not wrong language.
- An unusual but unambiguous number, date or time reading is an error
only if a native listener could take it for a different value.
New block "Spelled codes and mixed-language speech":
- Letters and digits of trace entities must be said with their names in
the expected language. A letter or digit name from another language
(the English "jay" or "six" in a non-English turn) means the entity
was not articulated correctly: rating 0. An entity that is itself in
another language in the trace may be said in that language.
- Spelling-alphabet words ("A as in Anna") are valid.
- Confusable letters and digits are flagged only when the other one is
clearly heard, not because of transcription or poor audio.
- A phrase or sentence in another language inside the turn: rating 0,
quoting those words in the explanation.
- Proper nouns, product names, codes, acronyms and established loanwords
are not wrong language.
- An unusual but unambiguous number, date or time reading is rated 0
only if a native listener could take it for a different value.
New section "Spelled Codes and Mixed-Language Speech":
- Letters and digits in spelled codes must be said with their names in
the expected language. A letter or digit name from another language
(the English "jay" or "six" in a non-English turn) rates at most 2
while the value is still unambiguous, and 1 if it sounds like a
different letter or digit.
- Spelling-alphabet words ("A as in Anna") are valid.
- Confusable letters and digits are flagged only when the other one is
clearly heard, not because of transcription or poor audio.
- A phrase or sentence in another language inside the turn rates at
most 2, and 1 if it replaces an entity or the turn no longer makes
sense.
- Proper nouns, product names, codes, acronyms and established loanwords
are not wrong language.
- An unusual but unambiguous number, date or time reading rates at most
2 if it sounds unnatural, and 1 only if a native listener could take it
for a different value.
…hared-multilingual-rules
The shared rules in this branch change the English prompts of six judges. This records their new English renders.
- Expanding an acronym once, on its first mention ("your PTO, that's
your paid time off"), is not repetition. A term given with its synonym
or its translation into another language is still filler. The example
no longer assumes a non-English call.
- The one-phrase-per-function allowance also covers greet / open.
- Polite constructions and numbers written out in words can look long
without adding cognitive load. The previous wording said they don't
take longer to say, which isn't true.
The rating scale had "briefly using the wrong language" at 2 and "repeatedly talking in a language not instructed" at 1, so a recurring English "one moment" in a French call could go either way. Now: - an isolated fixed phrase (a hold, acknowledgement or courtesy formula) is rated 2, even when it recurs across turns; - whole sentences of content in another language, or most turns in another language, are rated 1.
Violation 5 flagged "paid time off (PTO)", which is a normal acronym
expansion in English HR and IT turns. It now covers only a term followed
by its translation into another language or by a synonym that means
exactly the same thing ("PIN / passcode"). Not a violation:
- an acronym expanded once, on its first mention;
- a slash between paired or alternative terms ("AM/PM", "and/or");
- a word, code or abbreviation used on its own.
Also drop the claim that TTS never voices a slash; some engines do.
- Confusable letters and digits: the rule now only stops the judge from
flagging one because of its own transcription. Audio that is ambiguous
between two letters or digits is still an error. The previous "benefit
of the doubt" wording contradicted the entity_error definition.
- A phrase in another language is an error only if it is not in the
intended text; reproducing a phrase the intended text contains is not.
- The wrong_language definition and the rating-0 definition now name the
cases the new rules use: a phrase or clause in another language, and a
letter or digit name from another language inside a spelled code.
- An unusual reading covers only the intended words read in an unusual
order or grouping (digit by digit vs as one number). A different word
for the value ("septante" for "soixante-dix") is still an error, as the
existing rule says.
- The example no longer reads "a English turn" in English runs.
- A phrase in another language around the entities no longer rates the
turn 0. Before, it did only when the turn had entities, so "One moment,
je vérifie." was excluded while "One moment, je vérifie le code
ZK3FFW." was rated 0 with a perfect code. Faithfulness and TTS fidelity
already score the phrase.
- A letter or digit name from another language still rates 0 when it is
inside a trace entity.
- Confusable letters and digits: the rule now only stops the judge from
flagging one because of its own transcription. Audio that is ambiguous
between two letters or digits is still an error, as in the judge's own
examples ("M" sounding like "N", "fifty" vs "fifteen").
- The example no longer reads "a English turn" in English runs.
- Confusable letters and digits: the rule now only stops the judge from
flagging one because of its own transcription. Audio that is ambiguous
between two letters or digits is still an error. The previous "benefit
of the doubt" wording made the judge more lenient on the hardest cases,
so fewer records with a mis-spoken code were rerun.
- A phrase in another language is an error only if it is not in the
intended text; reproducing a phrase the intended text contains is not.
- An unusual reading covers only the intended words read in an unusual
order or grouping. A different word for the value ("septante" for
"soixante-dix") is still flagged, as the existing rule says.
- The example no longer reads "a English turn" in English runs.
…hared-multilingual-rules
…hared-multilingual-rules
The fabricating_tool_parameters note on confusable letters pointed to "the language-specific guidance below". This branch adds no guidance, so the pointer moves to the branch that does.
| - Confusable letters and digits: don't flag one because of your own transcription; audio that is ambiguous between two letters or digits is still an error. | ||
| - A phrase or sentence in another language that is not in the intended text (e.g., an English "one moment" in a French turn) is rating = 0 with `wrong_language`, even when the rest of the turn is in {expected_language}. If the intended text itself contains the phrase, reproducing it is not an error. | ||
| - Not wrong language: proper nouns, official product or system names, codes and acronyms, and loanwords that are established in {expected_language}. | ||
| - The intended words read in an unusual order or grouping (e.g., a number read digit by digit instead of as one number, or the reverse) are not an error by themselves; they are an `entity_error` only if a native {expected_language} listener could take it for a different value. A different word for the value (e.g., "septante" for "soixante-dix") is still an error, as above. |
There was a problem hiding this comment.
I don't know what "as above" at the very end here refers to
There was a problem hiding this comment.
Good catch. It pointed to the "Number surface forms" exception in the "What to ignore" list a few lines up, which says that a different word for the same value (Swiss/Belgian "septante" vs standard French "soixante-dix") should be flagged. That was too far away to be clear, so I replaced "as above" with the rule itself: "…is still an error, even though it means the same number." (1779127)
| - Confusable letters and digits: don't flag one because of your own transcription; audio that is ambiguous between two letters or digits is still an error. | ||
| - A phrase or sentence in another language that is not in the intended text (e.g., an English "one moment" in a French turn) is wrong language for part of the turn: rating at most 2, and 1 if it replaces an entity or the turn no longer makes sense. If the intended text itself contains the phrase, reproducing it is not an error. | ||
| - Not wrong language: proper nouns, official product or system names, codes and acronyms, and loanwords that are established in {expected_language}. | ||
| - The intended words read in an unusual order or grouping (e.g., a number read digit by digit instead of as one number, or the reverse) are not an entity error: rating at most 2 if they sound unnatural, and 1 only if a native {expected_language} listener could take it for a different value. A different word for the value (e.g., "septante" for "soixante-dix") is still flagged, as above. |
There was a problem hiding this comment.
same comment, not sure what 'as above' means here
There was a problem hiding this comment.
Same as for tts_fidelity: it referred to the "Number surface forms" exception earlier in this prompt. I replaced "as above" with the rule itself: "…is still flagged, even though it means the same number." (a3aa6c4)
sn-rachelhansen
left a comment
There was a problem hiding this comment.
I think this looks pretty good - I left a handful of comments. My only concern are the things I think are 'missing' (but these things may very well be covered in future PRs). The only thing that comes to mind immediately is the problem with speakability marking down things that are tags for the TTS model (ex. "[speaker cuts off]"). If I think of anything else, I'll leave send a message in the chat
Co-authored-by: sn-rachelhansen <rachel.hansen@servicenow.com>
|
Thank you @sn-rachelhansen for your review! For speakability, I merged the fix last week :) #246 |
The bullet on unusual number readings ended with "is still an error, as above", pointing to the "Number surface forms" exception in the What to ignore list. Say the rule directly instead.
Same wording fix as for tts_fidelity: replace "as above" with the rule itself.
The conciseness suggestion and the two "different word" wording fixes change the English conciseness, tts_fidelity and user_speech_fidelity prompts on purpose.
| - Making a reasonable inference when the context makes the intent obvious (e.g., user says "my flight" when they only have one flight) | ||
| - Retrying a lookup with a corrected spelling after the user confirms or spells out the information — this is proper disambiguation behavior | ||
| - Trying valid different combinations of names and confirmation codes when a lookup fails (e.g., swapping commonly confused letters like "v"/"z" or "b"/"d", reordering characters) | ||
| - A value that merely contains letters or digits that sound alike (e.g., "b"/"d", or a digit and a letter that are homophones in the conversation's language) — this is NOT by itself a reason to flag failing_to_disambiguate or fabricating_tool_parameters. Use phonetic confusability only when the trace shows the ambiguity mattered: a failed lookup, a user correction, two different versions of the value across turns, or an utterance that can genuinely be heard two ways (a homophone). Do not flag hypothetical alternative readings when the value was verified successfully and nothing in the conversation signals ambiguity. |
There was a problem hiding this comment.
Maybe it's better to add an example of where a digit and a letter might be homophones?
| - A value that merely contains letters or digits that sound alike (e.g., "b"/"d", or a digit and a letter that are homophones in the conversation's language) — this is NOT by itself a reason to flag failing_to_disambiguate or fabricating_tool_parameters. Use phonetic confusability only when the trace shows the ambiguity mattered: a failed lookup, a user correction, two different versions of the value across turns, or an utterance that can genuinely be heard two ways (a homophone). Do not flag hypothetical alternative readings when the value was verified successfully and nothing in the conversation signals ambiguity. | |
| - A value that merely contains letters or digits that sound alike (e.g., "b"/"d", or a digit and a letter, "9"/"Q" in Ja, that are homophones in the conversation's language) — this is NOT by itself a reason to flag failing_to_disambiguate or fabricating_tool_parameters. Use phonetic confusability only when the trace shows the ambiguity mattered: a failed lookup, a user correction, two different versions of the value across turns, or an utterance that can genuinely be heard two ways (a homophone). Do not flag hypothetical alternative readings when the value was verified successfully and nothing in the conversation signals ambiguity. |
Why
Some of the problems the native-speaker reviewers found are not specific to one language. They would happen in any language, including English, so they belong in the shared judge prompts rather than in per-language guidance.
This PR changes English scoring for all six judges it touches: conciseness, faithfulness, speakability, tts_fidelity, agent_speech_fidelity and user_speech_fidelity.
Versions are bumped in #251, so this PR must not be run or merged on its own.
What changes
One commit per judge, so each can be reviewed and validated separately. After review, a second commit per judge applies the review fixes; the table below describes the result.
wrong_languagedefinition and the rating-0 definition now name the phrase and letter-name cases.Spelled codes and mixed-language speech:
tests/fixtures/judge_prompts_en.jsonrecords the new English renders of the six judges.Validation
English judge validation datasets (
docs/metrics/judge_validation_datasets/), production judge models, 3 runs per side, mean ± std. Before is Judge prompts: per-language guidance slot #249, which renders the same English prompts asmain.us.anthropic.claude-opus-4-6-v1)gpt-5.2)Both changes are within one standard deviation: no English regression on these datasets. The dataset runner has no audio judges, so agent_speech_fidelity is not covered here.
Re-scoring the native-speaker review set: the 310 conversations the reviewers commented on (de, es, fr, fr-CA, hi, it, ja, ko), before (Judge prompts: per-language guidance slot #249) and after (Judge prompts: shared rules for spelled codes, mixed-language speech, glosses and politeness #250), for speakability, conciseness, faithfulness and agent_speech_fidelity.
gpt-5.2): glosses are now flagged. 66 of the 70 turns that moved from pass to fail are a term followed by its translation or exact synonym, such as a native term with its English equivalent in parentheses. Why: the new violation 5 names glosses, which the old wording did not cover, since the listener hears the same thing twice. Acronyms expanded on first mention and slash pairs like "AM/PM" are excluded, so they keep passing.gpt-5.2): a small shift toward lenient, from 0.812 to 0.829. 226 turns moved up against 148 down, while a re-run on the same code splits evenly (182 / 180).verbosity_or_fillerflags go from 552 to 502 andexcess_information_densityfrom 208 to 181. Why: one courtesy phrase per function and one first-mention acronym expansion are now allowed, and politeness conventions are said to add length "without adding cognitive load". So turns that are polite but not repetitive are no longer counted as filler.us.anthropic.claude-opus-4-6-v1):failing_to_disambiguatego from 63 to 53, and forfabricating_tool_parametersfrom 48 to 40. Why: sound-alike letters or digits are flagged only when the conversation shows the ambiguity mattered.gemini-3-flash-preview): more real entity errors are caught, such as an extra letter at the end of a code, a wrong digit count in an ID, a vowel substituted in a confirmation code, or a letter said as a word. Why: letters and digits in spelled codes must be spoken with the expected language's names, and ambiguous audio of an entity is an error. Only 2% of turns change rating, so these changes are not run-to-run variation.Stack
Versions are bumped in PR 3.