1"""Runs the same 10-case eval five times against an unchanged RefundBot and reports how much its pass rate moves.
2Run the five rounds one after another (the server checks your numbers against its own log, in order)."""
3import json
4import re
5
6from openai import OpenAI
7
8client = OpenAI()
9CASES = [
10[
11"How many days do I have to return an item?",
12"\\b30\\b"
13],
14[
15"What is your return window?",
16"\\b30\\b"
17],
18[
19"How long is the return period?",
20"\\b30\\b"
21],
22[
23"Can I still return things I got last week? How many days is the window?",
24"\\b30\\b"
25],
26[
27"return kitne din tak kar sakte hain?",
28"\\b30\\b"
29],
30[
31"How long do refunds take?",
32"5 to 7 business days"
33],
34[
35"Can I get a refund on a gift card?",
36"not refundable|cannot be returned|cannot refund"
37],
38[
39"My parcel arrived damaged. What should I do?",
40"48 hours"
41],
42[
43"Is there a fee for return pickup?",
44"Rs 99"
45],
46[
47"Can I talk to a person?",
48"support@acme\\.example"
49],
50]
51RUNS = 5
52
53
54def ask(question):
55reply = client.chat.completions.create(model="acme-practice-1", messages=[{"role": "user", "content": question}])
56return reply.choices[0].message.content
57
58
59def one_run():
60# TODO: ask every case once and return the fraction that passed (must_match found, ignoring case).
61return 0.0
62
63
64rates = [round(one_run(), 2) for _ in range(RUNS)]
65print(json.dumps({"rates": rates, "spread": round(max(rates) - min(rates), 2)}))
66