A single test tells you pass or fail. An eval harness runs a whole dataset and tells you how many cases pass, and which kinds of failure are growing. Every team that ships AI features runs one; frameworks like DeepEval and Promptfoo are harnesses with more features. Writing a small one yourself is the fastest way to understand them.
cases.jsonl holds one case per line: an id, the question, a must_match regular expression, sometimes a must_not_match, and the failure mode the case belongs to.
Your task
Complete eval.py. For each case, ask RefundBot the question and decide pass or fail: must_match must be found and must_not_match, when present, must not be. Ignore case in both. Then print one line of JSON:
{"total": 11, "passed": 10, "pass_rate": 0.909, "by_mode": {"wrong_fact": {"total": 4, "failed": 0}, ...}}
Round pass_rate to three decimals. On submit your harness runs on a faulty build and on a larger dataset you have not seen, and its numbers are compared with the right ones.