Downshift
← All call sites

supportdesk/extract.py:21

extract_order_info

found by astmediumjson_fieldsjsonmax_tokens 60temperature 0

Extract order ID and order date from a support ticket body.

Output contract

JSON object with exactly two keys: `order_id` (string matching ORD-\d+ or null) and `order_date` (string in YYYY-MM-DD format or null); no additional keys; values must be null when not explicitly stated. Graded fields: order_id, order_date.

downgradeqwen2.5:7b → qwen2.5:3b

keeps 105% of baseline quality and costs less

$335.00
Before / month
$52.96
After / month
$282.04
Savings (84.2%)
20,000
Calls / day

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

ModelPass rateTokens in / outLatencyCost / callvs baselineCheck
qwen2.5:7bbaseline
premium tier
95.2% (20/21)105 / 302.15 s$0.000558n/an/a
qwen2.5:3bchosen
standard tier
100.0% (21/21)105 / 290.92 s$0.000088105.0%pass
qwen2.5:1.5b
budget tier
81.0% (17/21)105 / 300.71 s$0.00003485.0%fail
qwen2.5:0.5b
nano tier
71.4% (15/21)105 / 280.33 s$0.00002275.0%fail

Prompt

What the call sends

Model in code: qwen2.5:7b

system
Extract the order ID and the order date from the support ticket. Order IDs look like ORD-12345. Return JSON with exactly two keys: order_id and order_date. order_date must be YYYY-MM-DD. Use null for anything not stated explicitly.
user
{ticket_text}

Eval examples

3 of 21 cases, every model side by side

›ext-017b3b1.5b0.5b

Inputs

ticket_text
Refund request for ORD-10421 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

{ "order_id": "ORD-10421", "order_date": "2026-09-02" }

both order ID and date explicit (T001)

Outputs

qwen2.5:7bpass
{ "order_id": "ORD-10421", "order_date": "2026-09-02" }

all fields match

qwen2.5:3bpass
{ "order_id": "ORD-10421", "order_date": "2026-09-02" }

all fields match

qwen2.5:1.5bpass
{ "order_id": "ORD-10421", "order_date": "2026-09-02" }

all fields match

qwen2.5:0.5bpass
{ "order_id": "ORD-10421", "order_date": "2026-09-02" }

all fields match

›ext-027b3b1.5b0.5b

Inputs

ticket_text
Where is my package?? 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

{ "order_id": "ORD-10588", "order_date": "2026-08-28" }

YYYY-MM-DD date directly stated (T002)

Outputs

qwen2.5:7bpass
{ "order_id": "ORD-10588", "order_date": "2026-08-28" }

all fields match

qwen2.5:3bpass
{ "order_id": "ORD-10588", "order_date": "2026-08-28" }

all fields match

qwen2.5:1.5bpass
{ "order_id": "ORD-10588", "order_date": "2026-08-28" }

all fields match

qwen2.5:0.5bfail
{ "order_id": "ORD-10588", "order_date": null }

order_date: expected '2026-08-28', got None

›ext-047b3b1.5b0.5b

Inputs

ticket_text
Solicitud de reembolso Hola, compré una lámpara (pedido ORD-10812) el 2026-07-30 y llegó rota. ¿Pueden devolverme el dinero?

Expected

{ "order_id": "ORD-10812", "order_date": "2026-07-30" }

Spanish ticket, date in YYYY-MM-DD format (T006)

Outputs

qwen2.5:7bpass
{ "order_id": "ORD-10812", "order_date": "2026-07-30" }

all fields match

qwen2.5:3bpass
{ "order_id": "ORD-10812", "order_date": "2026-07-30" }

all fields match

qwen2.5:1.5bpass
{ "order_id": "ORD-10812", "order_date": "2026-07-30" }

all fields match

qwen2.5:0.5bpass
{ "order_id": "ORD-10812", "order_date": "2026-07-30" }

all fields match

All cases

Pass and fail across all 21 cases

qwen2.5:7b
20/21
qwen2.5:3b
21/21
qwen2.5:1.5b
17/21
qwen2.5:0.5b
15/21
pass fail no resultHover a square for the case id.