Ground the judge's quote with markdown emphasis and whitespace ignored
This commit is contained in:
+7
-2
@@ -527,8 +527,13 @@ def complete(verdict):
|
||||
def grounded(verdict, transcript):
|
||||
if not verdict["interrupt"]:
|
||||
return True
|
||||
evidence = verdict["evidence"]
|
||||
return evidence.strip() != "" and evidence in transcript
|
||||
evidence = plain(verdict["evidence"])
|
||||
return evidence != "" and evidence in plain(transcript)
|
||||
|
||||
|
||||
def plain(text):
|
||||
# The judge drops markdown emphasis and reflows whitespace when it quotes.
|
||||
return " ".join(text.replace("*", "").replace("_", "").split())
|
||||
|
||||
|
||||
# ~/.claude.json
|
||||
|
||||
Reference in New Issue
Block a user