Extract Invoice Line Items

ExtractionDifficulty: MEDIUM11 models comparedTotal cost: $0.017943

Prompt

Extract all line items from the following invoice text and return them as a JSON array. Each object should have: item_number, description, quantity, unit_price, and total. Infer missing fields as null. Be careful with formatting inconsistencies, merged fields, and implicit quantities.

---
ACME SUPPLIES CO. — Invoice #INV-2024-0891
Bill To: Northgate Tech Ltd.
Date: March 14, 2024

Items Ordered:
1. Ergonomic Mesh Chair (Model: EM-550)    x4    $219.99 ea.    $879.96
2. Standing Desk Converter - Large          x2    $134.50         $269.00
3. USB-C Docking Station                   x10   $89.00 each     $890.00
4. HDMI Cable 2m (3-pack)                   —     $24.99/pack     $74.97
5. Monitor Arm, Dual (SKU: MA-D200)        qty:1  $159.00         $159.00
6. Laptop Security Lock                    x15   $12.00          $179.00
7. Whiteboard 120x90cm                      x3    $45.00          $135.00

Subtotal: $2,586.93
Shipping & Handling: $45.00
Discount (10%): -$258.69
Tax (8.5%): $196.13
Total Due: $2,569.37
---

Notes:
- Item 4 quantity was not explicitly listed; infer from total and unit price.
- Item 6 appears to have a calculation error; extract values as written, do not correct.

Expected Output

[{"item_number": 1, "description": "Ergonomic Mesh Chair (Model: EM-550)", "quantity": 4, "unit_price": 219.99, "total": 879.96}, {"item_number": 2, "description": "Standing Desk Converter - Large", "quantity": 2, "unit_price": 134.50, "total": 269.00}, {"item_number": 3, "description": "USB-C Docking Station", "quantity": 10, "unit_price": 89.00, "total": 890.00}, {"item_number": 4, "description": "HDMI Cable 2m (3-pack)", "quantity": 3, "unit_price": 24.99, "total": 74.97}, {"item_number": 5, "description": "Monitor Arm, Dual (SKU: MA-D200)", "quantity": 1, "unit_price": 159.00, "total": 159.00}, {"item_number": 6, "description": "Laptop Security Lock", "quantity": 15, "unit_price": 12.00, "total": 179.00}, {"item_number": 7, "description": "Whiteboard 120x90cm", "quantity": 3, "unit_price": 45.00, "total": 135.00}]

Model Responses

Claude Opus 4.6

Unrated
6,750ms961 tokens
```json [ { "item_number": 1, "description": "Ergonomic Mesh Chair (Model: EM-550)", "quantity": 4, "unit_price": 219.99, "total": 879.96 }, { "item_number": 2, "description": "Standing Desk Converter - Large", "quantity": 2, "unit_price": 134.50, "total": 269.00 }, { "item_number": 3, "description": "USB-C Docking Station", "quantity": 10, "unit_price": 89.00, "total": 890.00 }, { "item_number": 4, "description": "HDMI Cable 2m (3-pack)", "quantity": 3, "unit_price": 24.99, "total": 74.97 }, { "item_number": 5, "description": "Monitor Arm, Dual (SKU: MA-D200)", "quantity": 1, "unit_price": 159.00, "total": 159.00 }, { "item_number": 6, "description": "Laptop Security Lock", "quantity": 15, "unit_price": 12.00, "total": 179.00 }, { "item_number": 7, "description": "Whiteboard 120x90cm", "quantity": 3, "unit_price": 45.00, "total": 135.00 } ] ``` **Notes on extraction decisions:** - **Item 4:** The quantity was shown as "—" (a dash), so it was inferred by dividing the total ($74.97) by the unit price ($24.99/pack), yielding a quantity of **3** packs. - **Item 6:** The total ($179.00) does not match the expected calculation (15 × $12.00 = $180.00). As instructed, the values were extracted **as written** without correction.

GPT-4.1

