Data extraction pipeline: extract → validate → format
STEP 1 — EXTRACT
From the raw text below, extract all invoice line items.
Return ONLY JSON: {"items": [{"description": "string", "quantity": number, "unit_price": number}]}
If a field is missing, use null. Do not invent values.
Raw text:
"""[paste invoice text here]"""
---
STEP 2 — VALIDATE (send Step 1 output here)
Review the JSON below for correctness.
- Flag any items where quantity or unit_price is null.
- Flag any descriptions that look like headers or totals, not line items.
- Return: {"valid_items": [...], "flagged": [...], "issues": ["string"]}
JSON from Step 1:
"""[paste Step 1 output here]"""
---
STEP 3 — FORMAT (send Step 2 valid_items here)
Convert the validated items below into a Markdown table with columns: Description | Quantity | Unit Price | Line Total.
Calculate Line Total = quantity × unit_price. If either is null, show "—".
Sort by Line Total descending.
valid_items:
"""[paste valid_items from Step 2 here]"""Opens on home with the prompt prefilled.
Open in Promptea