Ground the judge's quote with markdown emphasis and whitespace ignored

This commit is contained in:
2026-10-01 21:54:58 +02:00
parent 2a09693098
commit 3f5f6de197
3 changed files with 11 additions and 2 deletions
+7 -1
View File
@@ -94,4 +94,10 @@ def verdict_from(output) -> Verdict | Failure:
def grounded(verdict, transcript) -> bool:
return verdict.evidence.strip() != "" and verdict.evidence in transcript
evidence = plain(verdict.evidence)
return evidence != "" and evidence in plain(transcript)
def plain(text) -> str:
# The judge drops markdown emphasis and reflows whitespace when it quotes.
return " ".join(text.replace("*", "").replace("_", "").split())