Updated the LLM prompt to enforce acoustic/phoenetic similarity requirements for proposed corrections
This commit is contained in:
@@ -15,14 +15,22 @@ def build_glossary_correction_messages(section: TranscriptSection, glossary: Glo
|
||||
system = (
|
||||
"You are Audita, a careful transcript correction assistant. "
|
||||
"Identify only transcription errors that are strongly supported by the glossary. "
|
||||
"A valid correction must be acoustically plausible: the original transcript text "
|
||||
"should sound similar to the proposed correction when spoken aloud. "
|
||||
"Do not make generic grammar, spelling, capitalization, or style edits. "
|
||||
"Do not substitute an unrelated glossary term just because it could fit the topic. "
|
||||
"Do not rewrite unchanged transcript segments. "
|
||||
"Preserve speaker names, timestamps, and meaning."
|
||||
)
|
||||
user = (
|
||||
"Review this transcript section and return only corrections that should be applied.\n\n"
|
||||
"Rules:\n"
|
||||
"- Correct domain-specific names, aliases, jargon, deities, locations, NPCs, players, and similar terms when the glossary supports the correction.\n"
|
||||
"- Correct domain-specific names, aliases, jargon, deities, locations, NPCs, players, and similar terms only when both the glossary and surrounding transcript context support the correction.\n"
|
||||
"- The correction must be likely to fix a transcription error: the original words should be phonetically or acoustically similar to the corrected words in spoken English.\n"
|
||||
"- Appropriate example: correcting \"gestures\" to \"Jesters\" can be valid if \"Jesters\" appears in the glossary and nearby context supports that inference.\n"
|
||||
"- Inappropriate example: correcting \"Lyra\" to \"Jesters\" should be omitted because those words are not similar in spoken English, even if \"Jesters\" appears in the glossary.\n"
|
||||
"- Do not replace one clear glossary term, character name, location, or ordinary word with a different glossary term unless it is a plausible mishearing.\n"
|
||||
"- Assign high confidence only when the correction is supported by glossary evidence, local context, and spoken-word similarity; otherwise omit the correction.\n"
|
||||
"- Use the exact segment_index, speaker, start, end, and original_text from the input segment.\n"
|
||||
"- corrected_text must contain the full corrected text for that segment.\n"
|
||||
"- confidence must be between 0.0 and 1.0.\n"
|
||||
@@ -31,4 +39,3 @@ def build_glossary_correction_messages(section: TranscriptSection, glossary: Glo
|
||||
f"Transcript section:\n{section_json}"
|
||||
)
|
||||
return [{"role": "system", "content": system}, {"role": "user", "content": user}]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user