Unrated
3,796ms725 tokens
```json [ { "item_number": 1, "description": "Ergonomic Mesh Chair (Model: EM-550)", "quantity": 4, "unit_price": 219.99, "total": 879.96 }, { "item_number": 2, "description": "Standing Desk Converter - Large", "quantity": 2, "unit_price": 134.50, "total": 269.00 }, { "item_number": 3, "description": "USB-C Docking Station", "quantity": 10, "unit_price": 89.00, "total": 890.00 }, { "item_number": 4, "description": "HDMI Cable 2m (3-pack)", "quantity": 3, "unit_price": 24.99, "total": 74.97 }, { "item_number": 5, "description": "Monitor Arm, Dual (SKU: MA-D200)", "quantity": 1, "unit_price": 159.00, "total": 159.00 }, { "item_number": 6, "description": "Laptop Security Lock", "quantity": 15, "unit_price": 12.00, "total": 179.00 }, { "item_number": 7, "description": "Whiteboard 120x90cm", "quantity": 3, "unit_price": 45.00, "total": 135.00 } ] ```

GPT-4.1 Mini

Unrated
7,814ms725 tokens
```json [ { "item_number": 1, "description": "Ergonomic Mesh Chair (Model: EM-550)", "quantity": 4, "unit_price": 219.99, "total": 879.96 }, { "item_number": 2, "description": "Standing Desk Converter - Large", "quantity": 2, "unit_price": 134.50, "total": 269.00 }, { "item_number": 3, "description": "USB-C Docking Station", "quantity": 10, "unit_price": 89.00, "total": 890.00 }, { "item_number": 4, "description": "HDMI Cable 2m (3-pack)", "quantity": 3, "unit_price": 24.99, "total": 74.97 }, { "item_number": 5, "description": "Monitor Arm, Dual (SKU: MA-D200)", "quantity": 1, "unit_price": 159.00, "total": 159.00 }, { "item_number": 6, "description": "Laptop Security Lock", "quantity": 15, "unit_price": 12.00, "total": 179.00 }, { "item_number": 7, "description": "Whiteboard 120x90cm", "quantity": 3, "unit_price": 45.00, "total": 135.00 } ] ```

GPT-4.1 Nano

Unrated
2,783ms721 tokens
[ { "item_number": 1, "description": "Ergonomic Mesh Chair (Model: EM-550)", "quantity": 4, "unit_price": 219.99, "total": 879.96 }, { "item_number": 2, "description": "Standing Desk Converter - Large", "quantity": 2, "unit_price": 134.50, "total": 269.00 }, { "item_number": 3, "description": "USB-C Docking Station", "quantity": 10, "unit_price": 89.00, "total": 890.00 }, { "item_number": 4, "description": "HDMI Cable 2m (3-pack)", "quantity": 3, "unit_price": 24.99, "total": 74.97 }, { "item_number": 5, "description": "Monitor Arm, Dual (SKU: MA-D200)", "quantity": 1, "unit_price": 159.00, "total": 159.00 }, { "item_number": 6, "description": "Laptop Security Lock", "quantity": 15, "unit_price": 12.00, "total": 179.00 }, { "item_number": 7, "description": "Whiteboard 120x90cm", "quantity": 3, "unit_price": 45.00, "total": 135.00 } ]

o3

Unrated
13,285ms1634 tokens
[ { "item_number": 1, "description": "Ergonomic Mesh Chair (Model: EM-550)", "quantity": 4, "unit_price": 219.99, "total": 879.96 }, { "item_number": 2, "description": "Standing Desk Converter - Large", "quantity": 2, "unit_price": 134.5, "total": 269.0 }, { "item_number": 3, "description": "USB-C Docking Station", "quantity": 10, "unit_price": 89.0, "total": 890.0 }, { "item_number": 4, "description": "HDMI Cable 2m (3-pack)", "quantity": 3, "unit_price": 24.99, "total": 74.97 }, { "item_number": 5, "description": "Monitor Arm, Dual (SKU: MA-D200)", "quantity": 1, "unit_price": 159.0, "total": 159.0 }, { "item_number": 6, "description": "Laptop Security Lock", "quantity": 15, "unit_price": 12.0, "total": 179.0 }, { "item_number": 7, "description": "Whiteboard 120x90cm", "quantity": 3, "unit_price": 45.0, "total": 135.0 } ]

