Download prompts_bundle.json from RishyanthReddy/artificialy-invoice-classification-eval: direct link, hf CLI and curl.
- Browser
- Download file 6.93 kB
-
https://huggingface.co/datasets/RishyanthReddy/artificialy-invoice-classification-eval/resolve/main/prompts_bundle.json
- Command line
-
hf download hf://datasets/RishyanthReddy/artificialy-invoice-classification-eval/prompts_bundle.json
-
curl -L -o prompts_bundle.json https://huggingface.co/datasets/RishyanthReddy/artificialy-invoice-classification-eval/resolve/main/prompts_bundle.json
6.93 kB
| { | |
| "hack_s1": "Extract the fields of this Swiss or European invoice as one valid JSON object matching the exact schema below and nothing else.\nRules:\n1. Copy printed strings (number, issuer.name, issuer.address fields, issuer.uid, payment.iban, payment.reference) VERBATIM from the document \u2014 NEVER autocorrect typos, doubled letters, missing letters, or transpositions (e.g. keep \"Auttomatisme\", \"GmbHH\", \"Strassse\"). Always output straight ASCII apostrophes (') and ignore standalone 1-3 letter decorative logo initials preceding the letterhead when absent from footer/email/QR. Copy issuer.address.city verbatim from the postal zip+city line, never replacing it with a translated country name on the following line.\n2. Output null for any field that is absent, blank, blurred out, or scribbled over. Treat Beleg-Nr., Rechnungs-Nr., Faktura-Nr., R\u00e9f. facture, Document no., Fattura n., or Facture n\u00b0 as the invoice number when printed. NEVER substitute delivery notes (LS-/BL-/DN-/Lieferschein/DDT), customer numbers (Ihre Kundennummer/Client ID/Code client), PO refs (Your reference/62617/13), or item/SKU codes (e.g. STE-343) for number or payment.reference (valid payment references are strictly RF... or 27-digit QRR). Never recompute a missing total from subtotal+VAT or copy subtotal when no grand-total line (Total/Amount due/Totale documento/Gesamtbetrag) is printed, and never invent an IBAN from a BIC or QRR.\n3. issuer is the vendor/supplier billing Elsinore Research AG (never output Elsinore Research AG as issuer, Elsinore's buyer UID CHE-030.006.295 as issuer.uid, or Elsinore's buyer address Austrasse 39, 4052 Basel as issuer.address).\n4. Treat \"Pay by\" / \"F\u00e4lligkeit\" / \"Pagabile entro\" / \"Date d'\u00e9ch\u00e9ance\" / \"DATA DI SCADENZA\" as due_on. Strip trailing tax labels (MWST/TVA/IVA/VAT) from issuer.uid; only output Swiss CHE-XXX.XXX.XXX UIDs for issuer.uid (null if absent or foreign-only VAT). Dates must be YYYY-MM-DD, currency CHF or EUR, country a 2-letter ISO code. Note \" | \" marks column separations, [SWISS_QR_BILL_DECODED] gives exact barcode fields for unredacted QR slips, and [VLM_HEADER_FOOTER_OCR] provides zoomed header/footer verification (use it when PP-OCRv6 dropped a trailing word, postcode half, or blurred digit, while preserving genuine 1-char optical spelling typos printed in page text / QR).\nSchema: {\"number\": str|null, \"issued_on\": \"YYYY-MM-DD\"|null, \"due_on\": \"YYYY-MM-DD\"|null, \"currency\": \"CHF\"|\"EUR\"|null, \"issuer\": {\"name\": str|null, \"address\": {\"street\": str|null, \"house_number\": str|null, \"zip\": str|null, \"city\": str|null, \"country\": str|null}, \"uid\": str|null}, \"subtotal\": float|null, \"total\": float|null, \"payment\": {\"iban\": str|null, \"reference\": str|null}}", | |
| "hack_s2": "You read Swiss and European invoice tax summaries and extract the printed VAT (MWST / TVA / IVA / VAT) breakdown verbatim.\nRules:\n1. Read ONLY the VAT summary section near the totals \u2014 NEVER recompute VAT from subtotal * rate, and NEVER infer missing numbers.\n2. Output one row per distinct VAT rate in the tax summary. If OCR repeated the same tax amount on adjacent lines (e.g. 128.19 and 128,19 for the same rate/base), emit it only once.\n3. Preserve European decimal commas as floats (e.g. 8,1% -> 8.1, 1'234.50 -> 1234.5). Notice column headers often say \"Rate | Base | VAT\" or \"MWST % | Netto | Betrag\".\n4. If explicit 0% / 0.00 VAT is printed, include vat_amount: 0.0. If no VAT summary appears anywhere in the text, return {\"vat_lines\": [], \"vat_total\": null}.\nOutput one valid JSON object and nothing else matching:\n{\"vat_lines\": [{\"rate_pct\": float|null, \"base\": float|null, \"vat_amount\": float}], \"vat_total\": float|null}", | |
| "ib_sys": "You are an accurate enterprise invoice parser and arithmetic auditor. Follow the exact JSON output schema requested and return only valid JSON.", | |
| "ib_cond_b": "You are an invoice validation assistant. Your task is to read the invoice below, extract all financial fields, verify the arithmetic, and report your findings as structured JSON.\n\nINSTRUCTIONS:\n\n1. Extract the following fields from the invoice:\n - line_items: array of {description, quantity, unit_price, amount} for each line\n - subtotal: the sum of all line item amounts\n - vat_rate: the VAT/tax rate as a decimal (e.g., 0.20 for 20%). If not explicitly stated, infer from the numbers or state null.\n - vat_amount: the VAT/tax amount\n - discount_description: description of any discount, or null if none\n - discount_amount: the discount amount, or 0 if none\n - total: the final amount due\n\n2. All monetary values must be plain numbers with exactly two decimal places (e.g., 8673.87). Do not include currency symbols, thousands separators, or text.\n\n3. Pay close attention to number formatting. In some European invoices, a dot is a thousands separator and a comma is the decimal separator (e.g., \"1.234,56\" means one thousand two hundred thirty-four euros and fifty-six cents, NOT 1.234 euros).\n\n4. Pay close attention to VAT phrasing:\n - \"All prices include VAT\" means the displayed prices are GROSS (VAT is already inside them)\n - \"Plus VAT\" or \"VAT applied to subtotal\" means prices are NET (VAT is added on top)\n - If the phrasing is ambiguous, state your assumption in the \"assumptions\" field\n\n5. Pay close attention to discounts:\n - If the invoice mentions \"2/10 net 30\" or similar trade terms, this means a conditional discount available only if paid early. Do NOT apply this discount to the total \u2014 it is conditional and the total should reflect the full amount due.\n - If the invoice states a discount has been \"applied\" or \"deducted\", include it in your calculation.\n - If NO discount is mentioned, discount_amount must be 0. Do not invent a discount.\n\n6. Check whether the invoice is internally consistent:\n - Do the line items sum to the stated subtotal?\n - Is the VAT correctly calculated on the subtotal?\n - Is the discount correctly calculated?\n - Does subtotal + VAT - discount = stated total?\n - Report any inconsistencies found.\n\n7. State any assumptions you made in the \"assumptions\" array. If you are uncertain about anything (e.g., whether VAT is included or excluded), say so.\n\nRespond with ONLY a JSON object in this exact format, no other text:\n\n{\n \"line_items\": [\n {\"description\": \"...\", \"quantity\": 1, \"unit_price\": 4800.00, \"amount\": 4800.00},\n ...\n ],\n \"subtotal\": 7542.50,\n \"vat_rate\": 0.20,\n \"vat_amount\": 1508.50,\n \"discount_description\": \"5% early payment discount\",\n \"discount_amount\": 377.13,\n \"total\": 8673.87,\n \"is_consistent\": true,\n \"inconsistencies\": [],\n \"assumptions\": [],\n \"is_credit_note\": false\n}\n\n---\n\nINVOICE TO VALIDATE:\n\n{invoice_text}\n" | |
| } |