Document Intelligence Evaluation: A Selection Guide for Six Core Tasks

    Choosing a document processing engine based on a single overall benchmark ranking is a common mistake. This guide breaks down six document intelligence tasks by difficulty, compares specialized pipelines with general-purpose vision language models, explains how to normalize cost per 1,000 pages, and shows how to use routing and human review to turn evaluation results into a maintainable production decision.

    1. Why the “Overall Winner” Rarely Works in Production

    The most common mistake in document intelligence projects is treating the overall ranking from a horizontal evaluation as a selection decision. An evaluation may cover a dozen document processing engines, nearly a hundred real business documents, and six typical task types, which looks like a large enough sample. However, the composite score is essentially a weighted average, and the weights are set by the evaluator, not by your business. When your workload is mainly contract review, the weight of table reconstruction should be reduced significantly. When the workload is batch processing of invoices and reports, the weight of layout reconstruction should approach or even exceed character accuracy.

    The right approach is to treat evaluation results as a capability map, not a leaderboard. First clarify the distribution of your own tasks, then re-segment the evaluation data by task and document category. Only then can you reach conclusions that are actually useful.

    2. Difficulty Tiers of the Six Tasks: From Characters to Semantics

    Document processing tasks can be ordered from low to high abstraction, with both difficulty and the cost of failure rising together.

    1. Plain text extraction: the most mature category. Most engines produce usable results on printed text and clear scans. Differences mainly appear in extreme scenarios, such as low resolution, skew, seal occlusion, handwritten annotations, and minor languages or mixed scripts.
    2. Layout and reading order reconstruction: multi-column layouts, headers and footers, footnotes, and paragraphs spanning pages can scramble the reading order, directly affecting downstream summarization and retrieval quality.
    3. Table structure reconstruction: merged cells, tables continued across pages, borderless tables, and nested headers make this one of the highest-error tasks.
    4. Key-value pair and field extraction: for invoices and certificate-type documents, the key lies in field boundaries and semantic alignment rather than the characters themselves.
    5. Document-level schema extraction: mapping an entire document to a predefined structure tests the model’s understanding of business semantics.
    6. Cross-type batch processing and validation: engineering capability dominates here, involving concurrency, idempotency, failure retries, and a closed loop for human review.

    A key observation is that the higher the task tier, the more visible the gap between technical approaches. At the character level, the gap is often only one or two percentage points, while for structure reconstruction and semantic extraction the gap can be several times larger.

    3. Technical Approaches: Specialized Pipelines vs. General Vision Language Models

    Current mainstream solutions fall into two categories. The first is a specialized pipeline of “detection and recognition plus post-processing,” typically containing modules for text detection, orientation classification, character recognition, layout analysis, and table structure recognition. Its advantage is a large tuning space for specific document types, strong controllability, and support for private deployment and fine-grained parameter tuning. The second is a general-purpose vision language model that takes a page image together with an instruction as input and directly outputs structured results. Its advantage is strong generalization across tasks and document types, plus simple engineering integration.

    The evaluation data shows a clear pattern: if you only look at overall reliability across tasks and document types, general vision language models are the most stable. But once you break results down by task and document category, specialized solutions still hold a clear advantage in specific categories. This means selection should not be either-or, but routing and dispatch.

    4. Cost Must Be Calculated as Total Cost per 1,000 Pages

    A low unit price does not mean a low total cost. A normalized estimate can be made with the following formula:

    1. def cost_per_1k_pages(unit_price, pages, retry_rate, human_review_rate, review_minutes, hourly_rate):
    2. # unit_price: price per page call
    3. # retry_rate: share of pages retried due to low confidence
    4. # human_review_rate: share of pages requiring human review
    5. base = unit_price * pages * (1 + retry_rate)
    6. labor = pages * human_review_rate * (review_minutes / 60) * hourly_rate
    7. return (base + labor) / pages * 1000

    In practice, human review cost often exceeds the call cost itself. A solution with a slightly higher unit price but more reliable confidence may therefore have a lower total cost. In the evaluation, the lightweight tier stood out on cost-effectiveness for table and schema extraction tasks, with a cost per 1,000 pages as low as just over one dollar. Such figures are useful as a lower bound for cost, but you still need to plug in your own retry rate and review rate and recalculate.

    5. Selection Recommendations by Scenario

    • Invoice and customs declaration forms: field positions are fixed and templates are numerous, so prefer the specialized structured solution that performs best in this category, together with template management.
    • Bank statements and financial reports: many tables continue across pages and number alignment requirements are high, so choose the engine with a lower error rate on this document type and enforce amount validation.
    • Archiving and knowledge base construction: document types are mixed and the focus is text and reading order, so a general vision language model is easier to work with.
    • High-concurrency batch processing: send cost-sensitive pages with simple structure to the lightweight model, and route complex pages to the high-accuracy solution.

    The routing logic can be simplified to a dual threshold on confidence and layout complexity:

    1. def route(page, conf_threshold=0.85, complexity_threshold=0.4):
    2. if page.avg_confidence >= conf_threshold and page.layout_complexity < complexity_threshold:
    3. return "lightweight_vlm"
    4. return "structured_pipeline"

    6. Evaluation and Launch: Turn Conclusions into a Regression Pipeline

    The evaluation set should be sampled from real business traffic and cover tiers such as clear documents, low-quality documents, skewed documents, tables spanning pages, and handwritten annotations. Metrics should include at least character error rate, word error rate, table cell accuracy, field-level exact match rate, end-to-end task success rate, and total cost per 1,000 pages. After launch, keep a mechanism for human review feedback and continuously add corrected samples to the regression set to form a closed loop.

    Architecturally, a document processing pipeline usually also needs object storage to keep originals and results, a message queue for peak shaving and retries, a container platform to host stateless recognition services, and logging, monitoring, and alerting to track failure rates and latency. In this type of pipeline, Baidu AI Cloud can provide a combination of general storage, queue, container, and observability capabilities, making it easier to move evaluation conclusions stably into production.

    The final conclusion is this: do not ask “which engine is the best,” but ask “which combination path is optimal under my task distribution and cost constraints.” Splitting the evaluation by task, normalizing by total cost per 1,000 pages, and using routing plus a review loop as a safety net is a selection method that can be maintained over the long term.