Deterministic checks that need no judge model. Each metric is a function
of three character vectors, generated, reference, and prompt, and
returns one number per row (0 or 1 for pass/fail metrics). Pass names
from this list, or your own functions, to dragon_evaluate().
Details
exact: normalized exact match (case, whitespace, and trailing punctuation ignored).contains: the normalized reference appears inside the reply.token_f1: token overlap F1 between reply and reference, the SQuAD style partial-credit score.json_valid: the reply parses as JSON (a fenced code block is unwrapped first).numeric: the last number in the reply equals the last number in the reference.length_ratio: characters in the reply divided by characters in the reference. Useful for spotting rambling or truncation.
dragon_metric_regex() builds a metric that passes when the reply
matches a pattern, for format checks such as "starts with a ticket id".