Skip to main content
PreviewAgent Builder is currently in preview and may change before general availability.
The AI comparison and reconciliation pattern uses TEXT_UNDERSTANDING nodes as comparison agents to perform field-by-field validation between AI-extracted data and expected values from a system of record. The output is a structured exception report that drives downstream routing: auto-approve, human review, or reject.

When to use

Use this pattern when you need to:
  • Validate AI-extracted document data against a trusted source (TMS, ERP, core banking system, database)
  • Produce auditable, structured comparison results with per-field match status
  • Route exceptions based on severity and overall match rate
  • Replace manual spot-checking of document extraction results
This pattern typically follows the fan-out extraction pattern in a document processing pipeline.

Architecture

The workflow accepts two data sets as input, runs them through a TEXT_UNDERSTANDING comparison agent, and routes the result based on the exception report.
Node breakdown:

Implementation

Input structure

The comparison node receives two objects: the AI-extracted values and the system-of-record values.

Comparison prompt

Configure the TEXT_UNDERSTANDING node with a prompt that instructs the LLM to perform structured comparison.

Output schema

Define the output schema on the TEXT_UNDERSTANDING node to enforce structured results.

Severity routing

Configure a Condition node after the comparison to route based on the exception report.
Adjust the match rate thresholds based on your business requirements. Start conservative (higher thresholds for auto-approve) and relax them as you gain confidence in extraction quality.

Configuration reference


Exception severity levels


Variations

Threshold-based routing

Instead of fixed severity categories, use configurable thresholds stored in a FlowX Database data source. This allows business users to adjust auto-approve and reject boundaries without modifying the workflow.

Multi-document cross-reference

Extend the pattern to compare fields across multiple documents in the same shipment. For example, verify that the total weight on the bill of lading matches the sum of weights on the packing list and that both align with the commercial invoice.

Audit trail generation

Add a downstream node that persists the full exception report (including all MATCH results) to a database or document store. This provides a complete audit trail for compliance and quality monitoring over time.

AI patterns overview

All available AI patterns and how to combine them

Fan-out extraction

Classify and extract from multiple document types

Hybrid AI + business rules

Combine AI with deterministic logic for auditable decisions

AI node types

Reference for all AI node types including TEXT_UNDERSTANDING
Last modified on July 8, 2026