app/refunds.py#RefundPolicy.explainnew openai call, line 41
+ def explain(self, order):+ """Tells the customer why a refund was or wasn't approved."""+ reply = client.chat.completions.create(+ model="gpt-4o-mini",+ messages=[{"role": "system", "content": EXPLAIN_PROMPT},+ {"role": "user", "content": order.refund_summary()}],+ )+ return reply.choices[0].message.content
Ask your coding agent:
Add an eval for RefundPolicy.explain (app/refunds.py, line 41), which this pull request adds. Put it with our other evals, give it inputs that exercise it, and assert on what its output must and must not say.