o3 Mini

Unrated
10,927ms1757 tokens
[ { "item_number": 1, "description": "Ergonomic Mesh Chair (Model: EM-550)", "quantity": 4, "unit_price": 219.99, "total": 879.96 }, { "item_number": 2, "description": "Standing Desk Converter - Large", "quantity": 2, "unit_price": 134.50, "total": 269.00 }, { "item_number": 3, "description": "USB-C Docking Station", "quantity": 10, "unit_price": 89.00, "total": 890.00 }, { "item_number": 4, "description": "HDMI Cable 2m (3-pack)", "quantity": 3, "unit_price": 24.99, "total": 74.97 }, { "item_number": 5, "description": "Monitor Arm, Dual (SKU: MA-D200)", "quantity": 1, "unit_price": 159.00, "total": 159.00 }, { "item_number": 6, "description": "Laptop Security Lock", "quantity": 15, "unit_price": 12.00, "total": 179.00 }, { "item_number": 7, "description": "Whiteboard 120x90cm", "quantity": 3, "unit_price": 45.00, "total": 135.00 } ]

o4 Mini

Unrated
9,697ms1442 tokens
[ { "item_number": 1, "description": "Ergonomic Mesh Chair (Model: EM-550)", "quantity": 4, "unit_price": 219.99, "total": 879.96 }, { "item_number": 2, "description": "Standing Desk Converter - Large", "quantity": 2, "unit_price": 134.50, "total": 269.00 }, { "item_number": 3, "description": "USB-C Docking Station", "quantity": 10, "unit_price": 89.00, "total": 890.00 }, { "item_number": 4, "description": "HDMI Cable 2m (3-pack)", "quantity": 3, "unit_price": 24.99, "total": 74.97 }, { "item_number": 5, "description": "Monitor Arm, Dual (SKU: MA-D200)", "quantity": 1, "unit_price": 159.00, "total": 159.00 }, { "item_number": 6, "description": "Laptop Security Lock", "quantity": 15, "unit_price": 12.00, "total": 179.00 }, { "item_number": 7, "description": "Whiteboard 120x90cm", "quantity": 3, "unit_price": 45.00, "total": 135.00 } ]

GPT-4o Mini

Unrated
7,736ms724 tokens$0.000272
```json [ { "item_number": 1, "description": "Ergonomic Mesh Chair (Model: EM-550)", "quantity": 4, "unit_price": 219.99, "total": 879.96 }, { "item_number": 2, "description": "Standing Desk Converter - Large", "quantity": 2, "unit_price": 134.50, "total": 269.00 }, { "item_number": 3, "description": "USB-C Docking Station", "quantity": 10, "unit_price": 89.00, "total": 890.00 }, { "item_number": 4, "description": "HDMI Cable 2m (3-pack)", "quantity": null, "unit_price": 24.99, "total": 74.97 }, { "item_number": 5, "description": "Monitor Arm, Dual (SKU: MA-D200)", "quantity": 1, "unit_price": 159.00, "total": 159.00 }, { "item_number": 6, "description": "Laptop Security Lock", "quantity": 15, "unit_price": 12.00, "total": 179.00 }, { "item_number": 7, "description": "Whiteboard 120x90cm", "quantity": 3, "unit_price": 45.00, "total": 135.00 } ] ```

Claude Haiku 4.5

