PromptBase
Upgrade
Close icon
General
Home
Marketplace
Create
Hire
Login
Chat
Sell
Explore

Prompt Details

Model
Chat - (gpt-5.6)
Token size
2,641
Example input
[ - Invoice - Receipt - Form - Purchase Order - Bill - Statement - Unknown If unknown, classify it automatically.]: Invoice [ Preserve: - Line breaks - Symbols - Spacing - OCR errors - Repeated text - Page separators]: TAX INVOlCE TECHNOVA ELECTRONlCS PVT. LTD. Shop No. 18, City Centre, Durgapur, West Bengal 713216 GSTIN: 19AABCT1234K1Z8 Ph: +91 98765 43210 lnvoice No: TN-INV-2026-00871 lnvoice Date: 02/09/2026 Due Date: 17/09/2026 PO No: PO-45821 BILL TO: ROYAL RETAIL MART 23 Benachity Road, Durgapur, WB 713213 GSTIN: 19AAECR5678P1Z4 ------------------------------------------------ Description Qty Rate Amount ------------------------------------------------ Wireless Mouse 2 749.50 1,499.00 USB Keybord 1 1,199.00 1,199.00 HDMl Cable 3 399.00 1,197.00 Laptop Stand 1 1,299.00 1,299.00 Sub Tota1 5,194.00 Discount 194.00 Taxab1e Amount 5,000.00 CGST @ 9% 450.00 SGST @ 9% 450.00 Grand Tota1 5,900.00 Paid 2,000.00 Ba1ance Due 3,900.00 Payment Method: UPI Currency: INR Thank you for your business. [ - Invoice number - Vendor - Customer - Date - Tax - Total - Currency - Line items - Address - Payment method]: Invoice number, Vendor, Customer, Invoice date, Due date, PO number, Vendor GSTIN, Customer GSTIN, Vendor phone, Line items, Subtotal, Discount, Taxable amount, CGST, SGST, Total, Paid amount, Balance due, Payment method, Currency [ - Subtotal + tax = total - Quantity Γ— unit price = line total - Required fields - Allowed currencies - Date constraints]: Subtotal = sum of line totals, Taxable amount = subtotal - discount, CGST + SGST = total tax, Taxable amount + total tax = total, Paid + balance due = total, Quantity Γ— unit price = line total, Invoice date ≀ due date, required fields must be present [ - Country - Business type - Vendor format - Expected schema - Language - Known abbreviations - Document-specific rules ]: Country: India, Business type: electronics retailer/supplier, Language: English, GST invoice, currency should only be normalized to INR because the document explicitly states Currency: INR
Example output
PHASE 1 β€” DOCUMENT TYPE CLASSIFICATION Document Type Invoice Confidence 🟒 High Supporting Evidence TAX INVOlCE lnvoice No lnvoice Date Due Date BILL TO Itemized product table Subtotal Discount CGST and SGST Grand Total Payment Method The document has multiple independent indicators of an invoice. Result Classification: Valid --- PHASE 2 β€” OCR TEXT CLEANING The OCR contains several obvious character substitutions. Raw OCR Cleaned Value Reason INVOlCE INVOICE l β†’ I ELECTRONlCS ELECTRONICS l β†’ I lnvoice No Invoice No OCR capitalization/substitution lnvoice Date Invoice Date OCR substitution Keybord Keyboard Obvious word corruption HDMl HDMI OCR character substitution Sub Tota1 Subtotal 1 β†’ l Taxab1e Amount Taxable Amount 1 β†’ l Grand Tota1 Grand Total 1 β†’ l Ba1ance Due Balance Due 1 β†’ l Important The system should not blindly correct every suspicious character. For example: TN-INV-2026-00871 is preserved because the value is an invoice identifier and the digits are structurally valid. Cleaning Result 🟒 Cleaned successfully --- PHASE 3 β€” DOCUMENT STRUCTURE RECONSTRUCTION The OCR is already mostly ordered, but the logical business structure is reconstructed as follows: DOCUMENT β”‚ β”œβ”€β”€ Header β”‚ β”œβ”€β”€ Vendor Name β”‚ β”œβ”€β”€ Vendor Address β”‚ β”œβ”€β”€ Vendor GSTIN β”‚ └── Vendor Phone β”‚ β”œβ”€β”€ Document Metadata β”‚ β”œβ”€β”€ Invoice Number β”‚ β”œβ”€β”€ Invoice Date β”‚ β”œβ”€β”€ Due Date β”‚ └── PO Number β”‚ β”œβ”€β”€ Customer β”‚ β”œβ”€β”€ Customer Name β”‚ β”œβ”€β”€ Customer Address β”‚ └── Customer GSTIN β”‚ β”œβ”€β”€ Line Items β”‚ β”œβ”€β”€ Wireless Mouse β”‚ β”œβ”€β”€ USB Keyboard β”‚ β”œβ”€β”€ HDMI Cable β”‚ └── Laptop Stand β”‚ β”œβ”€β”€ Financial Section β”‚ β”œβ”€β”€ Subtotal β”‚ β”œβ”€β”€ Discount β”‚ β”œβ”€β”€ Taxable Amount β”‚ β”œβ”€β”€ CGST β”‚ β”œβ”€β”€ SGST β”‚ β”œβ”€β”€ Grand Total β”‚ β”œβ”€β”€ Paid β”‚ └── Balance Due β”‚ β”œβ”€β”€ Payment β”‚ β”œβ”€β”€ Payment Method β”‚ └── Currency β”‚ └── Footer └── Thank-you message Result 🟒 Structure reconstructed successfully --- PHASE 4 β€” FIELD DISCOVERY Field Raw Value Normalized Value Confidence Status Invoice Number TN-INV-2026-00871 TN-INV-2026-00871 🟒 High βœ… Valid Vendor TECHNOVA ELECTRONlCS PVT. LTD. TECHNOVA ELECTRONICS PVT. LTD. 🟒 High βœ… Valid Customer ROYAL RETAIL MART ROYAL RETAIL MART 🟒 High βœ… Valid Invoice Date 02/09/2026 2026-09-02 🟒 High βœ… Valid Due Date 17/09/2026 2026-09-17 🟒 High βœ… Valid PO Number PO-45821 PO-45821 🟒 High βœ… Valid Vendor GSTIN 19AABCT1234K1Z8 19AABCT1234K1Z8 🟒 High βœ… Valid Customer GSTIN 19AAECR5678P1Z4 19AAECR5678P1Z4 🟒 High βœ… Valid Vendor Phone +91 98765 43210 +919876543210 🟒 High βœ… Valid Payment Method UPI UPI 🟒 High βœ… Valid Currency INR INR 🟒 High βœ… Valid --- PHASE 5 β€” HEADER & ENTITY EXTRACTION Vendor Raw: TECHNOVA ELECTRONlCS PVT. LTD. Normalized: TECHNOVA ELECTRONICS PVT. LTD. Confidence: 🟒 High Evidence: Appears in document header before GSTIN and phone number. Vendor Address Shop No. 18, City Centre, Durgapur, West Bengal 713216 Confidence: 🟒 High Vendor GSTIN 19AABCT1234K1Z8 Confidence: 🟒 High Vendor Phone Raw: +91 98765 43210 Normalized: +919876543210 Confidence: 🟒 High Customer ROYAL RETAIL MART Confidence: 🟒 High Evidence: Appears immediately after BILL TO. Customer GSTIN 19AAECR5678P1Z4 Confidence: 🟒 High Invoice Number TN-INV-2026-00871 Confidence: 🟒 High PO Number PO-45821 Confidence: 🟒 High --- PHASE 6 β€” NUMBER & AMOUNT EXTRACTION Extracted Financial Values Field Raw Value Normalized Subtotal 5,194.00 5194.00 Discount 194.00 194.00 Taxable Amount 5,000.00 5000.00 CGST 450.00 450.00 SGST 450.00 450.00 Grand Total 5,900.00 5900.00 Paid 2,000.00 2000.00 Balance Due 3,900.00 3900.00 Currency Explicitly stated: Currency: INR Therefore: Normalized currency: INR No currency assumption was required. --- PHASE 7 β€” LINE-ITEM & TABLE RECONSTRUCTION Four line items are detected. Item 1 Description: Wireless Mouse Quantity: 2 Unit Price: 749.50 Line Total: 1,499.00 Validation: 2 Γ— 749.50 = 1,499.00 βœ… Valid --- Item 2 Raw Description: USB Keybord Normalized Description: USB Keyboard Quantity: 1 Unit Price: 1,199.00 Line Total: 1,199.00 Validation: 1 Γ— 1,199.00 = 1,199.00 βœ… Valid OCR correction: Keybord β†’ Keyboard Confidence: 🟒 High --- Item 3 Raw Description: HDMl Cable Normalized Description: HDMI Cable Quantity: 3 Unit Price: 399.00 Line Total: 1,197.00 Validation: 3 Γ— 399.00 = 1,197.00 βœ… Valid --- Item 4 Description: Laptop Stand Quantity: 1 Unit Price: 1,299.00 Line Total: 1,299.00 Validation: 1 Γ— 1,299.00 = 1,299.00 βœ… Valid --- PHASE 8 β€” VALUE NORMALIZATION Dates Raw: 02/09/2026 Normalized: 2026-09-02 Raw: 17/09/2026 Normalized: 2026-09-17 Currency INR β†’ INR Amounts 5,194.00 β†’ 5194.00 194.00 β†’ 194.00 5,000.00 β†’ 5000.00 5,900.00 β†’ 5900.00 Phone +91 98765 43210 β†’ +919876543210 Tax CGST @ 9% β†’ 9.0% SGST @ 9% β†’ 9.0% Result 🟒 Normalization successful --- PHASE 9 β€” ENTITY & SEMANTIC DISAMBIGUATION Several OCR substitutions require interpretation. Case 1: INVOlCE Possible interpretation: INVOlCE INVOICE Context strongly supports: INVOICE 🟒 High confidence --- Case 2: Keybord Context: USB Keybord This is clearly intended to represent: USB Keyboard 🟒 High confidence --- Case 3: HDMl Context: HDMl Cable Common electronics terminology strongly supports: HDMI Cable 🟒 High confidence --- Case 4: Tota1 Context: Grand Tota1 The final 1 is interpreted as lowercase l. Normalized: Grand Total 🟒 High confidence --- Case 5: Financial numbers No ambiguous numeric substitutions were found in the financial fields. The numbers also pass independent arithmetic checks. Therefore, no financial value needs human interpretation. --- PHASE 10 β€” DATA VALIDATION Check 1 β€” Quantity Γ— Unit Price Wireless Mouse: 2 Γ— 749.50 = 1,499.00 βœ… Valid USB Keyboard: 1 Γ— 1,199.00 = 1,199.00 βœ… Valid HDMI Cable: 3 Γ— 399.00 = 1,197.00 βœ… Valid Laptop Stand: 1 Γ— 1,299.00 = 1,299.00 βœ… Valid --- Check 2 β€” Subtotal 1,499 + 1,199 + 1,197 + 1,299 = 5,194 OCR subtotal: 5,194 βœ… Valid --- Check 3 β€” Taxable Amount Subtotal - Discount 5,194 - 194 = 5,000 OCR taxable amount: 5,000 βœ… Valid --- Check 4 β€” CGST + SGST 450 + 450 = 900 Total tax: 900 βœ… Valid --- Check 5 β€” Grand Total Taxable Amount + Total Tax 5,000 + 900 = 5,900 OCR Grand Total: 5,900 βœ… Valid --- Check 6 β€” Paid + Balance 2,000 + 3,900 = 5,900 Invoice Total: 5,900 βœ… Valid --- Check 7 β€” Date Consistency Invoice Date: 2026-09-02 Due Date: 2026-09-17 Invoice Date ≀ Due Date βœ… Valid --- PHASE 11 β€” CROSS-FIELD CONSISTENCY Relationship 1 Subtotal - Discount = Taxable Amount 5,194 - 194 = 5,000 βœ… Passed Relationship 2 CGST + SGST = Total Tax 450 + 450 = 900 βœ… Passed Relationship 3 Taxable Amount + Tax = Total 5,000 + 900 = 5,900 βœ… Passed Relationship 4 Paid + Balance = Total 2,000 + 3,900 = 5,900 βœ… Passed Relationship 5 Quantity Γ— Unit Price = Line Total All four line items pass. βœ… Passed Duplicate Field Check No conflicting duplicate values detected. βœ… Passed --- PHASE 12 β€” CONFIDENCE SCORING Overall Confidence 🟒 High Category Confidence Document Type 🟒 High Vendor 🟒 High Customer 🟒 High Invoice Number 🟒 High Dates 🟒 High GSTINs 🟒 High PO Number 🟒 High Phone 🟒 High Line Items 🟒 High Financial Values 🟒 High Currency 🟒 High Payment Method 🟒 High Why High? Clear document labels Strong field-to-value proximity Clear invoice structure All arithmetic checks pass Currency explicitly provided OCR errors are recognizable and contextually resolvable No conflicting duplicate values --- PHASE 13 β€” ERROR & ANOMALY DETECTION Detected OCR Anomalies 1. INVOlCE β†’ INVOICE 2. ELECTRONlCS β†’ ELECTRONICS 3. lnvoice β†’ Invoice 4. Keybord β†’ Keyboard 5. HDMl β†’ HDMI 6. Sub Tota1 β†’ Subtotal 7. Taxab1e β†’ Taxable 8. Grand Tota1 β†’ Grand Total 9. Ba1ance β†’ Balance Missing Fields None among the requested fields. Contradictory Values None. Suspicious Totals None. Broken Line Items None. Impossible Values None. --- PHASE 14 β€” EXTRACTION QUALITY AUDIT Requested Field Coverage 20/20 requested fields attempted and extracted. OCR Correction Quality 🟒 High All corrected words have strong contextual evidence. Line-Item Reconstruction 🟒 High All four rows have valid quantity Γ— price calculations. Financial Validation 🟒 Passed All major financial relationships are mathematically consistent. Uncertainty Handling 🟒 Passed No ambiguous field was silently converted into a definitive value without supporting evidence. Invention Check 🟒 Passed No unsupported business information was added. Missing Fields None Low-Confidence Fields None Validation Failures None Extraction Quality Score 99/100 The one-point deduction is due to the presence of multiple OCR corruptions requiring normalization, even though they were successfully resolved. --- PHASE 15 β€” OUTPUT SCHEMA GENERATION The final schema should separate: Document metadata Vendor Customer Line items Financial information Payment information Validation Confidence Anomalies Review requirements This makes the result suitable for: API responses Databases ETL pipelines Accounting systems ERP integration Automated invoice processing Schema Design document β”œβ”€β”€ type β”œβ”€β”€ extraction_status β”œβ”€β”€ confidence └── quality_score vendor β”œβ”€β”€ name β”œβ”€β”€ address β”œβ”€β”€ gstin └── phone customer β”œβ”€β”€ name β”œβ”€β”€ address └── gstin metadata β”œβ”€β”€ invoice_number β”œβ”€β”€ invoice_date β”œβ”€β”€ due_date └── po_number line_items[] β”œβ”€β”€ description β”œβ”€β”€ quantity β”œβ”€β”€ unit_price β”œβ”€β”€ line_total β”œβ”€β”€ confidence └── validation_status financial_summary β”œβ”€β”€ subtotal β”œβ”€β”€ discount β”œβ”€β”€ taxable_amount β”œβ”€β”€ cgst β”œβ”€β”€ sgst β”œβ”€β”€ total_tax β”œβ”€β”€ total β”œβ”€β”€ paid β”œβ”€β”€ balance_due └── currency payment └── method validation β”œβ”€β”€ passed_checks β”œβ”€β”€ failed_checks β”œβ”€β”€ warnings └── uncertain_fields review_required[] anomalies[] --- PHASE 16 β€” FINAL STRUCTURED EXTRACTION πŸ“„ DOCUMENT SUMMARY Document Type: Invoice Extraction Status: Successfully Extracted Overall Confidence: 🟒 High Extraction Quality Score: 99/100 🎯 EXTRACTED FIELDS Field Raw OCR Normalized Status Invoice Number TN-INV-2026-00871 TN-INV-2026-00871 βœ… Valid Vendor TECHNOVA ELECTRONlCS PVT. LTD. TECHNOVA ELECTRONICS PVT. LTD. βœ… Valid Customer ROYAL RETAIL MART ROYAL RETAIL MART βœ… Valid Invoice Date 02/09/2026 2026-09-02 βœ… Valid Due Date 17/09/2026 2026-09-17 βœ… Valid PO Number PO-45821 PO-45821 βœ… Valid Vendor GSTIN 19AABCT1234K1Z8 19AABCT1234K1Z8 βœ… Valid Customer GSTIN 19AAECR5678P1Z4 19AAECR5678P1Z4 βœ… Valid Vendor Phone +91 98765 43210 +919876543210 βœ… Valid Payment Method UPI UPI βœ… Valid Currency INR INR βœ… Valid πŸ“¦ LINE ITEMS Description Qty Unit Price Line Total Confidence Wireless Mouse 2 749.50 1499.00 🟒 High USB Keyboard 1 1199.00 1199.00 🟒 High HDMI Cable 3 399.00 1197.00 🟒 High Laptop Stand 1 1299.00 1299.00 🟒 High πŸ’° FINANCIAL SUMMARY Subtotal: 5194.00 Discount: 194.00 Taxable Amount: 5000.00 CGST: 9% = 450.00 SGST: 9% = 450.00 Total Tax: 900.00 Shipping/Fees: null Total: 5900.00 Paid: 2000.00 Balance: 3900.00 Currency: INR πŸ§ͺ VALIDATION RESULTS Passed Checks βœ… All required fields extracted βœ… All four line-item calculations βœ… Subtotal calculation βœ… Discount calculation βœ… Taxable amount calculation βœ… CGST + SGST calculation βœ… Grand total calculation βœ… Paid + balance calculation βœ… Invoice date and due date consistency βœ… Currency consistency βœ… No conflicting duplicate values Failed Checks None Warnings ⚠️ Multiple OCR character substitutions detected. ⚠️ Product names required contextual OCR correction. Uncertain Fields None ⚠️ REVIEW REQUIRED No human verification required. All requested fields have sufficient evidence and pass cross-field validation. πŸ“¦ FINAL MACHINE-READABLE JSON { "document": { "type": "invoice", "extraction_status": "success", "classification_confidence": "high", "overall_confidence": "high", "quality_score": 99 }, "vendor": { "name": { "raw": "TECHNOVA ELECTRONlCS PVT. LTD.", "normalized": "TECHNOVA ELECTRONICS PVT. LTD.", "confidence": "high", "status": "valid" }, "address": "Shop No. 18, City Centre, Durgapur, West Bengal 713216", "gstin": "19AABCT1234K1Z8", "phone": "+919876543210" }, "customer": { "name": "ROYAL RETAIL MART", "address": "23 Benachity Road, Durgapur, WB 713213", "gstin": "19AAECR5678P1Z4" }, "metadata": { "invoice_number": "TN-INV-2026-00871", "invoice_date": "2026-09-02", "due_date": "2026-09-17", "po_number": "PO-45821" }, "line_items": [ { "description": { "raw": "Wireless Mouse", "normalized": "Wireless Mouse" }, "quantity": 2, "unit_price": 749.50, "line_total": 1499.00, "confidence": "high", "validation_status": "valid" }, { "description": { "raw": "USB Keybord", "normalized": "USB Keyboard" }, "quantity": 1, "unit_price": 1199.00, "line_total": 1199.00, "confidence": "high", "validation_status": "valid", "ocr_correction": "Keybord -> Keyboard" }, { "description": { "raw": "HDMl Cable", "normalized": "HDMI Cable" }, "quantity": 3, "unit_price": 399.00, "line_total": 1197.00, "confidence": "high", "validation_status": "valid", "ocr_correction": "HDMl -> HDMI" }, { "description": { "raw": "Laptop Stand", "normalized": "Laptop Stand" }, "quantity": 1, "unit_price": 1299.00, "line_total": 1299.00, "confidence": "high", "validation_status": "valid" } ], "financial_summary": { "subtotal": 5194.00, "discount": 194.00, "taxable_amount": 5000.00, "cgst": { "rate": 9.0, "amount": 450.00 }, "sgst": { "rate": 9.0, "amount": 450.00 }, "total_tax": 900.00, "shipping_and_fees": null, "total": 5900.00, "paid": 2000.00, "balance_due": 3900.00, "currency": "INR" }, "payment": { "method": "UPI" }, "validation": { "status": "passed", "passed_checks": [ "Required fields present", "Quantity multiplied by unit price equals line total", "Subtotal equals sum of line totals", "Taxable amount equals subtotal minus discount", "CGST plus SGST equals total tax", "Taxable amount plus total tax equals total", "Paid amount plus balance due equals total", "Invoice date is before due date", "Currency is explicitly supported by document evidence" ], "failed_checks": [], "warnings": [ "OCR character substitutions detected", "Product descriptions required contextual correction" ], "uncertain_fields": [] }, "review_required": [], "anomalies": [ "INVOlCE -> INVOICE", "ELECTRONlCS -> ELECTRONICS", "lnvoice -> Invoice", "Keybord -> Keyboard", "HDMl -> HDMI", "Sub Tota1 -> Subtotal", "Taxab1e -> Taxable", "Grand Tota1 -> Grand Total", "Ba1ance -> Balance" ] } 🏁 FINAL TEST SCORECARD Phase Result Phase 1 β€” Classification βœ… Passed Phase 2 β€” OCR Cleaning βœ… Passed Phase 3 β€” Structure Reconstruction βœ… Passed Phase 4 β€” Field Discovery βœ… Passed Phase 5 β€” Entity Extraction βœ… Passed Phase 6 β€” Number & Amount Extraction βœ… Passed Phase 7 β€” Line-Item Reconstruction βœ… Passed Phase 8 β€” Normalization βœ… Passed Phase 9 β€” Disambiguation βœ… Passed Phase 10 β€” Validation βœ… Passed Phase 11 β€” Cross-Field Consistency βœ… Passed Phase 12 β€” Confidence Scoring βœ… Passed Phase 13 β€” Anomaly Detection βœ… Passed Phase 14 β€” Quality Audit βœ… Passed Phase 15 β€” Schema Generation βœ… Passed Phase 16 β€” Final Output βœ… Passed Overall Test Result: PASSED βœ… Key demonstration: The system successfully handled OCR corruption + semantic correction + structured extraction + line-item reconstruction + financial arithmetic validation + confidence scoring + anomaly reporting + machine-readable JSON, without inventing missing information.
πŸ€– GPT

Ocr Document Data Extractor Pro

Add to Cart
Instant accessInstant access
Usage rightsCommercial use
Money-back guaranteeMoney‑back
By purchasing this prompt, you agree to our terms of service
GPT-5.6
Tested icon
Guide icon
4 examples icon
Free credits icon
Raw OCR output is messy, inconsistent, and difficult to use directly in business workflows. This advanced AI extractor converts raw OCR text from invoices, receipts, forms, and business documents into clean, validated, structured JSON or table-ready data. πŸ” Clean noisy OCR text 🧾 Detect document type automatically 🎯 Extract relevant fields 🧹 Normalize dates, amounts & names πŸ”’ Reconstruct line items & tables ⚠️ Flag missing or uncertain values πŸ§ͺ Validate extracted data πŸ“¦ Generate JSON
...more
Added 6 days ago
Report
Browse Marketplace