datarobot_genai.eval.benchmarks.answer_correctness
answer_correctness
Answer Correctness — deterministic match against a known answer (judge-free).
The regression-testing workhorse: when you DO have ground-truth answers, check the agent's response against them without paying for a judge model. Fully deterministic, so results are reproducible run-to-run.
Scoring (judge-free): 1.0 on match, 0.0 otherwise, by match_mode:
exact response equals reference after trimming whitespace
normalized equal after lowercasing + stripping punctuation/extra spaces
(the default — tolerant of formatting noise)
contains normalized reference appears somewhere in the normalized response
Dataset fields
input (required) the prompt sent to the agent ideal_response (required) the ground-truth answer to match against match_mode (optional) exact | normalized | contains (default normalized)
A case with no ideal_response is scored inconclusive, not failed.
evaluate_response
Pure scoring logic — importable for unit tests, no judge, no I/O.