supportdesk/policy.py:22
decide_refund
Apply the store refund policy to a ticket and return a structured eligibility decision.
Output contract
JSON object with exactly four keys in order: reasoning (string, 1-3 sentences), is_refund_request (boolean), eligible (one of "yes", "no", "store_credit", "need_info"), policy_section (string like "2.1", or null). When is_refund_request is false, eligible must be "no" and policy_section must be null. Graded fields: is_refund_request, eligible, policy_section, which must match the refund policy applied to the order date and today's date. reasoning is not graded.
no cheaper model passed the checks
Dollar figures are projections: measured token counts x illustrative per-model prices x an assumed call volume, all set in downshift.yaml. They are not a real bill.
Models
How each model did
| Model | Pass rate | Tokens in / out | Latency | Cost / call | vs baseline | Check |
|---|---|---|---|---|---|---|
qwen2.5:7bbaseline premium tier | 40.0% (10/25) | 477 / 83 | 6.82 s | $0.002021 | n/a | n/a |
qwen2.5:3b standard tier | 40.0% (10/25) | 477 / 80 | 2.64 s | $0.000318 | 100.0% | fail |
qwen2.5:1.5b budget tier | 28.0% (7/25) | 477 / 82 | 1.95 s | $0.000121 | 70.0% | fail |
qwen2.5:0.5b nano tier | 0.0% (0/25) | 477 / 70 | 0.75 s | $0.000076 | 0.0% | fail |
- 3b pass rate 40% is below the floor 80%
- 1.5b keeps 70% of baseline quality, needs 95%
- 0.5b keeps 0% of baseline quality, needs 95%
Prompt
What the call sends
Model in code: qwen2.5:7b
Eval examples
3 of 25 cases, every model side by side
›pol-017b3b1.5b0.5b
Inputs
- policy
- # SupportDesk Store Refund Policy (v3) This is a fictional policy for a fictional store, used only as demo data. ## 1. Standard returns 1.1 Physical items can be returned for a full refund within 30 days of the order date. 1.2 Returned items must be unused and in their original packaging. ## 2. Damaged or defective items 2.1 Items that arrive damaged or defective are eligible for a full refund or replacement within 60 days of the order date. 2.2 Damage reported more than 60 days after the order date is not eligible. ## 3. Exceptions 3.1 Digital products (e-books, software licenses, gift cards) are non-refundable once downloaded or activated. 3.2 Items bought on clearance sale are eligible for store credit only, not a cash refund. 3.3 If an order has not been delivered 14 days after the order date, the customer is eligible for a full refund. ## 4. Missing information 4.1 If the order ID or order date is missing, the refund cannot be decided. Ask the customer for the missing details.
- today
- 2026-09-20
- order_info_json
- { "order_id": "ORD-10421", "order_date": "2026-09-02" }
- subject
- Refund request for ORD-10421
- body
- Hi, I ordered a pair of wireless headphones on 2026-09-02 (order ORD-10421). They're unused and still in the box, but I changed my mind. Can I get a refund?
Expected
change-of-mind, unused in original packaging, 18 days — within 30-day limit (T001)
Outputs
all fields match
all fields match
all fields match
eligible: expected 'yes', got 'no'; policy_section: expected '1.1', got 2
›pol-027b3b1.5b0.5b
Inputs
- policy
- # SupportDesk Store Refund Policy (v3) This is a fictional policy for a fictional store, used only as demo data. ## 1. Standard returns 1.1 Physical items can be returned for a full refund within 30 days of the order date. 1.2 Returned items must be unused and in their original packaging. ## 2. Damaged or defective items 2.1 Items that arrive damaged or defective are eligible for a full refund or replacement within 60 days of the order date. 2.2 Damage reported more than 60 days after the order date is not eligible. ## 3. Exceptions 3.1 Digital products (e-books, software licenses, gift cards) are non-refundable once downloaded or activated. 3.2 Items bought on clearance sale are eligible for store credit only, not a cash refund. 3.3 If an order has not been delivered 14 days after the order date, the customer is eligible for a full refund. ## 4. Missing information 4.1 If the order ID or order date is missing, the refund cannot be decided. Ask the customer for the missing details.
- today
- 2026-10-05
- order_info_json
- { "order_id": "ORD-09877", "order_date": "2026-06-12" }
- subject
- Refund please
- body
- Order ORD-09877 from 2026-06-12, a blender. I never used it. I want a refund.
Expected
change-of-mind, unused, but 115 days — far past 30-day window (T012)
Outputs
eligible: expected 'no', got 'yes'
eligible: expected 'no', got 'yes'
eligible: expected 'no', got 'yes'; policy_section: expected '1.1', got '1'
policy_section: expected '1.1', got 2
›pol-037b3b1.5b0.5b
Inputs
- policy
- # SupportDesk Store Refund Policy (v3) This is a fictional policy for a fictional store, used only as demo data. ## 1. Standard returns 1.1 Physical items can be returned for a full refund within 30 days of the order date. 1.2 Returned items must be unused and in their original packaging. ## 2. Damaged or defective items 2.1 Items that arrive damaged or defective are eligible for a full refund or replacement within 60 days of the order date. 2.2 Damage reported more than 60 days after the order date is not eligible. ## 3. Exceptions 3.1 Digital products (e-books, software licenses, gift cards) are non-refundable once downloaded or activated. 3.2 Items bought on clearance sale are eligible for store credit only, not a cash refund. 3.3 If an order has not been delivered 14 days after the order date, the customer is eligible for a full refund. ## 4. Missing information 4.1 If the order ID or order date is missing, the refund cannot be decided. Ask the customer for the missing details.
- today
- 2026-09-19
- order_info_json
- { "order_id": "ORD-10588", "order_date": "2026-08-28" }
- subject
- Where is my package??
- body
- Order ORD-10588 placed on 2026-08-28 still hasn't arrived. Tracking hasn't updated in 10 days. This is ridiculous. I want my money back.
Expected
not delivered, 22 days after order — eligible under section 3.3 (T002)
Outputs
all fields match
eligible: expected 'yes', got 'full refund'
policy_section: expected '3.3', got '3.1'
eligible: expected 'yes', got 'store_credit'; policy_section: expected '3.3', got 2
All cases