Unrated
1,950ms847 tokens$0.002607
```json [ { "item_number": 1, "description": "Ergonomic Mesh Chair (Model: EM-550)", "quantity": 4, "unit_price": 219.99, "total": 879.96 }, { "item_number": 2, "description": "Standing Desk Converter - Large", "quantity": 2, "unit_price": 134.50, "total": 269.00 }, { "item_number": 3, "description": "USB-C Docking Station", "quantity": 10, "unit_price": 89.00, "total": 890.00 }, { "item_number": 4, "description": "HDMI Cable 2m (3-pack)", "quantity": 3, "unit_price": 24.99, "total": 74.97 }, { "item_number": 5, "description": "Monitor Arm, Dual (SKU: MA-D200)", "quantity": 1, "unit_price": 159.00, "total": 159.00 }, { "item_number": 6, "description": "Laptop Security Lock", "quantity": 15, "unit_price": 12.00, "total": 179.00 }, { "item_number": 7, "description": "Whiteboard 120x90cm", "quantity": 3, "unit_price": 45.00, "total": 135.00 } ] ```

GPT-4o

Unrated
6,276ms725 tokens$0.004543
```json [ { "item_number": 1, "description": "Ergonomic Mesh Chair (Model: EM-550)", "quantity": 4, "unit_price": 219.99, "total": 879.96 }, { "item_number": 2, "description": "Standing Desk Converter - Large", "quantity": 2, "unit_price": 134.50, "total": 269.00 }, { "item_number": 3, "description": "USB-C Docking Station", "quantity": 10, "unit_price": 89.00, "total": 890.00 }, { "item_number": 4, "description": "HDMI Cable 2m (3-pack)", "quantity": 3, "unit_price": 24.99, "total": 74.97 }, { "item_number": 5, "description": "Monitor Arm, Dual (SKU: MA-D200)", "quantity": 1, "unit_price": 159.00, "total": 159.00 }, { "item_number": 6, "description": "Laptop Security Lock", "quantity": 15, "unit_price": 12.00, "total": 179.00 }, { "item_number": 7, "description": "Whiteboard 120x90cm", "quantity": 3, "unit_price": 45.00, "total": 135.00 } ] ```

Claude Sonnet 4.6

Unrated
7,933ms1027 tokens$0.010521
```json [ { "item_number": 1, "description": "Ergonomic Mesh Chair (Model: EM-550)", "quantity": 4, "unit_price": 219.99, "total": 879.96 }, { "item_number": 2, "description": "Standing Desk Converter - Large", "quantity": 2, "unit_price": 134.50, "total": 269.00 }, { "item_number": 3, "description": "USB-C Docking Station", "quantity": 10, "unit_price": 89.00, "total": 890.00 }, { "item_number": 4, "description": "HDMI Cable 2m (3-pack)", "quantity": 3, "unit_price": 24.99, "total": 74.97 }, { "item_number": 5, "description": "Monitor Arm, Dual (SKU: MA-D200)", "quantity": 1, "unit_price": 159.00, "total": 159.00 }, { "item_number": 6, "description": "Laptop Security Lock", "quantity": 15, "unit_price": 12.00, "total": 179.00 }, { "item_number": 7, "description": "Whiteboard 120x90cm", "quantity": 3, "unit_price": 45.00, "total": 135.00 } ] ``` **Extraction Notes:** | # | Decision Made | |---|---------------| | **Item 4** | Quantity `—` was not explicit. Inferred as **3** from `$74.97 ÷ $24.99/pack = 3.0` exactly. | | **Item 6** | Total is recorded as **$179.00** as written, even though the mathematically correct value would be `15 × $12.00 = $180.00`. The discrepancy is preserved per the invoice note — no correction applied. | | **Item 5** | `qty:1` formatting normalized to integer `1`. | | **Unit prices** | Stripped of formatting variants (`ea.`, `each`, `/pack`) and stored as plain decimals. |

Cost & Performance Comparison

ModelLatencyTokensCostVerdict
Claude Opus 4.66,750ms961
GPT-4.13,796ms725
GPT-4.1 Mini7,814ms725
GPT-4.1 Nano2,783ms721
o313,285ms1,634
o3 Mini10,927ms1,757
o4 Mini9,697ms1,442
GPT-4o Mini7,736ms724$0.000272
Claude Haiku 4.51,950ms847$0.002607
GPT-4o6,276ms725$0.004543
Claude Sonnet 4.67,933ms1,027$0.010521
Extract Invoice Line Items — Model Lab — AISpendGuard