<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sagnik Chakraborty on Medium]]></title>
        <description><![CDATA[Stories by Sagnik Chakraborty on Medium]]></description>
        <link>https://medium.com/@sagnik.chakraborty?source=rss-0d50e8a52cba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*RrfscXPBfdh8M9ld</url>
            <title>Stories by Sagnik Chakraborty on Medium</title>
            <link>https://medium.com/@sagnik.chakraborty?source=rss-0d50e8a52cba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 18:54:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sagnik.chakraborty/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Event-Based Triggers in Document Processing: Build Workflows That Move Without You]]></title>
            <link>https://medium.com/docsumo/event-based-triggers-in-document-processing-build-workflows-that-move-without-you-0ac20174bfa9?source=rss-0d50e8a52cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ac20174bfa9</guid>
            <category><![CDATA[ap-automation]]></category>
            <category><![CDATA[workflow-automation]]></category>
            <category><![CDATA[document-automation]]></category>
            <category><![CDATA[ai-document-processing]]></category>
            <category><![CDATA[event-driven-architecture]]></category>
            <dc:creator><![CDATA[Sagnik Chakraborty]]></dc:creator>
            <pubDate>Fri, 05 Jun 2026 15:59:09 GMT</pubDate>
            <atom:updated>2026-06-05T15:59:09.007Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Part of the series: Building document AI that holds in production</em></h4><p>I’ve noticed a pattern that shows up in almost every document automation review I’ve done. A team invests in an IDP platform, gets extraction accuracy above 95%, builds a solid validation layer, and then loses most of the time they saved to a problem nobody planned for: documents sitting idle between stages waiting for a human to notice them and move them along.</p><p>The extraction finished two hours ago. Nobody opened the queue. The invoice has a 2% early payment discount that expires at 5 pm. It’s 4:47 pm.</p><p>This is not a technology failure. It is an architectural failure. The automation stopped where the document was processed, but the workflow needed it to continue. Event-based triggers are the mechanism that closes that gap.</p><h3>TL;DR</h3><p>An event-based trigger fires automatically when a document reaches a defined milestone: file uploaded, extraction complete, confidence threshold met, validation rule violated, or integration ready. Each trigger hands the document to the next stage without waiting for a human to initiate the handoff. <a href="https://www.mckinsey.com/capabilities/operations/our-insights/the-future-of-work-in-operations">According to McKinsey</a>, 70% of organizations are piloting workflow automation, and 90% plan to scale enterprise-wide within two years. Companies running event-driven document processing report 60 to 70% reductions in processing time and up to 340% ROI from their IDP investments. The speed comes from eliminating idle time between stages. The ROI comes from what that speed enables: early payment discounts captured, SLAs met, and exception queues cleared before they become backlogs.</p><h3>What an event-based trigger actually is</h3><p>An event-based trigger is a conditional instruction: when X happens, do Y automatically. X is an event in the document lifecycle. Y is the next action in your workflow.</p><p>The simple version: a document is uploaded to a monitored folder. That upload event fires a trigger. The trigger queues the document for processing. No one clicked anything. No one opened an inbox. The moment the file existed, the system responded.</p><p>The more interesting version: extraction completes with a confidence score above 95% on all required fields. That completion event fires a trigger. The trigger sends the extracted data to an approval queue with a pre-formatted summary and routes it to the correct approver based on the vendor and amount. Simultaneously, another trigger pings the accounting system to flag that an invoice is pending approval. The approver sees it in their queue within seconds of extraction finishing, with all the context they need to decide.</p><p>Without triggers, the approval queue is something someone checks when they remember to check it. With triggers, the queue is current by definition.</p><p><a href="https://www.docsumo.com/solutions/intelligent-document-processing-platform?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=event-based-triggers">Intelligent document processing platforms</a> that include event trigger management effectively turn documents from static files into active inputs to your business. A document that arrives, gets processed, and waits is a workflow with a human bottleneck built into it. A document that arrives, gets processed, and automatically fires the next five steps is a workflow that scales.</p><h3>The five trigger types and what each one does</h3><h3>Ingestion triggers</h3><p>The first trigger is the simplest: something arrived. A file lands in a watched folder, an email with an attachment hits a monitored inbox, an API call sends document data to a processing endpoint, or a webhook from an upstream system signals that a document is ready.</p><p>The ingestion trigger fires and immediately queues the document for extraction. No scheduling window. No batch job running at midnight. The moment the document exists in the system, processing begins.</p><p>For teams handling time-sensitive documents (insurance claims, loan applications, high-value purchase orders) this matters more than it sounds. An application that sits unprocessed for four hours because the batch job hasn’t run isn’t a technology problem; it’s a design problem. The ingestion trigger eliminates the concept of “waiting for the next batch.”</p><h3>Extraction triggers</h3><p>Once <a href="https://www.docsumo.com/blog/contextual-data-extraction?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=event-based-triggers">document data extraction</a> completes, a second trigger fires. But it doesn’t fire on completion alone. It fires when extraction meets your quality threshold.</p><p>A well-configured extraction trigger looks like this: fire when all required fields are extracted with at least 95% confidence. If the system reaches 95% on 11 of 12 required fields but not the 12th, the trigger doesn’t fire for approval. Instead, it routes to a targeted exception queue specifically for low-confidence field review. A human corrects one field, and the trigger re-evaluates.</p><p>This design keeps garbage from flowing downstream. The trigger is the quality gate, not just a relay.</p><h3>Validation triggers</h3><p>After extraction, extracted values pass through <a href="https://www.docsumo.com/blog/what-is-exception-handling?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=event-based-triggers">validation rules</a>: field-level checks, cross-field logic, and cross-document matching. When validation passes, a trigger fires and routes the document forward. When validation fails, a different trigger fires and routes the document to the appropriate exception queue.</p><p>What makes validation triggers operationally useful is specificity. A price variance exception routes to the buyer who manages that vendor relationship. A quantity mismatch routes to the receiving manager who can check the goods receipt. A duplicate invoice detection routes to finance leadership. Each failure type has its own trigger, its own destination, its own escalation logic.</p><p>Generic exception queues, where everything goes to one inbox and someone figures out who should handle it, are where processing time disappears. Specific validation triggers eliminate that triage step entirely.</p><h3>Exception and threshold triggers</h3><p>Some triggers don’t measure completion. They measure violation. An invoice amount exceeds the requestor’s approval authority: trigger fires and escalates to their manager. A vendor name matching a blocked supplier list: trigger fires and routes to compliance. A confidence score below minimum on a critical field: trigger fires and routes to manual review before anything downstream is touched.</p><p>These exception triggers are the guardrails that prevent bad data from reaching your ERP, your CRM, or your compliance records. They are also the difference between a system that fails loudly (exception caught, document flagged) and one that fails silently (wrong data passes through, discovered six weeks later in reconciliation).</p><p><a href="https://www.docsumo.com/blog/auto-routing?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=event-based-triggers">Auto-routing</a> logic built on top of exception triggers is what separates document processing systems that need constant supervision from ones that can run overnight without producing a cleanup problem in the morning.</p><h3>Integration triggers</h3><p>The final trigger type moves data out of your document system and into the systems that act on it. When a document reaches a terminal state (approved, validated, exception-cleared), an integration trigger fires and pushes extracted data to your downstream system via webhook, API call, or direct database write.</p><p>For <a href="https://www.docsumo.com/solutions/use-cases/accounts-payable?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=event-based-triggers">accounts payable workflows</a>, this means the ERP sees the approved invoice data immediately. No manual export. No CSV upload. No accountant logging into two systems to move one record. The trigger handles the transfer the moment approval is complete.</p><p>For insurance claims, it means the claims management platform sees the extracted data before the adjuster opens their queue. For contract management, it means the repository is updated as soon as the document is classified and extracted. The integration trigger is what makes the extraction work count beyond the document processing system itself.</p><h3>The early payment discount problem, measured</h3><p>The blog’s opening scenario is worth making concrete. A typical mid-market company processes several thousand invoices per month. Vendors offering 2/10 net 30 terms (2% discount if paid within 10 days) are common. A $20,000 invoice carries a $400 discount. A $50,000 invoice carries a $1,000 discount.</p><p>When documents sit idle between processing stages because no trigger fired to move them forward, discount windows close. The cost is invisible in any individual invoice but compounds across a portfolio. A company capturing 30% fewer early payment discounts than their terms allow, across several thousand invoices per month, is losing real cash to a workflow design problem.</p><p>Event triggers eliminate idle time between stages. Extraction completes, trigger fires, document moves to approval. Approval completes, trigger fires, document moves to ERP. ERP receives data, payment can be initiated. The total elapsed time shrinks from days to hours. Discount windows stay open.</p><h3>What makes trigger design fail in production</h3><p>The most common failure mode isn’t a trigger that misfires. It’s a trigger that fires too often.</p><p>A team builds a monitoring system and creates a notification trigger for every event: document ingested, extraction started, extraction complete, field validated, validation complete, approval initiated, approval complete, integration sent, integration confirmed. Someone receives 50 emails per day about the status of documents they don’t need to think about. Within a week they stop reading the emails. Within a month the system sends an exception alert that gets ignored because it looks like all the other alerts.</p><p>Trigger design principles that actually work in production:</p><p>Trigger on meaningful state changes, not on process steps. “Validation failed on a $50,000 invoice from a new vendor” is a meaningful state change. “Extraction started on invoice #4471” is a process step. One belongs in an alert. The other belongs in a log.</p><p>Separate human-facing actions from system-to-system actions. Integration triggers don’t need to notify anyone. They need to succeed and be logged. <a href="https://www.docsumo.com/blog/audit-trails?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=event-based-triggers">Audit trails</a> capture the record. Humans read the logs when something goes wrong, not when everything goes right.</p><p>Build tiered escalation into approval triggers. Automatic approval for invoices under $5,000. Manager approval for $5,000 to $50,000. Finance director for anything above. Three trigger tiers means proportional human attention, not uniform friction on every invoice regardless of risk.</p><p>Test triggers before production with real documents. A trigger configured to push data to the wrong ERP endpoint doesn’t fail visibly. It succeeds in sending data to the wrong place, and the document appears to have processed correctly. Test with realistic data, verify destinations, confirm trigger logic against edge cases before any of this touches production documents.</p><h3>Where event triggers connect to agentic workflows</h3><p>Event triggers are deterministic: condition met, action fires. That is their strength for routine processing, and their limit for complex decisions.</p><p><a href="https://www.docsumo.com/blog/what-is-agentic-document-workflows?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=event-based-triggers">Agentic document workflows</a> layer decision-making on top of triggers. Instead of a trigger that routes all invoices above $50,000 to the finance director, an agentic layer can evaluate: is this vendor’s pricing consistent with their last 12 months? Is this invoice for a project that’s currently on hold? Does the line-item breakdown match the statement of work on file?</p><p>The trigger fires on the event. The agent evaluates the context. The routing decision reflects both.</p><p>For most document workflows, trigger-only automation handles 85 to 95% of documents without agent involvement. The agentic layer exists for the cases where context matters more than rules. This is also where <a href="https://www.docsumo.com/blog/human-in-the-loop-review?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=event-based-triggers">human-in-the-loop review</a> remains the right answer: when neither a rule nor an agent can make a reliable decision, the trigger routes to a human with full context rather than guessing.</p><h3>What to read next</h3><p>The full breakdown of event-based triggers, including the Docsumo Workflow Builder, how integration triggers connect to ERPs and CRMs, and the agentic layer that adds decision-making on top of rule-based routing, is in Docsumo’s guide: <a href="https://www.docsumo.com/blog/event-based-triggers?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=event-based-triggers">Event-Based Triggers in Document Processing</a>.</p><p>If you want to see how a production IDP platform handles trigger configuration, exception routing, and downstream system integration without building the infrastructure from scratch, <a href="https://www.docsumo.com/?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=event-based-triggers">explore Docsumo</a>.</p><p>What’s the trigger type that’s made the biggest operational difference in a workflow you’ve built or managed? Curious whether it was the exception routing or the integration layer that moved the needle most.</p><p><em>Earlier in this series: </em><a href="https://www.docsumo.com/blog/2-way-vs-3-way-matching?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=event-based-triggers"><em>2-Way vs 3-Way Matching</em></a><em> · </em><a href="https://www.docsumo.com/blog/llms-in-document-processing?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=event-based-triggers"><em>LLMs in Document Processing</em></a><em> · </em><a href="https://www.docsumo.com/blog/building-an-idp-stack?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=event-based-triggers"><em>Building an IDP Stack</em></a></p><p>Document Automation · Workflow Automation · Intelligent Document Processing · Event-Driven Architecture · AP Automation</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ac20174bfa9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/docsumo/event-based-triggers-in-document-processing-build-workflows-that-move-without-you-0ac20174bfa9">Event-Based Triggers in Document Processing: Build Workflows That Move Without You</a> was originally published in <a href="https://medium.com/docsumo">Docsumo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2-Way vs 3-Way Matching: The AP Decision That Determines How Much Fraud Slips Through]]></title>
            <link>https://medium.com/docsumo/2-way-vs-3-way-matching-the-ap-decision-that-determines-how-much-fraud-slips-through-2e22b01b38b9?source=rss-0d50e8a52cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e22b01b38b9</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[accounts-payable]]></category>
            <category><![CDATA[2-way-matching]]></category>
            <category><![CDATA[accounts-payable-software]]></category>
            <dc:creator><![CDATA[Sagnik Chakraborty]]></dc:creator>
            <pubDate>Thu, 04 Jun 2026 14:31:00 GMT</pubDate>
            <atom:updated>2026-06-04T14:31:00.837Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Part of the series: Building document AI that holds in production</em></h4><p>I’ve noticed that most AP teams treat invoice matching like a plumbing problem. Something that needs to work shouldn’t require much thought, and can be handled by configuring whatever came built into their ERP. Then an invoice gets paid for goods that never arrived, or a vendor double-bills on a Friday afternoon, and the discrepancy doesn’t surface until the following month’s reconciliation.</p><p>The matching model is not a plumbing problem. It’s a control design decision, and the choice between 2-way and 3-way matching determines which category of errors and fraud your AP operation can catch and which ones pass through undetected.</p><h3>TL;DR</h3><p>2-way matching compares an invoice to a purchase order on price and quantity. 3-way matching adds the goods receipt note, confirming that items actually arrived before payment clears. <a href="https://www.rillion.com/blog/accounts-payable-fraud/">According to Rillion</a>, 79% of organizations have experienced attempted or actual invoice fraud. 2-way matching stops price and quantity manipulation. It cannot stop “payment for goods never delivered.” Most mature AP operations run 2-way for recurring low-risk vendors and 3-way for new vendors, one-time purchases, and high-value orders. Manual matching at scale costs $12 to $30 per invoice; <a href="https://www.ascendsoftware.com/blog/what-good-looks-like-ap-benchmarks-every-modern-team-should-know-in-2025/">automated matching brings that to $2 to $5</a>. The matching model determines your fraud exposure; automation determines whether that model is financially viable to run.</p><h3>What matching actually prevents, and what it misses</h3><p>An invoice enters your system. No matching logic exists. What can happen?</p><p>A vendor invoices for 500 units at $18 each. The original purchase order was for 400 units at $17.50. The difference is $1,750 in overpayment and 100 units of inventory you didn’t order sitting in a warehouse. Without a match, this sails through to approval and payment.</p><p>A different vendor submits an invoice referencing a legitimate PO. Price matches. Quantity matches. Two-way matching passes it. The goods were never shipped. The company pays, the vendor disappears, and the warehouse manager’s email about a missing delivery gets buried in a Friday afternoon inbox.</p><p>These are both real failure modes. Matching addresses the first. Only 3-way matching addresses the second.</p><p>The control you choose determines which risks you are managing and which you are accepting. Most AP teams underestimate this distinction because their ERP processes invoices without visible drama, right up until there is drama.</p><h3>How 2-way matching works, and where it breaks</h3><h3>The mechanics</h3><p>2-way matching compares two documents: the purchase order and the vendor invoice.</p><p>When an invoice arrives, the system retrieves the corresponding PO and checks: does the invoice quantity match the PO quantity within tolerance? Does the invoice price match the PO price within tolerance? If both checks pass, the invoice routes to approval. If either fails, it lands in an exception queue.</p><p>The strength is speed and simplicity. Both documents should exist in the system before the invoice ever arrives. <a href="https://www.docsumo.com/blog/purchase-order-automation-guide?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=2-way-vs-3-way-matching">Purchase order automation</a> creates the PO at the time of procurement. Invoice data extraction captures the invoice fields. Matching happens in seconds.</p><p>For a team handling 15,000 invoices a month from established vendors on recurring contracts, 2-way matching lets the vast majority clear automatically. That matters operationally. Each invoice that clears without human involvement is an invoice that didn’t require someone’s time.</p><h3>Where 2-way matching fails</h3><p>The critical weakness: 2-way matching never confirms that goods or services were actually received.</p><p>A vendor can send an invoice that matches a valid PO perfectly on price and quantity. If the shipment was never made, refused at the dock, or delivered to the wrong location, 2-way matching has no way to know. The invoice clears. Payment goes out.</p><p>This failure mode shows up in two ways. The first is vendor error: a billing mistake where an invoice is issued before fulfillment actually completes. The second is vendor fraud: deliberate invoicing for goods that were never intended to be shipped.</p><p><a href="https://www.rillion.com/blog/accounts-payable-fraud/">Rillion’s research on AP fraud</a> puts the scale of this problem at 47% of companies experiencing fake invoice scams in the past year alone. 2-way matching catches price and quantity manipulation. It does not catch delivery fraud at all.</p><p>2-way matching is the right choice for recurring, established vendors with predictable purchase patterns. SaaS subscriptions, utility services, and office supplies from a vendor you’ve paid accurately for three years. Any situation where the “was it actually delivered?” question is either irrelevant (services) or reliably answered by the vendor relationship history.</p><p>It is the wrong choice for new vendors, capital equipment purchases, one-time procurement, or any order where what arrives and what was invoiced may diverge.</p><h3>How 3-way matching works, and what it costs operationally</h3><p>3-way matching adds the goods receipt note (GRN) to the comparison. When goods arrive at your warehouse, receiving staff log a GRN in the ERP, capturing what arrived, in what quantity, and in what condition. The invoice can only clear matching when all three documents align: PO, invoice, and GRN.</p><p>The fraud prevention capability this adds is significant. A vendor cannot be paid for goods that have no corresponding goods receipt. If the GRN shows 300 units received and the invoice claims 500, the invoice fails to match and routes to exception. If no GRN exists at all, the invoice cannot clear.</p><p><a href="https://www.medius.com/blog/learn-the-fundamentals-of-invoice-matching/">Research on 3-way match effectiveness</a> confirms this adds protection against overpayment, duplicate charges, and payment for undelivered goods in categories that 2-way matching entirely misses. For new vendors and high-value purchases, this protection is worth the added complexity.</p><h3>The operational dependency you cannot ignore</h3><p>The tradeoff is real and specific: 3-way matching creates a hard dependency on GRN quality and timeliness.</p><p>If the receiving team logs GRNs a day late, invoices sit in a pending state for a day. If they log bulk totals instead of line-item detail, the matching logic cannot verify individual quantities. If their SKU codes don’t match the invoice line numbers, the system flags discrepancies that aren’t real discrepancies.</p><p>Every receiving process failure becomes an AP processing failure. An invoice that should clear in two minutes sits in exception for two days because the warehouse team is three days behind on GRN entry.</p><p>Teams that implement 3-way matching without first tightening their receiving practices often end up with a higher exception rate than they had before, because they’ve added a dependency without adding the discipline needed to make it reliable. The receiving team must log GRNs same-day, at line-item level, with consistent product codes. Without that, 3-way matching creates friction without adding the protection it was designed to provide.</p><p>The right approach: run 3-way matching where receipt verification genuinely matters and where you can enforce GRN discipline. Run 2-way for service invoices and recurring vendors where receipt is either automatic or reliably handled by relationship history.</p><h3>What automated matching actually changes</h3><p>Manual matching is a labor-intensive process. An AP clerk receives an invoice, pulls the PO, compares line items, pulls the GRN if doing 3-way, makes a judgment call on variances, and either approves or flags for exception. At 200 invoices a day, this takes most of a team’s working capacity and still misses discrepancies because human attention degrades under repetitive load.</p><p><a href="https://www.ascendsoftware.com/blog/what-good-looks-like-ap-benchmarks-every-modern-team-should-know-in-2025/">Research from Ascend Software on AP benchmarks</a> puts the cost of manual invoice processing at $12 to $30 per invoice. Automated matching brings that to $2 to $5. At 5,000 invoices a month, the difference is between $60,000 to $150,000 in monthly processing cost versus $10,000 to $25,000.</p><p>The mechanism behind this is <a href="https://www.docsumo.com/solutions/documents/invoices?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=2-way-vs-3-way-matching">invoice data extraction</a> using intelligent document processing. IDP captures vendor name, invoice number, line items, quantities, and amounts from any invoice format with 95%+ field-level accuracy. That data is immediately matched against PO and GRN data retrieved from the ERP. Matches clear in seconds. Exceptions route automatically with context. A complete <a href="https://www.docsumo.com/blog/audit-trails?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=2-way-vs-3-way-matching">audit trail</a> logs every step.</p><p>The straight-through processing rate tells you how the system is performing: the percentage of invoices that clear matching without any human intervention. Manual processes typically run 40 to 60% STP. Well-configured automated matching runs 85 to 95%.</p><p>That 35-point gap represents real reduction in processing cost, processing time, and the errors introduced by fatigue in repetitive manual review.</p><h3>The matching decision framework</h3><p>The right matching approach depends on three variables: vendor relationship history, order type, and whether GRN discipline is achievable in your receiving operation.</p><p><strong>Use 2-way matching for:</strong> recurring vendors with clean payment history, subscription services and utilities, standard commodity procurement from known suppliers, and any purchase where “delivery” is implicit (ongoing services).</p><p><strong>Use 3-way matching for:</strong> new vendors in the first 6 to 12 months of the relationship, capital equipment and one-time purchases, orders above a defined dollar threshold (many teams use $10,000 to $25,000), and any vendor who has had prior discrepancy history.</p><p><strong>Don’t use 4-way unless:</strong> your business has a formal goods acceptance gate with documented QC results, and payment is genuinely contingent on quality confirmation rather than just delivery.</p><p>The hybrid approach, different matching levels for different vendor or purchase profiles, is what most mature AP operations run. It balances the speed of 2-way matching for low-risk volumes against the protection of 3-way matching where protection actually matters.</p><h3>Where to go from here</h3><p>The full breakdown of 2-way vs 3-way matching, including the tolerance threshold configuration guide, the exception routing logic, and how automated matching integrates with ERP systems, is in Docsumo’s guide: <a href="https://www.docsumo.com/blog/2-way-vs-3-way-matching?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=2-way-vs-3-way-matching">2-Way vs 3-Way Matching in Accounts Payable</a>.</p><p>If you want to see how <a href="https://www.docsumo.com/?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=2-way-vs-3-way-matching">Docsumo’s AP automation</a> handles invoice extraction, matching logic, and exception routing in a production environment, the platform supports both 2-way and 3-way matching with configurable tolerances per vendor and ERP integration via REST API.</p><p>What’s the matching failure that has cost your AP team the most to clean up? Curious whether it was a configuration issue, a process breakdown on the receiving side, or something else entirely.</p><p><em>Earlier in this series: </em><a href="https://www.docsumo.com/blog/llms-in-document-processing?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=2-way-vs-3-way-matching"><em>LLMs in Document Processing</em></a><em> · </em><a href="https://www.docsumo.com/blog/building-an-idp-stack?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=2-way-vs-3-way-matching"><em>Building an IDP Stack</em></a><em> · </em><a href="https://www.docsumo.com/blog/rag-for-document-ai?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=2-way-vs-3-way-matching"><em>RAG for Document AI</em></a></p><p><strong>Tags:</strong> Artificial Intelligence · Machine Learning · Document Processing · Automation · Fintech</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e22b01b38b9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/docsumo/2-way-vs-3-way-matching-the-ap-decision-that-determines-how-much-fraud-slips-through-2e22b01b38b9">2-Way vs 3-Way Matching: The AP Decision That Determines How Much Fraud Slips Through</a> was originally published in <a href="https://medium.com/docsumo">Docsumo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LLMs in Document Processing: Where They Help, Where They Fail, and What the Benchmarks Don’t Tell…]]></title>
            <link>https://medium.com/docsumo/llms-in-document-processing-where-they-help-where-they-fail-and-what-the-benchmarks-dont-tell-6c882d3bfdb5?source=rss-0d50e8a52cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c882d3bfdb5</guid>
            <category><![CDATA[document-ai]]></category>
            <category><![CDATA[llms-in-finance]]></category>
            <category><![CDATA[document-processing]]></category>
            <category><![CDATA[llms-in-healthcare]]></category>
            <category><![CDATA[ai-document-processing]]></category>
            <dc:creator><![CDATA[Sagnik Chakraborty]]></dc:creator>
            <pubDate>Tue, 02 Jun 2026 17:23:35 GMT</pubDate>
            <atom:updated>2026-06-02T17:23:35.788Z</atom:updated>
            <content:encoded><![CDATA[<h3>LLMs in Document Processing: Where They Help, Where They Fail, and What the Benchmarks Don’t Tell You</h3><p><em>Part of the series: Building document AI that holds in production</em></p><p>I’ve seen the same quiet failure play out at a surprising number of companies. They deploy OCR-based invoice automation. The pilot is a success. Then they go to production, the document formats start varying, and someone, usually quietly and without being asked, becomes responsible for maintaining extraction templates full time. They maintain them when vendor invoice layouts change. They maintain them when a new supplier joins with an unusual format. They maintain them on weekends when the automation breaks at 4pm on a Friday.</p><p>The automation was real. So was the new job it created.</p><p>LLMs are, genuinely, the first technology that addresses the root cause of that failure. Not the symptom (wrong field extracted) but the cause (the system was never actually understanding the document; it was matching patterns).</p><p>That said, the current excitement around LLMs has also produced a second kind of failure: companies assuming that because LLMs are smart, they can run the entire document pipeline. That assumption gets expensive quickly.</p><p>This is what actually happens in production.</p><h3>TL;DR</h3><p><a href="https://solutionsreview.com/data-management/80-percent-of-your-data-will-be-unstructured-in-five-years/">According to Gartner and McKinsey</a>, 80 to 90% of enterprise data is unstructured. LLMs are the first technology capable of interpreting this data at scale by understanding meaning rather than matching patterns. That makes them genuinely useful for unstructured text, variable-format documents, and complex classification tasks. Their limitations are also real: dense tables, probabilistic outputs, high-volume throughput, and <a href="https://sqmagazine.co.uk/llm-hallucination-statistics/">hallucination rates that benchmarks</a> put between 15% and 52% across enterprise document tasks. Production deployments that work use a hybrid architecture: OCR handles text recognition, LLMs interpret context, and an <a href="https://www.docsumo.com/solutions/intelligent-document-processing-platform?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">intelligent document processing platform</a> orchestrates validation, exception handling, and system integrations. No single layer does all three jobs well.</p><h3>Why this problem was hard before, and why LLMs changed something real</h3><p><a href="https://www.docsumo.com/blog/what-is-ai-ocr?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">Traditional OCR</a> is a transcription tool. It converts image pixels to machine-readable text with no awareness of what that text means. For a decade, this was the foundation of document automation, and it worked reasonably well on standardized forms where field positions were predictable.</p><p>The trouble is most enterprise documents are not standardized forms. Invoices from 400 vendors rarely follow identical layouts. Insurance claims mix narrative text with tables and handwritten annotations. Loan documents reference terms defined elsewhere in the packet. Contracts bury the clauses that actually matter inside pages of boilerplate.</p><p>For these documents, template-based OCR produces exactly the template-maintenance problem I described above. The templates multiply. Accuracy on new formats degrades. Manual review queues grow.</p><p>LLMs change this because they were trained on enough text to understand what words mean in context. They can read “Amount Due” on one invoice and “Total Payable” on another and correctly identify both as the same field. They can recognize a liability clause even when it is labeled “Limitation of Remedies.” They can understand that “net 45” in a payment terms paragraph means something specific, extract the number as a structured value, and apply it correctly.</p><p>An analogy from the blog that I keep coming back to: OCR is the diligent transcriptionist who writes down every word perfectly and understands nothing. An LLM is the person in the meeting who understood the conversation and remembers who now owns the problem.</p><p>That distinction matters enormously for variable-format, context-heavy documents. It matters much less for clean, structured forms where positional extraction was already reliable.</p><h3>The full pipeline, and where LLMs sit inside it</h3><p>One thing that gets missed in most LLM-for-documents discussions is that LLMs need other infrastructure around them to function in production.</p><p>The actual processing chain looks like this.</p><p>A document arrives via email, SFTP, cloud storage, or API upload. <a href="https://www.docsumo.com/blog/building-an-idp-stack?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">Ingestion handles deduplication and metadata capture</a>; getting this wrong means the same invoice gets processed twice with no trace of how it arrived.</p><p>The document then goes through preprocessing: deskewing, noise removal, contrast enhancement. This step is chronically underinvested. A low-resolution fax scan fed to even the strongest LLM will produce mediocre results, because the OCR layer that converts pixels to text runs before the LLM sees anything. <a href="https://www.docsumo.com/blog/improving-ocr-accuracy?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">Image quality directly affects downstream accuracy</a> in ways that no model can fully compensate for.</p><p>OCR runs on the preprocessed image, producing machine-readable text. The LLM never sees the original pixels; it works with the text the OCR layer produces.</p><p>The LLM then interprets that text, classifies the document type, and extracts structured fields according to a defined output schema. Getting the schema right is underrated work. “Extract the date” produces inconsistent results. “Extract invoice_date in YYYY-MM-DD format” produces far more reliable ones. <a href="https://www.docsumo.com/blog/what-is-schema-mapping?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">Schema mapping</a> is where a lot of subtle accuracy problems originate.</p><p>Extracted fields then go through validation: field-level rules, cross-field checks (if the invoice is marked final, no open line items should exist), and <a href="https://www.docsumo.com/blog/cross-field-reasoning?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">cross-field reasoning</a> that catches anomalies the individual field checks miss. Documents that fail validation or fall below confidence thresholds route to <a href="https://www.docsumo.com/blog/human-in-the-loop-review?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">human-in-the-loop review</a> rather than proceeding to the ERP.</p><p>The validated data then integrates downstream. Every step in the chain gets logged for the <a href="https://www.docsumo.com/blog/audit-trails?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">audit trail</a> that regulators ask for and that tells you, six months from now, exactly what happened to document 14,738.</p><p>LLMs are one layer in this pipeline, not a replacement for the others.</p><h3>Where LLMs genuinely add value</h3><p><strong>Variable-format document extraction</strong> is where LLMs are at their most useful. A lender processing bank statements from 200 different financial institutions cannot practically build and maintain templates for all of them. An LLM that understands what “closing balance,” “ending balance,” and “balance at end of period” all mean does not need those templates.</p><p><strong>Unstructured narrative text</strong> is another clear strength. Contracts, insurance policies, and medical records contain critical information embedded in paragraphs, not in labeled fields. Rule-based systems that search for keywords fail as soon as the language varies. LLMs can understand that “the party of the first part shall not be liable” and “maximum exposure is capped at” are both describing the same concept, extract the relevant value, and classify it correctly.</p><p><a href="https://www.docsumo.com/blog/what-is-document-classification?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing"><strong>Document classification</strong></a> improves substantially with LLMs. A classifier that relies on keyword matching breaks when a lease amendment and a lease termination both use the word “lease” repeatedly throughout. A classifier that understands meaning does not.</p><p><strong>Natural language queries</strong> over extracted data are genuinely useful once the structured output exists. “Which invoices from Q3 had payment terms longer than 45 days?” replaces a complex database query with a plain English question. This makes operational review and exception handling accessible to people who are not analysts.</p><h3>Where LLMs fall short</h3><p><strong>Dense tables and financial forms</strong> are the most common place where LLM extraction degrades. Bank statements, insurance bordereau files, and multi-page financial schedules require precise row-column relationship preservation. When positional accuracy matters more than semantic understanding, LLMs can lose track of which value belongs to which column, particularly across page breaks or in tables with merged cells.</p><p><a href="https://www.docsumo.com/blog/table-extraction-from-complex-pdfs?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">Table extraction from complex documents</a> is a specialized capability that dedicated extraction models handle better than general-purpose LLMs in most production settings.</p><p><strong>Probabilistic outputs</strong> are a fundamental characteristic of LLMs that matter in regulated workflows. OCR is deterministic: the same input produces the same output every time. LLMs are not. The same document can produce slightly different outputs across runs, which creates problems in financial reconciliation, compliance reporting, and any workflow where auditability requires identical repeated outputs.</p><p><strong>Cost at scale</strong> is where the pilot-to-production gap becomes visible. A dense invoice might consume 1,500 to 2,000 tokens per page. At enterprise volume (hundreds of thousands of documents per month), <a href="https://www.silicondata.com/blog/llm-cost-per-token">API token costs</a> accumulate significantly even at current pricing. Teams that built their cost models on pilot volumes frequently discover the math changes at production scale.</p><p><strong>Hallucination</strong> is the failure mode that receives the most attention, often without enough precision about when it actually matters. Independent benchmarking puts <a href="https://sqmagazine.co.uk/llm-hallucination-statistics/">LLM hallucination rates between 15% and 82%</a> depending on task type and model. For document extraction specifically, the operative question is not whether a model ever hallucinates, but whether your validation layer catches it before the output reaches a downstream system.</p><p>A field value that appears nowhere in the source document, confidently returned as an extraction result, is not a theoretical risk. It happens. The mitigation is not choosing a better model; it is building validation rules that check extracted values against constraints and route uncertain outputs to human review rather than passing them downstream unexamined.</p><h3>Prompting vs fine-tuning: the practical decision</h3><p>There are two paths to getting extraction from an LLM.</p><p>Prompt engineering means giving the model natural language instructions: “Read this invoice and extract the vendor name, invoice number, invoice date, and total amount in JSON format.” It is fast to test, easy to iterate on, and good enough for many use cases. It can also be fragile: small changes to prompt wording sometimes produce unexpectedly different outputs, and performance on unusual document formats can be inconsistent.</p><p><a href="https://www.docsumo.com/blog/few-shot-model-training?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">Few-shot fine-tuning</a> trains the model on labeled examples of your actual document types. It requires building a dataset of annotated documents, which takes time, but it produces more stable and consistent accuracy on the specific document types you care about. Research comparing prompting and fine-tuning for structured extraction tasks consistently shows fine-tuning wins on precision for domain-specific document types once you have enough training data.</p><p>The practical pattern in most production deployments: start with prompting to validate feasibility and measure baseline accuracy, then invest in fine-tuning for the highest-volume document types where accuracy gaps are costing the most in manual review time.</p><h3>The cost reality, and how to think about it</h3><p>LLMs are cheap to prototype and expensive to scale. This is not a surprise if you model it correctly, but many teams don’t model it correctly during a pilot.</p><p>Dense documents consume more tokens. Longer context windows cost more. Processing a 10-page financial statement costs more per document than processing a 1-page receipt. At enterprise volumes, a model that looks inexpensive per document at 1,000 documents per month may look very different at 500,000 documents per month.</p><p>Some mitigation strategies that actually work: tight schema design that limits context length, batch processing for non-real-time workflows (which gets significant pricing discounts from most providers), caching of repeated system prompts, and routing simpler documents to lighter models while reserving the more capable (and expensive) models for complex ones.</p><p>But the most important cost number is not API fees. It is total cost of operations including human review. A model that requires 25% manual review because its confidence calibration is poor costs far more than a model that requires 5% review, even if the per-page API fee is lower. The <a href="https://www.docsumo.com/blog/what-is-exception-handling?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">exception handling workflow</a> and the validation depth that drives it down are where the real cost leverage sits.</p><h3>The hybrid architecture that actually works in production</h3><p>Production-grade document automation at enterprise scale almost never runs on a single technology. The architecture that works looks like this:</p><p>OCR handles text recognition, because it is fast, deterministic, and inexpensive at scale. LLMs handle interpretation, because they understand context in ways OCR never will. An <a href="https://www.docsumo.com/solutions/intelligent-document-processing-platform?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">IDP platform</a> handles orchestration: document classification, validation rule enforcement, confidence-based routing to human review, and integrations with downstream systems.</p><p>Each layer does what it does well. The orchestration layer is what keeps the whole thing auditable, reliable, and operable at production volume.</p><p>Understanding the <a href="https://www.docsumo.com/blog/difference-between-idp-ocr-document-ai-agentic-workflows?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">difference between OCR, IDP, and document AI</a> matters here, because each gets marketed as a solution to the same problem despite addressing different parts of it.</p><p><a href="https://www.docsumo.com/blog/rag-for-document-ai?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">RAG-based architectures</a> are increasingly part of this picture for use cases involving large document corpora, where retrieval needs to find the right passage before the LLM interprets it. The chunking strategy, as I’ve written about before, is usually where RAG-based document systems fail. Not the model.</p><p><a href="https://www.docsumo.com/blog/what-is-agentic-document-workflows?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">Agentic document workflows</a> are the direction the field is moving: systems where LLMs not only extract data but make routing decisions, trigger downstream actions, and flag exceptions for human review based on the content of what they’ve extracted. The governance and auditability challenges here are real and not fully solved, but the capability is already usable for many back-office automation scenarios.</p><h3>The governance question that should come before the architecture question</h3><p>Security and data handling requirements often determine architecture choices before any technical evaluation begins.</p><p>If you are processing documents that contain personal financial data, health information, or data subject to data residency requirements, the question of where those documents go during processing matters. Cloud API processing means documents leave your environment. Local deployment eliminates that concern but introduces GPU infrastructure requirements that not every organization can absorb.</p><p><a href="https://www.docsumo.com/blog/what-is-soc-2-compliance?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">SOC 2 Type II compliance</a>, HIPAA, and GDPR alignment are not differentiators; they are baseline requirements for enterprise deployments in regulated industries. Verify before building.</p><p>The audit trail is not optional. When something fails six months from now (and something always does), the ability to answer “what happened to this document, at which stage, with which output” in under a minute is what separates a production-grade system from one that is still held together with Slack messages and manual exception logs.</p><h3>What this means if you’re evaluating right now</h3><p>LLMs are not overhyped for the specific problems they are good at. Variable formats, narrative text, semantic classification, natural language queries over extracted data: all genuinely improved by LLM-based interpretation.</p><p>They are overhyped as a complete solution. And the gap between “LLMs can do document extraction” and “LLMs can run our document processing operation” is where most expensive failures live.</p><p>What I have not covered here: how to benchmark accuracy realistically before committing to an architecture, how to model total cost of operations rather than API fee per page, the specific failure patterns by document type, and what production-grade hallucination mitigation actually looks like inside a validation layer.</p><p>That full breakdown is in Docsumo’s guide on LLMs in document processing, with the accuracy trade-offs, the implementation roadmap, and the evaluation framework for deciding when LLMs belong in your stack and when they don’t.</p><p><a href="https://www.docsumo.com/blog/llms-in-document-processing?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">Read the full guide</a> to get the complete picture.</p><p>And if you want to see how a production IDP platform combines LLM-based extraction with validation, confidence-based routing, and audit trails: <a href="https://www.docsumo.com/?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing">explore Docsumo</a>.</p><p>What part of the LLM-in-documents picture do you think is most undersold to teams evaluating it right now? Drop it in the comments.</p><p><em>Earlier in this series: </em><a href="https://www.docsumo.com/blog/building-an-idp-stack?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing"><em>Building an IDP Stack</em></a><em> · </em><a href="https://www.docsumo.com/blog/rag-for-document-ai?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing"><em>RAG for Document AI</em></a><em> · </em><a href="https://www.docsumo.com/blog/few-shot-model-training?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing"><em>Few-Shot Model Training</em></a><em> · </em><a href="https://www.docsumo.com/blog/best-ocr-api-for-developers?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=llms-in-document-processing"><em>Best OCR API for Developers</em></a></p><p><strong>Tags:</strong> Artificial Intelligence · Machine Learning · Document Processing · Automation · Fintech</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c882d3bfdb5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/docsumo/llms-in-document-processing-where-they-help-where-they-fail-and-what-the-benchmarks-dont-tell-6c882d3bfdb5">LLMs in Document Processing: Where They Help, Where They Fail, and What the Benchmarks Don’t Tell…</a> was originally published in <a href="https://medium.com/docsumo">Docsumo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Best OCR API for Developers: What the Benchmarks Don’t Tell You]]></title>
            <link>https://medium.com/docsumo/the-best-ocr-api-for-developers-what-the-benchmarks-dont-tell-you-84173f712c23?source=rss-0d50e8a52cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/84173f712c23</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[document-processing-api]]></category>
            <category><![CDATA[document-processing]]></category>
            <category><![CDATA[best-ocr-api]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Sagnik Chakraborty]]></dc:creator>
            <pubDate>Fri, 29 May 2026 12:30:52 GMT</pubDate>
            <atom:updated>2026-05-29T12:30:52.441Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Part of the series: Building document AI that holds in production</em></p><p>I’ve watched teams spend two weeks evaluating OCR APIs on demo documents, pick the one with the highest accuracy score, and then discover three months into production that they’re paying six times what they budgeted. Not in API costs. In the human review queue that the “accurate” API quietly built up for them.</p><p>The number on the benchmark page was real. It just wasn’t the number that mattered.</p><h3>TL;DR</h3><p>There are twelve serious OCR tools available to developers right now, split across three categories: open-source libraries, cloud APIs, and IDP platforms. Accuracy on clean documents is not a useful differentiator; most modern tools hit 95%+ on standard invoices. The real differences are in table structure handling, confidence calibration, validation depth, and total cost of ownership including human review. Per-page pricing is almost always the wrong metric. For prototypes, use Tesseract or PaddleOCR. For product features on standard document types, use a cloud API. For production workflows where a wrong extraction becomes a wrong ERP record, use an IDP platform. Read the detailed blog <a href="https://www.docsumo.com/blog/best-ocr-api-for-developers?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=best-ocr-api-developers">here</a>.</p><h3>Why the benchmark number is the wrong place to start</h3><p>Every OCR API vendor has a benchmark number. Most of them are true. Most of them are also measured on clean, high-resolution PDFs from the three or four document types the vendor optimized for.</p><p>Your production documents are not those documents.</p><p>They’re 150 DPI scans from a fax machine last calibrated in 2019. They’re PDFs generated by six different accounting software packages, each with its own table formatting. They’re invoices from 400 vendors, not the 40 you tested with. The accuracy gap between benchmark and production is almost never about the OCR engine itself. It’s about format variation, image quality, and whether the system handles the documents it hasn’t seen before.</p><p>The metric you actually want is field-level F1 score on your specific document types, measured on a test set that includes the difficult documents, not just the clean ones.</p><h3>The three categories of OCR tool, and what they’re actually for</h3><p>Think of it this way. Open-source libraries are chef’s knives. Precise, powerful, full control, but you do all the prep work yourself. Cloud APIs are food processors. Faster, less effort, handles more variety. IDP platforms are commercial kitchens. Everything is there, coordinated, and built for volume, but you don’t run one in a studio apartment.</p><p>The mistake developers make is using the wrong tool for the environment they’re building in.</p><h3>Open-source libraries</h3><p><strong>Tesseract</strong> is the standard reference implementation. 100+ languages, active maintenance, runs entirely on your infrastructure. The ceiling is around 85–90% on production scans without pre-processing work. Use it for prototypes, internal tooling, and situations where you need zero external dependencies.</p><p><strong>PaddleOCR</strong> outperforms Tesseract on multilingual and handwritten content, and is particularly strong on Asian scripts. Good table extraction. Also free, also self-hosted. If your document set is multilingual, start here before evaluating paid options.</p><p><strong>EasyOCR</strong> is the fastest path from image to text. Simpler API than Tesseract, good accuracy on printed text, limited table handling. Good for quick prototypes where table structure doesn’t matter.</p><h3>Cloud OCR APIs</h3><p><strong>Google Document AI</strong> handles a wide range of document types with strong pre-built processors for invoices, receipts, and identity documents. Table extraction is solid on standard formats. Pricing is per page with a free tier.</p><p><strong>Amazon Textract</strong> is the AWS-native choice. Strong on forms and tables, tight integration with S3 and Lambda, good confidence scoring. Works well when you’re already deep in the AWS ecosystem.</p><p><strong>Azure Document Intelligence</strong> (formerly Form Recognizer) has strong pre-built models for common document types and handles custom model training through the Azure portal. Good choice for Microsoft-heavy shops.</p><p><strong>Mistral OCR</strong> is newer and worth watching. Strong on text-heavy documents, good multilingual coverage. Less mature on complex table structures than the major cloud providers.</p><p><strong>Mindee</strong> is developer-focused with clean APIs and strong pre-built extractors for invoices, receipts, and passports. Fast integration time. Less configurable for unusual document types.</p><h3>IDP platforms</h3><p><strong>ABBYY FineReader Engine</strong> is the legacy enterprise choice: deep accuracy, broad document support, high cost. Still used in regulated industries where vendor pedigree matters.</p><p><strong>Nanonets</strong> has a clean interface for building custom extraction models. Good for teams that need to train on proprietary document types without deep ML expertise.</p><p><strong>Rossum</strong> focuses on cognitive data capture with a strong UI for review workflows. Positions itself on reducing manual review time.</p><p><strong>Docsumo</strong> covers all seven IDP layers: ingestion, pre-processing, proprietary OCR with spatial awareness, ML classification, schema-driven extraction, configurable validation, and REST/webhook integration. Built for production invoice and financial document workflows where STP rate is the metric that matters.</p><h3>What to actually measure when evaluating</h3><p><strong>Field-level F1 score</strong>, not document-level accuracy. A document where 19 out of 20 fields are correct looks like 95% accuracy. In production, the wrong field in an ERP record is just as costly whether 1 or 5 other fields were wrong.</p><p><strong>Table structure integrity.</strong> Most tools handle two-column tables fine. Line items that span multiple rows, merged cells, or tables that split across pages break a significant portion of tools. Test yours specifically.</p><p><strong>Confidence calibration.</strong> A confidence score of 95% means nothing without calibration data. An uncalibrated model that says 95% on fields it gets wrong 20% of the time is worse than no confidence score, because it sends wrong extractions to your ERP without triggering review. Ask vendors for calibration curves, not just accuracy numbers.</p><p><strong>Review rate at threshold.</strong> What percentage of documents require human review at your acceptable error rate? This is where the $2,000-a-month API becomes a $12,000-a-month operation. A team running 50,000 invoices a month chose the cheapest cloud API on per-page cost. OCR accuracy was 94%. But confidence calibration was poor, so their review threshold had to be set low to catch errors. The result was a 24% human review rate. At ten minutes per review, they were paying more in labor than their entire previous AP operation. The per-page cost was accurate. The total cost of ownership was not.</p><p><strong>P95 latency under load.</strong> Not average latency on 10 documents. P95 on 500 concurrent documents. Most vendor SLAs don’t specify this.</p><p><strong>Format drift handling.</strong> When a vendor changes their invoice template, does your system degrade silently or flag the change? Template-based extraction breaks on format drift. ML-based extraction degrades more gracefully but still degrades.</p><h3>The build vs. buy decision at the API layer</h3><p>Almost no team should build OCR from scratch. The training data requirements are tens of millions of document samples at specific quality thresholds. That puts it out of reach for any team that isn’t a vendor.</p><p>The real decision is which category of tool matches your production environment.</p><p>For prototypes and internal tools: Tesseract or PaddleOCR. Free, self-contained, good enough.</p><p>For product features on standard document types at moderate volume: Google Document AI, Amazon Textract, or Azure Document Intelligence. Well-documented, scalable, reasonable pricing at typical volumes.</p><p>For production workflows where a wrong extraction becomes a business consequence (a wrong invoice amount in your ERP, a missed compliance field in a loan document, a misrouted payment): an IDP platform with validation depth and audit trail. The pre-processing, validation layer, and exception handling that cloud APIs don’t include are what keep your STP rate above 90%.</p><h3>The comparison table</h3><p>Tool Table Handling Validation Confidence Scoring Workflow Pricing Tesseract Basic None None Self-managed Free PaddleOCR Good None Limited Self-managed Free EasyOCR Limited None None Self-managed Free Google Document AI Strong Basic Good Managed Per page Amazon Textract Strong Basic Good Managed Per page Azure Document Intelligence Strong Basic Good Managed Per page Mistral OCR Limited None Basic Managed Per page Mindee Good Basic Good Managed Per page ABBYY FineReader Strong Basic Strong On-prem/cloud License Nanonets Good Moderate Good Managed Per page Rossum Good Moderate Good Managed Per page Docsumo Strong Deep (3-layer) Calibrated Full IDP Volume</p><h3>The STP question that determines the right choice</h3><p>Straight-through processing rate is the honest summary metric. For invoice processing, 90%+ STP is achievable. For complex financial documents, 75–80% is realistic.</p><p>If you’re evaluating on accuracy alone, you won’t know your STP rate until you’re in production. If you’re evaluating on field-level F1, confidence calibration, and validation depth, you can estimate it in advance. Read the full blog <a href="https://www.docsumo.com/blog/best-ocr-api-for-developers?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=best-ocr-api-developers">here</a>.</p><p>That estimate is what actually predicts your total cost of operations, not the per-page number on the pricing page.</p><p>What’s the evaluation criterion that surprised you most when you moved a document AI project from test to production? Curious what others have run into.</p><p><em>Earlier in this series: </em><a href="https://www.docsumo.com/blog/building-an-idp-stack"><em>Building an IDP Stack</em></a><em> · </em><a href="https://www.docsumo.com/blog/rag-for-document-ai"><em>RAG for Document AI</em></a><em> · </em><a href="https://www.docsumo.com/blog/few-shot-model-training"><em>Few-Shot Model Training</em></a><em> · </em><a href="https://www.docsumo.com/blog/what-is-ai-ocr"><em>What is AI OCR?</em></a></p><p><strong>Tags:</strong> Artificial Intelligence · Machine Learning · Document Processing · Automation · Fintech</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84173f712c23" width="1" height="1" alt=""><hr><p><a href="https://medium.com/docsumo/the-best-ocr-api-for-developers-what-the-benchmarks-dont-tell-you-84173f712c23">The Best OCR API for Developers: What the Benchmarks Don’t Tell You</a> was originally published in <a href="https://medium.com/docsumo">Docsumo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an IDP Stack: The Seven Layers and Why the One You’re Focused On Is Probably the Wrong One]]></title>
            <link>https://medium.com/docsumo/building-an-idp-stack-the-seven-layers-and-why-the-one-youre-focused-on-is-probably-the-wrong-one-320946abb845?source=rss-0d50e8a52cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/320946abb845</guid>
            <category><![CDATA[idp]]></category>
            <category><![CDATA[document-ai]]></category>
            <category><![CDATA[docsumo]]></category>
            <category><![CDATA[document-processing]]></category>
            <category><![CDATA[document-automation]]></category>
            <dc:creator><![CDATA[Sagnik Chakraborty]]></dc:creator>
            <pubDate>Tue, 26 May 2026 16:38:52 GMT</pubDate>
            <atom:updated>2026-05-26T16:38:52.157Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Part of the series: Building document AI that holds in production</em></h4><p>I’ve watched teams spend three months tuning their OCR engine and then ship to production with zero exception handling, no audit trail, and a pre-processing step that silently drops 8% of incoming documents. They discovered this six weeks later when a customer called to inquire about missing invoices.</p><p>The OCR accuracy was 97.3%. The system was losing nearly one in ten documents before OCR even ran.</p><p>This is the trap of IDP development. The extraction layer receives all the attention because it’s measurable and ships demo videos effectively. The rest of the stack — seven layers in total — gets bolted together with whatever is available and never tested against the kinds of documents that actually arrive on a Tuesday afternoon when no one is watching.</p><h3>TL;DR</h3><p>An IDP stack is seven interdependent layers: ingestion, pre-processing, OCR, classification, extraction, validation, and integration. Most teams invest heavily in layers three and five (OCR and extraction) and under-invest in layers one, two, six, and seven. According to Tungsten Automation, 30–40% of documents processed with OCR-only solutions still require human review — because the validation and exception handling that would catch failures simply wasn’t built. The build vs. buy decision is different at each layer. And the five most common mistakes all happen outside the extraction layer. Read in detail about each mistake in <a href="https://www.docsumo.com/blog/building-an-idp-stack?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=building-idp-stack">this blog</a>.</p><h3>Why IDP is harder to build than it looks</h3><p>The failure mode is consistent across teams regardless of company size. You assemble tools that work individually. You test on a representative sample. Accuracy looks good. You ship.</p><p>Then production hits. Your test set was 500 invoices from three vendors. Production has invoices from 400 vendors, in 12 formats, 3 languages, scanned at varying quality, some from fax machines last calibrated in 2021. Format D and E from vendors you’ve never seen before don’t match any pattern your classification model learned. Your pre-processing step wasn’t designed for 150 DPI images with harsh shadows. Your validation has ten rules. Production needs 500.</p><p>None of this shows up in your benchmark. All of it shows up in your straight-through processing rate.</p><h3>The seven layers - and where each one actually fails</h3><p><strong>Layer 1 (Ingestion)</strong> is how documents enter your system: email, SFTP, cloud storage, API, fax, scanner. The failures here are deduplication and metadata loss. The same invoice arrives by email and by fax and gets processed twice. The metadata from the sender — customer ID, submission timestamp, intake channel — never gets captured, so when something fails downstream you have no way to trace it back.</p><p><strong>Layer 2 (Pre-processing)</strong> is image quality correction: deskewing, noise removal, contrast enhancement, rotation detection. Most teams skip it or treat it as a two-hour integration task. A poorly pre-processed image drops OCR accuracy by 15–20 percentage points. The 97% accuracy you measured in tests becomes 80% on the 150 DPI fax scan you didn’t have in your test set.</p><p><strong>Layer 3 (OCR)</strong> gets all the attention. It deserves some of it — getting text off an image is genuinely hard. But modern cloud OCR engines are good. AWS Textract, Azure Form Recognizer, and purpose-built engines like Docsumo’s reach 95%+ on clean documents. The gap between 95% and 99% matters less than getting layers 1, 2, 6, and 7 right.</p><p><strong>Layer 4 (Classification)</strong> determines document type and routes to the correct extraction schema. If an invoice gets classified as a credit memo, extraction fails entirely even if every other layer was perfect. Rules work for 3–5 stable types. ML classification handles 10+ types or formats that drift over time. The hybrid approach — rules first, ML fallback — is what most production systems settle on.</p><p><strong>Layer 5 (Extraction)</strong> pulls structured fields from the classified document. This is where schema-driven extraction matters: you define what you want (invoice number, date, amount, line items), and the extraction model populates the schema, flagging blanks for review rather than guessing. The thing most teams get wrong here is table extraction — line items that span multiple rows, split across pages, or formatted differently between vendors.</p><p><strong>Layer 6 (Validation)</strong> is where production stacks silently fail the most. Teams write field-level rules (amount must be a positive number) and stop. Production requires three types: field-level rules, cross-field rules (if invoice is marked final, there should be no open line items), and cross-document rules (invoice amount must match PO amount within 3%). An anomaly detection layer on top catches unusual patterns — a seven-figure invoice to a new vendor on a holiday weekend — that pass all explicit rules but look wrong.</p><p><strong>Layer 7 (Integration)</strong> moves validated data downstream. ERP systems want different formats. Some want data pushed, others want to pull it. RPA bots need a handoff protocol. The audit trail needs to record every timestamp, layer, status, and error message so that when something breaks six months from now you can replay exactly what happened to document 14,738.</p><h3>The build vs. buy decision at each layer</h3><p>The honest answer on this is that almost nobody should build layers 2, 3, or 7 from scratch. Here’s how I think about it:</p><p>Layer Build or buy Ingestion Buy — use a platform. Only build custom connectors for unusual sources. Pre-processing Buy or use a library. This is specialized image processing, not business logic. OCR Buy. Deep learning OCR requires years of training data you don’t have. Classification Rules for simple cases. ML for anything with format variation or 10+ types. Extraction Buy for standard document types. Custom models for proprietary formats. Validation Build. Business rules are your business logic. You own them. Integration Buy connectors when available. Build custom for your ERP or EDMS.</p><p>The temptation to build everything is real — you want control, you think it will be faster, someone on the team wants to learn about transformer-based extraction. The cost is 3–6 months to get to a single use case, then ongoing maintenance. A platform-based implementation of the same use case runs 2–4 weeks.</p><p>The nuance: validation and integration always require custom work regardless of which platform you use. Those layers encode your business logic. No vendor ships the right rules for your PO matching tolerances or your ERP’s field naming conventions.</p><h3>The five failure patterns worth memorising</h3><p>The same five mistakes show up across most failed IDP builds.</p><p>Under-investing in pre-processing is the most expensive. You license the best OCR engine available and feed it images scanned at 150 DPI with camera shake. OCR accuracy will disappoint you every time, and the problem isn’t the OCR.</p><p>Treating validation as a late-stage task is the second. Validation rules encode business logic that catches the failures your extraction model doesn’t catch. Build them before you measure accuracy. The 5% of extractions that fail often fail in patterns that rules would have caught if anyone had written them.</p><p>No exception handling means silent failure. A document that fails classification at 2 pm sits in a queue forever if no one builds a dead letter queue, a timeout, and a routing rule for exceptions. Design for failure as a normal case.</p><p>No audit trail means you can’t debug production. “Which documents failed last Tuesday?” should be answerable in under a minute. If it isn’t, you don’t have a production-grade system.</p><p>Testing only on clean samples means you shipped a system that works on data you’ve already seen. Collect real production documents before go-live. Include the difficult ones.</p><h3>The STP number that tells you if your stack is working</h3><p>Straight-through processing is the percentage of documents that clear the entire pipeline without human review. For invoicing, 90%+ STP is achievable with good validation. For complex insurance claims or mortgage documents, 70–80% is more realistic. Know your target before you start building, and measure against it in production, not in test.</p><p>If your STP is below target, the failure is almost always in layer 6 (too few validation rules, too many false positives) or layer 2 (image quality tanking OCR accuracy). It’s rarely the extraction model itself. Read more about the best practices in detail <a href="https://www.docsumo.com/blog/building-an-idp-stack?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=building-idp-stack">here</a>.</p><p>What’s the layer that surprised you most in a document automation build - the one you underestimated until production forced you to fix it? Drop it in the comments.</p><p><em>Earlier in this series: </em><a href="https://www.docsumo.com/blog/rag-for-document-ai?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=building-idp-stack"><em>RAG for Document AI</em></a><em> · </em><a href="https://www.docsumo.com/blog/few-shot-model-training?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=building-idp-stack"><em>Few-Shot Model Training</em></a><em> · </em><a href="https://www.docsumo.com/blog/what-is-ai-ocr?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=building-idp-stack"><em>What is AI OCR?</em></a></p><p><strong>Tags:</strong> Artificial Intelligence · Machine Learning · Document Processing · Automation · Fintech</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=320946abb845" width="1" height="1" alt=""><hr><p><a href="https://medium.com/docsumo/building-an-idp-stack-the-seven-layers-and-why-the-one-youre-focused-on-is-probably-the-wrong-one-320946abb845">Building an IDP Stack: The Seven Layers and Why the One You’re Focused On Is Probably the Wrong One</a> was originally published in <a href="https://medium.com/docsumo">Docsumo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RAG for Document AI: Why the Contract Clause You’re Looking For Keeps Getting Lost]]></title>
            <link>https://medium.com/docsumo/rag-for-document-ai-why-the-contract-clause-youre-looking-for-keeps-getting-lost-85fc9f72fea8?source=rss-0d50e8a52cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/85fc9f72fea8</guid>
            <category><![CDATA[agentic-rag]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[document-processing]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Sagnik Chakraborty]]></dc:creator>
            <pubDate>Mon, 18 May 2026 17:11:51 GMT</pubDate>
            <atom:updated>2026-05-18T17:11:51.992Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Part of the series: Building document AI that holds in production</em></h4><p>I’ve seen the same failure play out across different teams enough times to recognize it before they do. An ML team builds a retrieval-augmented generation system over a corpus of contracts. They test it, the recall numbers look reasonable. Then a lawyer asks: which contracts have automatic renewal clauses with less than 30 days notice? The system returns three contracts. The actual answer is 47.</p><p>The chunks were too large. The renewal clause was split across a chunk boundary. The retrieval step did exactly what it was designed to do. The design itself was wrong.</p><p>This is the RAG failure nobody warns you about when you’re following a general-purpose tutorial. Building RAG on top of documents is different from building RAG on top of news articles, help pages, or Wikipedia. Documents have structure. Contracts have clauses that span pages and reference other sections. Invoices have interdependent fields. Insurance forms have sections where the meaning of one field depends entirely on another. When you apply generic chunking logic to structured documents, you build a system that works on demo queries and breaks on the one that actually matters to the business. Read more about it <a href="https://www.docsumo.com/blog/rag-for-document-ai?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=rag-ai">here</a>.</p><h3>TL;DR</h3><p>RAG feeds relevant document chunks to an LLM to ground its answers in real data rather than training memory. But standard RAG chunking strategies ignore document structure, which means key clauses get split, metadata gets lost, and retrieval precision falls below what legal, operations, or compliance teams will accept. Building document RAG that holds requires semantic or structure-aware chunking, metadata-filtered vector stores, and hybrid retrieval combining dense and sparse search. Adaptive chunking in clinical decision support achieved 87% accuracy versus 50% for fixed-size approaches. That gap is not theoretical.</p><h3>Why documents break general-purpose RAG</h3><p>Standard RAG assumes text is largely homogeneous. A Wikipedia article, a research paper, a customer support thread. You chunk it, embed it, and retrieve it. The structure is optional context.</p><p>Documents violate this assumption in every direction.</p><p>A contract’s indemnification clause might read: “Vendor shall indemnify and hold harmless Client from all third-party claims arising from Vendor’s performance of Services, provided that Vendor’s liability under this indemnification shall not exceed the total fees paid in the preceding 12 months.” That’s one clause. Two sentences. A fixed 512-token chunk boundary might split them. A query for “What is Vendor’s maximum liability?” retrieves only the cap without the indemnification scope it limits. The LLM answers confidently and incorrectly.</p><p>Metadata is another dimension that breaks generic pipelines. A financial document’s date, counterparty, and currency aren’t just annotations — they’re query filters. If you’re asking about 2024 renewal terms, you don’t want to retrieve clauses from a 2018 contract that happens to use similar language. Generic RAG has no way to enforce this. Every chunk from every contract competes equally in vector space.</p><p>At enterprise scale, the problem multiplies. Fifty thousand contracts at 100 chunks each is five million vectors. Even strong embeddings retrieve noise at that size without metadata partitioning. The system slows, precision falls, and the legal team stops trusting it.</p><h3>The six stages where document RAG can fail</h3><p>Building document RAG that actually works means getting six stages right in sequence, because failures compound downstream.</p><p><strong>Document processing and structuring</strong> comes first. Every document must be readable and classified before any chunk is created. OCR quality sets the ceiling for everything downstream — a scanner artifact in stage one propagates through embedding and retrieval. Document classification matters because you cannot chunk an insurance policy the same way you chunk an invoice. A structured document pipeline that identifies document type before chunking is not optional infrastructure; it’s the foundation the whole system depends on.</p><p><strong>Chunking strategy</strong> is where most pipelines actually fail. Fixed-size chunking is easy to implement and wrong for documents. Semantic chunking splits at logical boundaries — paragraphs, sections, clauses — rather than token counts. Structure-aware chunking uses document metadata like headers and table boundaries to inform where splits happen. Hierarchical chunking creates chunks at multiple granularities, so a clause is a chunk, the full section is also a chunk, and retrieval picks the appropriate level based on query type. Research comparing 36 different chunking approaches across document types consistently shows structure-aware and semantic approaches outperforming fixed-size splits. On clinical documentation, adaptive chunking reached 87% accuracy; fixed-size reached 50%.</p><p><strong>Embedding model selection</strong> interacts with chunking in ways most teams discover too late. A large general-purpose model like text-embedding-3-large or Vertex AI text-embedding-004 captures rich semantic meaning but costs more at indexing and query time. Domain-specific models like BioBERT or FinBERT add vocabulary precision for highly specialized corpora but introduce operational overhead. The honest starting point for most teams: use a strong general-purpose model, benchmark it on 100 representative queries from your actual corpus, and only switch to a domain model if retrieval precision is demonstrably below threshold.</p><p><strong>Vector store design</strong> determines how well metadata filtering works at query time. Your vector store needs to hold more than vectors — it needs the extracted fields from each document as queryable metadata. Contract date, counterparty name, document version, source section. A query for “renewal clauses signed after January 2024” should filter on metadata first, then run vector search within that subset. Without this, you’re doing vector search across your entire corpus for every query. Storage costs also scale fast: 50,000 contracts at 768-dimensional embeddings across 100 chunks each runs to roughly 3.8 terabytes. Partitioning by document type and date range keeps query latency and cost manageable.</p><p><strong>Retrieval strategy</strong> is where dense versus sparse versus hybrid becomes a real decision. Dense (vector) search captures semantic similarity — useful when queries use different vocabulary than the source documents. Sparse search (BM25, TF-IDF) catches exact phrase matches — critical when a lawyer asks for “automatic renewal” verbatim and needs the exact phrase retrieved. Hybrid combines both. For most document corpora with technical, legal, or financial vocabulary, hybrid retrieval outperforms either approach alone. Running a benchmark on 100 queries before committing to a strategy takes an afternoon and prevents months of accuracy problems.</p><p><strong>Generation and grounding</strong> is the final stage. The LLM needs to be instructed explicitly to cite its source chunks, to answer only from retrieved content, and to return a “not found” result when the chunks don’t support an answer. Without grounding enforcement, the LLM fills gaps with plausible-sounding inference. For documents where a missed liability clause or overlooked exclusion carries real consequences, a confident wrong answer is worse than an honest “I couldn’t find this.”</p><h3>Where structured extraction feeds into RAG</h3><p>The cleanest way to reduce hallucination in document RAG is to give the LLM extracted fields rather than raw chunks whenever possible. An extracted invoice total is ground truth. A chunk containing what might be a total field is probabilistic. Read about it in detail <a href="https://www.docsumo.com/blog/rag-for-document-ai?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=rag-ai">here</a>.</p><p>When document AI extracts structured fields before RAG ingestion, two things happen: chunking improves because the system knows which structural zones exist and where their boundaries are, and retrieval improves because the extracted fields become metadata filters. A contract management system that extracts signature date, counterparty name, and contract type from every document can answer “show me renewable contracts signed with vendors in the Northeast in 2024” with a metadata filter before a single vector search runs.</p><p>This is the integration that makes enterprise document RAG actually precise rather than approximately useful.</p><p>What’s the most expensive RAG failure you’ve seen on a document corpus — was it a chunking problem, a retrieval problem, or something that happened in generation? Drop it in the comments.</p><p><em>Earlier in this series: </em><a href="https://www.docsumo.com/blog/few-shot-model-training?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=rag-ai"><em>Few-Shot Model Training</em></a><em> · </em><a href="https://www.docsumo.com/blog/what-is-ai-ocr?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=rag-ai"><em>What is AI OCR?</em></a><em> · </em><a href="https://www.docsumo.com/blog/what-is-agentic-document-workflows?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=rag-ai"><em>Agentic Document Workflows</em></a></p><p><strong>Tags:</strong> Artificial Intelligence · Machine Learning · Document Processing · Automation · Fintech</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85fc9f72fea8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/docsumo/rag-for-document-ai-why-the-contract-clause-youre-looking-for-keeps-getting-lost-85fc9f72fea8">RAG for Document AI: Why the Contract Clause You’re Looking For Keeps Getting Lost</a> was originally published in <a href="https://medium.com/docsumo">Docsumo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Few-Shot Model Training: What Really Happens When a New Document Format Arrives on Monday]]></title>
            <link>https://medium.com/docsumo/few-shot-model-training-what-really-happens-when-a-new-document-format-arrives-on-monday-61f2ae125328?source=rss-0d50e8a52cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/61f2ae125328</guid>
            <category><![CDATA[document-processing]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[fintech]]></category>
            <dc:creator><![CDATA[Sagnik Chakraborty]]></dc:creator>
            <pubDate>Fri, 15 May 2026 14:20:15 GMT</pubDate>
            <atom:updated>2026-05-15T14:20:15.846Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Part of the series: Building document AI that holds in production</em></h4><p>I’ve seen it play out the same way enough times that it feels scripted. A new vendor comes on board. Their invoices land in the intake system on Friday afternoon. By Monday morning, the ops lead is on a call asking why the queue is frozen. The technical answer is accurate: the models haven’t been trained on this format. The business answer is unacceptable: it will take six weeks to fix.</p><p>That gap between when a new document type arrives and when your system can handle it is what few-shot model training is designed to collapse.</p><h3>TL;DR</h3><p>Few-shot model training lets document AI adapt to new formats using 5 to 20 labeled examples instead of thousands. It cuts deployment time from six-to-twelve weeks down to one to three days. The tradeoff is real: few-shot trades some maximum accuracy ceiling for speed. A few-shot model typically reaches 85–95% accuracy out of the box, then improves through active learning as corrections feed back into the system. For new vendor onboarding, time-sensitive regulatory changes, or acquisition document absorption, it’s often the right starting point.</p><h3>The labeling bottleneck nobody plans around</h3><p>Building a supervised extraction model the traditional way requires labeled data — a lot of it. You source representative documents, write annotation guidelines, send batches to a labeling service, run quality checks, resolve edge cases, and iterate until the dataset is clean enough to train on. For a complex document type like an insurance policy with 40+ extractable fields across three layout variants, the process runs six to twelve weeks. Often longer.</p><p>That timeline holds up fine for planned releases. It breaks entirely when business reality moves faster than a labeling cycle.</p><p>Consider the scenarios that actually trigger the problem: a new carrier partnership requires processing their policy forms starting next week. Regulatory changes mandate extracting fields that previously weren’t captured. An acquisition brings a target company’s legacy document formats into the processing queue. A claims surge sends new document sources through the intake system faster than IT can configure templates.</p><p>In each case, the traditional answer — label thousands of examples, retrain, validate, deploy — simply doesn’t fit the timeline. Few-shot is the alternative: label ten representative examples yourself, deploy a model that handles the new format adequately, and refine it as real documents flow through.</p><h3>How it actually works</h3><p>Three mechanisms make few-shot learning functional rather than theoretical.</p><p><strong>Transfer learning</strong> is the foundation. A pre-trained document model has already processed millions of documents across hundreds of types. It knows what an address block looks like, how to identify numeric fields, how to read a table header. When you fine-tune it on ten labeled claim forms, you’re not teaching it to read — you’re teaching it the specific quirks of this particular format. Those ten examples refine a model that already understands document structure deeply. Without that pre-training, ten examples would overfit immediately. With it, ten examples are often enough to hit 90%+ accuracy on new documents.</p><p><strong>In-context learning</strong> takes a different approach. Rather than fine-tuning a model’s weights, you embed labeled examples directly in a prompt and let a large language model generalize from them. Show the model two labeled invoices, ask it to extract fields from a third. It recognizes the pattern and applies it. The advantage is speed: no retraining required, and you update the model by editing the prompt text rather than running a training job. The cost is per-query token expense, which makes this approach better suited to prototyping and variable-format documents than to high-volume production pipelines where per-document cost matters.</p><p><strong>Active learning</strong> is how few-shot models close the accuracy gap over time. A model trained on ten examples might start at 88% accuracy. As it processes real documents, low-confidence predictions get routed to human reviewers. Those corrections become new labeled examples. The model retrains on the expanding dataset. Within two to four weeks of production use, accuracy typically reaches 95–98%, without ever running a full labeling project. You go live immediately, then improve. This is meaningfully different from the traditional approach, where you wait until the model is good before deploying it at all.</p><h3>The deployment timeline in practice</h3><p>The impact on deployment speed is consistent across document types, though the starting accuracy varies with complexity:</p><p>Document Type Full Supervised Training Few-Shot Deployment Initial Accuracy Range Invoice 6–8 weeks 1–2 days 88–95% Claim Form 8–10 weeks 2–3 days 85–93% Bank Statement 4–6 weeks 1–2 days 90–96% Purchase Order 5–7 weeks 1–2 days 88–94% Insurance Policy 10–12 weeks 3–5 days 82–91%</p><p>The key variable is document consistency. A single vendor’s invoices follow a recognizable layout and few-shot generalizes well. Invoices from ten thousand vendors with wildly different layouts do not generalize cleanly from ten examples — the model sees too little variation to understand the full range. The more consistent the source, the stronger the out-of-the-box few-shot result.</p><h3>When to reach for it and when not to</h3><p>Few-shot is the right choice when you have a hard deadline and no labeled data. When you’re piloting a new document type before committing to a full implementation. When a new supplier or regulatory format arrives with no ramp time and the business needs the workflow running now.</p><p>It’s the wrong choice when error tolerance is near-zero. A compliance document workflow that requires 99%+ accuracy is not a good candidate for a model trained on ten examples. Neither is a high-volume pipeline processing the same well-established document type at 500,000 documents per year — at that scale, the upfront labeling investment pays for itself within a few months and the accuracy gain justifies the wait.</p><p>The practical framing: few-shot gets you operational while you decide whether full supervised training is worth it. It’s the bridge between zero capability and production-grade accuracy on a new document type.</p><h3>The accuracy gap between zero-shot and few-shot</h3><p>Zero-shot learning asks a model to extract fields it has never seen examples of. The results on structured extraction tasks are not competitive with production requirements. Research benchmarking LLM performance on entity extraction tasks found zero-shot accuracy at 19%. Adding a small number of labeled examples — few-shot — pushed that figure to 96.66% on the same task. That is not a marginal improvement. It’s the difference between a system that cannot run in production and one that can.</p><p>The gap narrows for classification tasks, where zero-shot performs reasonably if the categories are intuitive. But for field extraction from structured documents, where output format and field semantics both matter, few-shot and zero-shot are in different categories.</p><p>Hitachi processes over 36,000 bank statements monthly across more than 50 format variations using <a href="https://www.docsumo.com/blog/few-shot-model-training?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=few-shot-learning">Docsumo’s few-shot model training</a>. Rather than building and maintaining a separate configuration per bank format, they train once on a small representative set and adapt. Grid Finance applied the same approach to income extraction from bank statements and payslips, cutting their loan approval timeline by 90%.</p><p>The pattern holds: few-shot doesn’t replace fully-trained models. It replaces the weeks of waiting before a model exists at all.</p><p>What’s the longest you’ve waited to get a new document type into production, and what finally broke the logjam? Drop it in the comments.</p><p><em>Earlier in this series: </em><a href="https://www.docsumo.com/blog/what-is-ai-ocr?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=few-shot-learning"><em>What is AI OCR?</em></a><em> · </em><a href="https://www.docsumo.com/blog/what-is-agentic-document-workflows?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=few-shot-learning"><em>Agentic Document Workflows</em></a><em> · </em><a href="https://www.docsumo.com/blog/difference-between-idp-ocr-document-ai-agentic-workflows?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=few-shot-learning"><em>IDP vs OCR vs Document AI vs Agentic Processing</em></a></p><p><strong>Tags:</strong> Artificial Intelligence · Machine Learning · Document Processing · Automation · Fintech</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61f2ae125328" width="1" height="1" alt=""><hr><p><a href="https://medium.com/docsumo/few-shot-model-training-what-really-happens-when-a-new-document-format-arrives-on-monday-61f2ae125328">Few-Shot Model Training: What Really Happens When a New Document Format Arrives on Monday</a> was originally published in <a href="https://medium.com/docsumo">Docsumo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What AI OCR Actually Does (And Why “98% Accuracy” Is the Wrong Number to Track)]]></title>
            <link>https://medium.com/docsumo/what-ai-ocr-actually-does-and-why-98-accuracy-is-the-wrong-number-to-track-5a6c5e810a49?source=rss-0d50e8a52cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a6c5e810a49</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[document-processing]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Sagnik Chakraborty]]></dc:creator>
            <pubDate>Thu, 14 May 2026 12:12:48 GMT</pubDate>
            <atom:updated>2026-05-14T12:12:48.595Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Part of the series: Building document AI that holds in production</blockquote><p>I’ve noticed something consistent when document teams describe their OCR failures. The accuracy metric usually looks fine — 97%, 98%, sometimes 99% on the vendor dashboard. The problems show up downstream: columns that got merged into garbled paragraphs, table relationships stripped away, a vendor name that drifts by one character between invoices, and breaks PO matching. Template-based OCR that reads left-to-right without understanding what it’s looking at is almost always the root cause.</p><p>The difference between traditional OCR and AI OCR is not primarily an accuracy improvement. It’s a different question the system is trying to answer. Traditional OCR asks: what characters are on this page? AI OCR asks: What does this document mean?</p><p>That shift changes everything about what happens after the character recognition step.</p><h3>The problem traditional OCR was never designed to solve</h3><p>A logistics company processing thousands of bills of lading daily might work with 200 different carriers, each with a unique invoice format. Template-based OCR requires a new configuration for each carrier — 200 templates, maintained indefinitely. When a carrier updates its layout, someone rebuilds a rule. When a new carrier is onboarded, the configuration backlog grows. AI OCR generalizes from training data and extracts shipment details regardless of layout variations. Carrier 201 arrives on a Monday and gets processed without anyone touching a config file.</p><p>That’s the operational difference that matters. Not accuracy on a vendor benchmark — accuracy in production on documents the system has never seen before.</p><h3>Four specific things that change with AI OCR</h3><ol><li><strong>Pattern recognition replaces template matching.</strong> Traditional OCR breaks the moment a vendor moves their invoice number from the top-right corner to the center. AI uses neural networks trained on millions of document variations to recognize fields by context and pattern rather than position. Think of template matching as a form with fixed boxes that rejects anything outside the lines. Pattern recognition works more like a reader who adapts to any formatting style.</li><li><strong>Layout understanding preserves structure.</strong> Traditional OCR reads left-to-right, top-to-bottom, regardless of actual document structure. A two-column invoice becomes a garbled paragraph mixing unrelated data. AI OCR identifies tables, columns, headers, and logical reading order — so line items stay linked to quantities, quantities stay linked to totals, and downstream systems receive coherent records rather than a dump of text.</li><li><strong>Context distinguishes similar-looking fields.</strong> A traditional OCR system extracts a “Ship To” address and a “Bill To” address as two identical text blocks with no semantic distinction. AI OCR uses surrounding labels, position, and document type to classify which is which. A date extracted from a form gets categorized as a birth date or expiration date based on surrounding context — not just extracted as “12/15/1990” floating free of meaning.</li><li><strong>Corrections compound over time.</strong> This is the one that makes the largest practical difference in a production environment. Traditional OCR is static — the same errors repeat until someone manually updates the rules. AI models improve as they learn from human corrections. A reviewer corrects a misread vendor name once, and the system handles it correctly the next time. At scale, on a diverse document mix, that compounding matters more than headline accuracy.</li></ol><h3>The eight-stage pipeline (and where each can fail)</h3><p>AI OCR is not a single step — it’s a pipeline. Understanding each stage clarifies where errors originate.</p><ol><li><strong>Document capture and preprocessing</strong> normalizes inputs: deskewing, noise reduction, contrast enhancement, binarization. This is the quality ceiling for everything downstream. Low-resolution faxes and smartphone photographs stress this stage the most.</li><li><strong>Layout analysis</strong> builds a structural map of the document — this region is a table, this is a header, this is a signature block. Models that skip or rush this step produce extraction errors that look like character recognition failures but actually originate here.</li><li><strong>Text recognition</strong> applies neural networks (typically CNNs combined with Transformers) within each structural zone. This is where character-level confidence scores get assigned — 98% confident this is an “A,” 73% confident this is a “4” or “9.”</li><li><strong>Classification and routing</strong> determine document type without manual tagging and send the document to the appropriate extraction model. A misclassification here propagates errors through every stage that follows, which is why <a href="https://www.docsumo.com/blog/what-is-document-classification?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=ai-ocr">document classification</a> deserves its own evaluation criteria.</li><li><strong>Extraction</strong> pulls structured fields: line items from tables, key-value pairs from forms, handwritten entries from applications. Specialized models maintain the relationships between extracted elements rather than returning a flat list.</li><li><strong>Validation</strong> applies business logic: does the invoice total match the sum of line items? Is the date in a valid range? Does the vendor name match known records? This is where single-field extraction becomes workflow-ready output.</li><li><strong>Human-in-the-loop review</strong> routes low-confidence extractions to reviewers. The quality of the review interface matters here — reviewers who see the original document alongside extracted values and confidence scores make faster, more accurate corrections than reviewers working from a form.</li><li><strong>Output and integration</strong> delivers validated data via API, webhook, or file to downstream systems. The format has to match the target system’s requirements, which is often where integration projects stall.</li></ol><h3>AI OCR vs IDP: the relationship matters</h3><p>AI OCR is a component within <a href="https://www.docsumo.com/blog/what-is-intelligent-document-processing?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=ai-ocr">Intelligent Document Processing</a>, not a standalone solution. AI OCR handles recognition and extraction, but IDP encompasses the full workflow — intake, classification, extraction, validation, case management, and integration.</p><p>Teams that deploy AI OCR expecting it to solve their document workflow discover that the extraction quality improves substantially, but the surrounding infrastructure — exception queues, cross-document matching, audit trails, ERP sync — still needs to be built or bought. For most enterprise teams, the right evaluation question is not “which OCR is most accurate” but “which platform handles the full pipeline with the least custom infrastructure.”</p><h3>When AI OCR becomes non-negotiable</h3><p><strong>High document volumes where the queue grows faster than the team.</strong> The moment overtime becomes structural rather than occasional, template maintenance costs exceed any alternative.</p><p><strong>Accuracy-sensitive decisions.</strong> When extracted data flows directly into credit decisions, compliance filings, or customer outcomes, a 2% error rate on 10,000 documents per month is 200 errors with material consequences. Manual data entry error rates typically run 18–40% under normal conditions — AI OCR at production accuracy beats both.</p><p><strong>Compliance and audit requirements.</strong> Regulators require audit trails, data lineage, and processing documentation. Manual workflows cannot reliably provide this at volume.</p><p><strong>Variable document types from diverse suppliers.</strong> If your supplier base is growing, your document variety is growing with it. Template-based OCR doesn’t scale with supplier count.</p><p><a href="https://www.docsumo.com/solutions/ocr-software?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=ai-ocr">Docsumo’s AI OCR</a> sits inside a full intelligent document processing platform — pre-trained models across 150+ document types, table extraction that preserves relational structure, human-in-the-loop review with corrections feeding back into the model, and cross-document validation that template-based OCR alone can’t deliver. SOC 2 Type II, GDPR, HIPAA certified. Read this detailed <a href="https://www.docsumo.com/blog/what-is-ai-ocr?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=ai-ocr">AI OCR guide</a>.</p><p><em>Earlier in this series: </em><a href="https://www.docsumo.com/blog/difference-between-idp-ocr-document-ai-agentic-workflows?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=ai-ocr"><em>Choosing between IDP vs OCR vs Document AI vs Agentic Document Processing</em></a><em> · </em><a href="https://www.docsumo.com/blog/what-is-agentic-document-workflows?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=ai-ocr"><em>What are Agentic Document Workflows</em>?</a> <em>· </em><a href="https://www.docsumo.com/blog/best-accounts-payable-automation-software-comparison?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=ai-ocr"><em>The Best AP Automation Software</em></a><em> ·</em></p><p><em>What’s the document type that’s given your OCR the most trouble, and what eventually fixed it? Drop it in the comments.</em></p><p><strong>Tags:</strong> Artificial Intelligence · Machine Learning · Document Processing · Automation · Fintech</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a6c5e810a49" width="1" height="1" alt=""><hr><p><a href="https://medium.com/docsumo/what-ai-ocr-actually-does-and-why-98-accuracy-is-the-wrong-number-to-track-5a6c5e810a49">What AI OCR Actually Does (And Why “98% Accuracy” Is the Wrong Number to Track)</a> was originally published in <a href="https://medium.com/docsumo">Docsumo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IDP vs OCR vs Document AI vs Agentic Processing: How to Actually Choose in 2026]]></title>
            <link>https://medium.com/docsumo/idp-vs-ocr-vs-document-ai-vs-agentic-processing-how-to-actually-choose-in-2026-7f421a5a8140?source=rss-0d50e8a52cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f421a5a8140</guid>
            <category><![CDATA[document-intelligence]]></category>
            <category><![CDATA[idp]]></category>
            <category><![CDATA[ocr]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[document-ai]]></category>
            <dc:creator><![CDATA[Sagnik Chakraborty]]></dc:creator>
            <pubDate>Mon, 11 May 2026 17:45:42 GMT</pubDate>
            <atom:updated>2026-05-11T17:45:42.945Z</atom:updated>
            <content:encoded><![CDATA[<p>OCR, IDP, Document AI, and agentic document processing are not four competing products. They are four generations of the same underlying capability, each solving the limitations of what came before.</p><p><strong>TL;DR:</strong> The right way to choose in 2026 is not to compare feature lists but to identify which generation your problem actually requires — and then not overbuy or underbuy from there. To understand the comprehensive decision framework, comparison table, and the cost of getting it wrong, <a href="https://www.docsumo.com/blog/difference-between-idp-ocr-document-ai-agentic-workflows?utm_source=medium&amp;utm_medium=article-cta">read this guide</a>.</p><p>A finance director at a regional bank recently described her vendor selection process: “We asked five vendors what they were selling. Two said OCR. Two said IDP. One said Document AI. After the demos, we couldn’t tell the difference between any of them.”</p><p>That experience is not unusual. The vocabulary around document automation has been stretched so far by marketing that the same underlying product gets sold under four different names depending on who’s in the room. An AP team gets the OCR pitch. A digital transformation team gets the Document AI pitch. An AI-forward buyer gets the agentic pitch.</p><p>This piece cuts through that. These are four generations of the same capability, each solving the limitations of what came before.</p><h3>Generation 1: OCR</h3><p><strong>Optical Character Recognition</strong> converts image-based text into machine-readable characters. It answers one question: what characters are on this page? Nothing more.</p><p>Modern AI-powered OCR reaches 98–99% accuracy on printed text in clean, high-resolution scans. In production, on real enterprise document batches — faxed, photographed with smartphones, printed on colored paper, scanned on a machine last calibrated in 2019 — accuracy commonly runs 80–90%. And accuracy is only part of the problem. OCR outputs a text string. It cannot classify documents, cannot understand field relationships, and cannot distinguish a purchase order number from a payment term. Every downstream interpretation is still a human problem.</p><p>OCR still makes sense for archive digitization, basic transcription tasks, and as the character-recognition layer inside more capable systems. But it is a component, not a solution for document workflows.</p><h3>Generation 2: IDP</h3><p><strong>Intelligent Document Processing</strong> added ML classification, NLP, and structured field extraction on top of OCR. IDP answers: what data is in this document, and where does it go? An invoice through an IDP system comes out with Invoice Number, Vendor Name, Due Date, and Total Amount labeled, validated, and ready to write to an ERP.</p><p>The problem IDP solved: turning OCR’s unstructured text string into a structured data record. The problem IDP left open: template dependency. Traditional IDP required configuration per document type — days to weeks of setup for each new supplier, payer, or regulatory format. Every addition creates a perpetual configuration backlog. And IDP processes each document in isolation — it cannot compare income figures across a W-2, bank statement, and tax return in the same loan file.</p><h3>Generation 3: Document AI</h3><p><strong>Document AI</strong> is the hyperscaler category — Google Document AI, Amazon Textract, Microsoft Azure Form Recognizer — plus the broader class of API-accessible AI document tools. Pre-trained models for common document types eliminated the template problem for standard formats: invoices, receipts, W-2s, ID cards, and bank statements that work without per-type configuration.</p><p>What Document AI didn’t solve: industry-specific and custom documents still require training, reintroducing the configuration burden. More critically, hyperscaler APIs process one document at a time. They have no concept of a case file — multiple related documents that need validating against each other. They return structured output but manage none of the surrounding workflow: exception routing, human review queues, completeness checks, or audit trails.</p><h3>Generation 4: Agentic document processing</h3><p><strong>Agentic document processing</strong> is the current generation. AI agents autonomously plan, execute, validate, and route multi-step document workflows without templates or fixed rules. It answers: how do I automate the entire document workflow, including the judgment calls, without pre-configuring every document type?</p><p>Two capabilities make it genuinely different from everything before: <strong>cross-document reasoning</strong> (understanding that a bank statement, a W-2, and a tax return belong to the same loan file, and validating them against each other), and <strong>self-improvement</strong> (reviewer corrections feed back into the model, compounding accuracy over time on your specific document mix). The agent is not a processing step in a larger workflow — it is the workflow.</p><h3>The four technologies compared</h3><p>Dimension OCR Traditional IDP Document AI API Agentic IDP Template required None Per document type None (standard types) None New document setup Immediate (text only) Days to weeks Immediate (standard) Immediate; improves over 60–90 days Layout variation Poor Moderate Good (standard types) Strong Cross-document reasoning None None None Native Self-improvement None Manual retraining Vendor updates Active learning from corrections Workflow orchestration None Partial None Full end-to-end Compliance audit trail None Partial Limited Full, field-level Accuracy, clean documents 98–99% 90–95% (trained types) 90–95% (standard) 95%+ improving Accuracy, complex or novel 80–90% 70–85% (untrained) 75–90% 90%+ improving</p><h3>The four questions that determine which generation fits</h3><p><strong>Question 1: Document type complexity.</strong> One to five stable document types processed independently? Traditional IDP or Document AI APIs are appropriate. Twenty or more types with layout variation, or multi-document workflows requiring cross-document validation? Agentic is the correct architecture — not because it’s newer, but because the prior generations cannot natively handle the cross-document reasoning the workflow requires.</p><p><strong>Question 2: Do you need cross-document validation?</strong> If your workflow requires comparing data across documents in the same case — mortgage underwriting, insurance underwriting, financial due diligence, clinical documentation review — only agentic systems handle this natively. It cannot be bolted onto traditional IDP or a Document AI API. It requires a reasoning layer that only the current generation provides.</p><p><strong>Question 3: How often do your document types change?</strong> Stable supplier base, consistent regulatory formats — traditional IDP’s configuration overhead amortizes over time. Frequent new suppliers, new regulatory formats, diverse client documents across markets — the recurring configuration cost becomes prohibitive. Agentic systems adapt to new document types without reconfiguration.</p><p><strong>Question 4: What are your compliance and audit requirements?</strong> Hyperscaler APIs require careful review of data residency, subprocessor agreements, and retention policies before regulated deployment. Purpose-built platforms like <a href="https://www.docsumo.com/solutions/intelligent-document-processing-platform?utm_source=medium&amp;utm_medium=article-cta">Docsumo’s enterprise IDP platform</a> include SOC 2 Type 2, GDPR, and HIPAA compliance as baseline infrastructure, with field-level audit trails that satisfy regulatory examination requirements.</p><h3>What getting the generation wrong actually costs</h3><p>Mortgage origination costs average $11,600 per loan, <a href="https://www.anaptyss.com/blog/reducing-document-processing-costs-lending-credit/">up 35% in three years</a>, with personnel representing 67% of that figure — the downstream labor that OCR and template-based IDP don’t eliminate. <a href="https://www.newswire.com/news/loanlogics-data-reveals-11-5-error-rate-across-mortgage-industry-over-22616998">LoanLogics data</a> put the mortgage industry’s combined error rate from manual document processing at 11.4%, translating to an estimated $7.8 billion in elevated consumer costs annually.</p><p>In accounts payable, <a href="https://markets.financialcontent.com/stocks/article/bizwire-2026-3-19-the-hackett-group-study-shows-ai-adoption-rapidly-accelerating-across-core-finance-processes">The Hackett Group’s 2026 Finance Key Issues Study</a> found that Digital World Class organizations achieve 42% lower cost per invoice than average operations — a gap that’s widening as 33% of organizations scale AI specifically for AP. <a href="https://my.idc.com/getdoc.jsp?containerId=US53014125">IDC</a> projects the IDP market growing at a 29.6% CAGR from 2025 to 2029, a rate that reflects how rapidly cross-document automation is becoming a baseline expectation rather than a differentiator.</p><p>Those gaps don’t close with OCR. They close when the generation of tooling matches the complexity of the problem.</p><h3>The decision matrix</h3><p>Your scenario Recommended choice Diverse document types, regulated industry, cross-doc validation needed Agentic document processing Mortgage or insurance underwriting Agentic IDP (cross-doc reasoning is essential) Healthcare prior auth or clinical documentation Agentic IDP (highest accuracy requirements) High volume, diverse suppliers, AP or AR focus Agentic IDP Standard types, cloud-native team, basic compliance Document AI API (Google, AWS, Azure) Simple, stable document types, basic compliance Traditional IDP or Document AI API Existing OCR investment, limited budget, stable formats Upgrade to AI OCR as a bridge Archive digitization only OCR</p><h3>What Docsumo covers across the full stack</h3><p><a href="https://www.docsumo.com/?utm_source=medium&amp;utm_medium=article&amp;utm_content=blog-idp-ocr-docai-agentic-doc-processing">Docsumo</a> is the production-grade IDP platform built for the agentic AI era. It spans from <a href="https://www.docsumo.com/blog/what-is-ai-ocr?utm_source=medium&amp;utm_medium=article-cta">AI OCR</a> to <a href="https://www.docsumo.com/blog/what-is-agentic-document-workflows?utm_source=medium&amp;utm_medium=article-cta">agentic document workflows</a>, processing 150+ document types with 99%+ accuracy. Cross-document validation catches relational inconsistencies across a full case file — the kind that single-document processing can’t surface. Human-in-the-loop review with corrections feeding back into the model. Pre-built integrations with major LOS, CRM, and ERP systems. SOC 2 Type II, GDPR, HIPAA certified. Used by 10,000+ businesses in production.</p><p>The <a href="https://www.docsumo.com/blog/difference-between-idp-ocr-document-ai-agentic-workflows?utm_source=medium&amp;utm_medium=article-cta">comprehensive guide</a> on what is the difference between Intelligent Document Processing, OCR, Document AI, and Agentic Document Processing covers the 12-dimension comparison, industry-specific guidance for financial services, AP, healthcare, and insurance, the migration path from OCR to agentic, and the five most common mistakes in technology selection — including why evaluating accuracy on vendor-provided test documents is the one that bites most buyers.</p><p><em>Docsumo is the production-grade IDP platform built for the agentic AI era — LLM-augmented extraction, cross-document validation, and governed integrations built for the precision and governance finance and operations teams require. Used by 10,000+ businesses in production. </em><a href="https://app.docsumo.com/signup?utm_source=medium&amp;utm_medium=article-cta&amp;utm_content=idp-ocr-docai-agentic-doc-processing"><em>Build your first agentic workflow today</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f421a5a8140" width="1" height="1" alt=""><hr><p><a href="https://medium.com/docsumo/idp-vs-ocr-vs-document-ai-vs-agentic-processing-how-to-actually-choose-in-2026-7f421a5a8140">IDP vs OCR vs Document AI vs Agentic Processing: How to Actually Choose in 2026</a> was originally published in <a href="https://medium.com/docsumo">Docsumo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What are Agentic Document Workflows: Insights from Teams Who’ve Actually Shipped Them]]></title>
            <link>https://medium.com/docsumo/what-are-agentic-document-workflows-insights-from-teams-whove-actually-shipped-them-823eda5d904a?source=rss-0d50e8a52cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/823eda5d904a</guid>
            <category><![CDATA[document-processing]]></category>
            <category><![CDATA[agentic-workflow]]></category>
            <category><![CDATA[document-management]]></category>
            <category><![CDATA[document-automation]]></category>
            <category><![CDATA[agentic-document-workflow]]></category>
            <dc:creator><![CDATA[Sagnik Chakraborty]]></dc:creator>
            <pubDate>Sat, 09 May 2026 16:42:10 GMT</pubDate>
            <atom:updated>2026-05-09T16:58:33.014Z</atom:updated>
            <content:encoded><![CDATA[<p>Agentic document workflows go further than traditional IDP by embedding reasoning and action into the same system that does extraction. Traditional IDP hands you structured data and stops.</p><h3><strong>TL;DR:</strong></h3><p>An agentic workflow extracts, validates across multiple documents, and routes the outcome — approvals, escalations, system updates — without waiting for a human to orchestrate each handoff. The gap between those two models is where most document automation ROI lives. For the full production guide, read <a href="https://www.docsumo.com/blog/what-is-agentic-document-workflows?utm_source=medium&amp;utm_medium=article">this breakdown of agentic document workflows</a>.</p><p>A loan operations team at a regional lender had a standing problem: 47 unreviewed loan files by end of day, each between 80 and 300 pages. The processor’s job was data plumbing. Open a bank statement. Cross-reference it against the tax return. Copy transaction totals into the origination system. Check whether the income figures on three different documents roughly agree. The documents had all been extracted. Every PDF was digitized. The data was right there. But the decisions about what that data meant, whether it was consistent, and what should happen next still required a human sitting in between two monitors for three hours.</p><p>That gap is exactly what agentic document workflows were built to close.</p><h3>What makes a document workflow agentic</h3><p>The definition that matters operationally: an agentic document workflow is a system where AI agents autonomously plan, execute, and adapt document processing tasks from intake to final decision. Unlike traditional automation that follows fixed rules, agentic workflows use large language models to reason about document content, choose which tools to call, and adjust based on what they find.</p><p>The GPS analogy explains it better than a definition can. Printed directions fail the moment you miss a turn. GPS recalculates. An agentic workflow observes the document, plans extraction steps, runs them, and loops back when something doesn’t match expectations.</p><p>Four capabilities work together to make a workflow genuinely agentic rather than just faster automation: document understanding (classifying types and parsing layouts automatically), <a href="https://www.docsumo.com/platform/capabilities/data-extraction?utm_source=medium&amp;utm_medium=article">data extraction</a> (pulling structured fields from unstructured content), <a href="https://www.docsumo.com/blog/cross-field-reasoning?utm_source=medium&amp;utm_medium=article">cross-document reasoning</a> (comparing values across multiple files in a single case), and action execution (triggering approvals, escalations, or system updates based on findings). The loan underwriting scenario is the clearest example: the agent receives paystubs, bank statements, and tax returns, extracts income from all three, checks whether the numbers align, flags discrepancies, and routes the case — without a human defining every conditional branch in advance.</p><h3>How this differs from traditional IDP</h3><p>Traditional intelligent document processing platforms are good at extraction but stop there. They capture data, validate it against a schema, and hand it off. What happens next lives somewhere else: a BPM tool, an RPA bot, or a manual queue. The workflow logic is always external.</p><p>Agentic workflows collapse that separation. The same system that extracts data also decides what to do with it.</p><p>Aspect Traditional IDP Agentic Document Workflow Workflow logic External (BPM, RPA, manual) Built into the agent Adaptation Rule changes require reconfiguration Agent adjusts based on context Multi-document handling Sequential, isolated processing <a href="https://www.docsumo.com/blog/cross-document-linking?utm_source=medium&amp;utm_medium=article">cross-document reasoning</a> is native Exception handling Route to human queue Agent attempts resolution first Decision authority Human or downstream system Agent can approve, escalate, or act</p><p>The practical consequence: fewer integration points. A traditional IDP stack typically involves five separate tools to handle intake, extraction, routing, review, and ERP synchronization. An agentic workflow handles the entire sequence, and the handoffs between stages don’t require manual stitching.</p><p><a href="https://joget.com/ai-agent-adoption-in-2026-what-the-analysts-data-shows/">Gartner projects</a> that 40% of enterprise applications will include task-specific AI agents by end of 2026, up from less than 5% just a year earlier. But research also finds that only 11% of enterprises currently run AI agents in production, despite 79% claiming some level of adoption. The gap between claim and production reality comes down to the failure modes that demos never show.</p><h3>The components that determine production reliability</h3><p><strong>Cross-document validation and reconciliation</strong> is where agentic workflows deliver their highest value. Most document processing treats files in isolation. Agentic workflows reason across an entire case. In accounts payable, three-way matching means the invoice, purchase order, and goods receipt all need to align. An agentic workflow extracts data from each, compares quantities and amounts, identifies discrepancies, and determines whether they fall within tolerance or require review — automatically and with a full audit record.</p><p>Common reconciliation patterns include identity consistency (does the borrower name on the paystub match the bank statement?), numerical tolerance checks (is the invoice total within 2% of the PO amount?), completeness checks (are all required documents present before proceeding?), and temporal validation (are document dates within acceptable ranges?). <a href="https://www.docsumo.com/glossary/data-validation?utm_source=medium&amp;utm_medium=article">Docsumo’s validation layer</a> supports configurable cross-document checks with two-way data matching, so teams define reconciliation rules without writing custom code.</p><p><strong>Confidence thresholds and </strong><a href="https://www.docsumo.com/blog/human-in-the-loop-review?utm_source=medium&amp;utm_medium=article"><strong>human-in-the-loop routing</strong></a> determine when automation proceeds and when human review kicks in. Too high a threshold and too many documents get routed to manual queues — defeating the purpose. Too low and bad data flows downstream. Effective threshold tuning starts at the field level. A misspelled vendor name might be acceptable at 80% confidence. An incorrect payment amount is not. <a href="https://www.docsumo.com/platform/capabilities/document-review?utm_source=medium&amp;utm_medium=article">Docsumo’s case management</a> groups related documents with confidence-based queues, giving reviewers the original document, extracted values, confidence scores, and validation results in a single view.</p><p><strong>Audit trails and governance</strong> become non-negotiable in regulated industries. When an auditor asks why the system approved a case, the answer must reconstruct the full decision path, including input document versions, model versions used, extracted values with confidence scores, validation rules applied, exceptions raised and resolved, reviewer actions, final decision timestamp, and downstream actions triggered. Docsumo provides <a href="https://www.docsumo.com/blog/audit-trails?utm_source=medium&amp;utm_medium=article">audit trails</a> with granular <a href="http://docsumo.com/blog/role-based-access-control?utm_source=medium&amp;utm_medium=article">role-based access controls</a>, supporting SOC 2 Type 2, GDPR, and HIPAA compliance requirements.</p><h3>Where agentic workflows fail in production</h3><p>The failure modes are predictable. Knowing them in advance shapes guardrail design.</p><p><strong>Layout drift</strong> is the most common silent failure. A vendor changes their invoice template. The extraction model, trained on the old layout, produces wrong field values. A sudden drop in extraction confidence over time is the signal — but only if you’re monitoring it.</p><p><strong>Reasoning hallucinations</strong> are specific to LLM-based workflows. The model reasons its way to a plausible-sounding but incorrect conclusion. Cross-document validation catches some hallucinations. Constraining the agent’s action space and requiring explicit evidence for decisions reduces risk considerably.</p><p><strong>State corruption in event-driven systems.</strong> A failed processing step can leave a case in an inconsistent state. Idempotent operations and transactional state updates prevent partial failures from cascading into downstream systems.</p><p><strong>Reference data staleness.</strong> The agent tries to validate against a purchase order that hasn’t synced from the ERP yet. Retry logic, pending states, or human escalation prevents false rejections — but only if the workflow was designed with this failure mode in mind.</p><h3>Build versus buy: who actually owns this problem</h3><p>Frameworks like LlamaIndex and LangChain provide solid scaffolding for building agentic workflows. For teams with strong engineering resources and genuinely unique requirements, building is viable. Building also means owning extraction model training, document boundary detection, cross-document validation logic, confidence threshold tuning, review interface development, audit trail implementation, integration connectors, and production monitoring — indefinitely.</p><p>For most enterprise operations teams, the build-versus-buy calculus favors platforms. The differentiation comes from business rules and workflows, not from reimplementing document parsing.</p><p>Docsumo offers pre-trained models across 100+ document types, configurable validation logic, case management with confidence-based routing, and pre-built integrations — letting teams focus on workflow design rather than infrastructure. LLM-augmented extraction that handles novel layouts without templates. Three-tier integration — pre-built connectors, REST API, webhook support — so validated data reaches ERPs and core systems without manual handling. SOC 2 Type II, GDPR, HIPAA certified.</p><p>The operational framing from <a href="https://www.docsumo.com/blog/what-is-agentic-document-workflows?utm_source=medium&amp;utm_medium=article">Docsumo’s full guide on agentic document workflows</a>: the goal isn’t full autonomy on day one. It’s progressively reducing human touches while maintaining accuracy and auditability. A practical starting point is a single high-volume, well-defined workflow. Instrument everything. Tune thresholds based on actual exception rates and downstream error costs. Expand the scope only after proving reliability in production.</p><p><a href="https://www.docsumo.com/?utm_source=medium&amp;utm_medium=article&amp;utm_content=agentic-document-workflows"><em>Docsumo</em></a><em> is the production-grade IDP platform built for the agentic AI era — LLM-augmented extraction, cross-document validation, and governed integrations built for the precision and governance finance and operations teams require. Used by 10,000+ businesses in production.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=823eda5d904a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/docsumo/what-are-agentic-document-workflows-insights-from-teams-whove-actually-shipped-them-823eda5d904a">What are Agentic Document Workflows: Insights from Teams Who’ve Actually Shipped Them</a> was originally published in <a href="https://medium.com/docsumo">Docsumo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>