Agent "Fixes" Correct Data and Corrupts It: Causes and Fixes
The agent's own error-recovery step corrects a value that wasn't actually wrong, corrupting good data to satisfy a validation check
46 patterns in this category
AI agents that process documents most often fail not at reading text, but at trusting the extracted text — bad OCR characters, lost table and column structure, hallucinated field values from vision-language models, and silent accuracy regressions once a pipeline reaches production. Because document-processing agents typically sit upstream of a payment, claims, or contract system, document-processing failures are rarely visible at the point of extraction; a failure surfaces later as a wrong value in a downstream system.
| Goal | Covers | Patterns |
|---|---|---|
| Accurate Text Extraction | Character-level OCR/VLM accuracy under noise, ambiguity, and interference | 8 |
| Agentic Orchestration | Agent reasoning over document content — context limits, tool errors, conflicting fields | 8 |
| Document Classification | Identifying, splitting, and routing documents before extraction begins | 6 |
| Layout Preservation | Tables, columns, reading order, and structure surviving extraction | 6 |
| Multimodal Reliability | VLM hallucination and confidence-calibration failures | 10 |
| Production Reliability | Accuracy stability at scale, across sources, and over time | 10 |
Total: 48 patterns
Document Classification runs first. Accurate Text Extraction and Layout Preservation run next, in parallel. Multimodal Reliability governs trust in vision-language-model-based extraction. Agentic Orchestration handles reasoning over the extracted document content. Production Reliability applies across every other goal once the document-processing pipeline is live. To localize an incident by symptom: garbled or wrong text → Accurate Text Extraction; text is correct but structure is lost → Layout Preservation; confidently wrong vision-language-model output → Multimodal Reliability; an agent loses track of multi-page or multi-field context → Agentic Orchestration; a pipeline works in staging but degrades in production → Production Reliability.
Document classification failures happen before extraction — a pipeline misidentifies, mis-splits, or misroutes a document, such as failing to detect a blank page or an embedded sub-document. Text extraction failures happen after a document is correctly identified, when the OCR or vision-language model misreads the actual characters. See Document Classification and Accurate Text Extraction.
Rarely. Most document-processing patterns are architectural gaps — missing validation, no confidence-gated review, no template-drift monitoring — rather than pure model-capability problems. A stronger model reduces incidence but does not remove the need for preprocessing, validation, and monitoring architecture.
Match the symptom to the goal: garbled or wrong characters → Accurate Text Extraction; correct characters but scrambled structure → Layout Preservation; confidently wrong values from a vision-language model → Multimodal Reliability; an agent losing track of multi-page context → Agentic Orchestration; a pipeline that works in staging but degrades in production → Production Reliability.
Agentic document processing shares the same underlying image-quality and character-recognition problems as classical OCR, but agentic document processing adds failure surface classical OCR pipelines do not have: an agent reasoning over extracted content across a long document, calling tools into other systems, and orchestrating multi-step document workflows without human correction at every step.
The agent's own error-recovery step corrects a value that wasn't actually wrong, corrupting good data to satisfy a validation check
Agent Extracts Fields Using a Schema That Doesn't Match the Document's Template Version
Agent Misclassifies Documents That Share Near-Identical Layouts
Agent Swallows Attachments and Embedded Documents Into the Parent Document's Classification
The same field appears in multiple document locations with conflicting values, and the agent grabs the first or an arbitrary occurrence instead of the authoritative one
Quality Filter Rejects Readable Documents as "Unreadable"
The agent mistranslates its own document understanding into tool call parameters, silently extracting from the wrong page or region
The agent struggles on free-form correspondence and narrative documents where key information isn't in a labeled field
Long documents exceed the agent's context window, so naive chunking breaks cross-references and the agent loses track of earlier content
The agent's reasoning chain is logically sound, but it operates on a misread input value, so the final answer is wrong despite correct reasoning
Input Quality Gap — Real Documents Are Messier Than Benchmark Documents
Attribute Hallucination — Model Reads the Right Field but the Wrong Value
Fabricated Content Not Grounded in Input
Performance Collapse Under Visual Noise
Extraction Guesses Wrong Without Sender, Locale, or Historical Context
Overconfident Wrong Answers — Model Confidence Doesn't Track Accuracy
Plausible but Wrong Outputs — Errors That Never Trip an Alarm
Batch Processing Timing Failures — Arrival Order Isn't Logical Order
Cell Omission and Merging — Empty Cells Cause Column Drift
Extracted Data Lands in the Wrong ERP Fields
Merged Cell and Nested Header Failures
Object Hallucination — Model Populates Fields the Document Never Contained
Relational Hallucination — Values Attached to the Wrong Header
Accuracy Regression Undetected — A Bad Deploy Ships Silently
Agent Classifies Blank or Near-Blank Pages as Real Documents
Extraction Completes Successfully but the Data Relationships Are Wrong
Preprocessing Strips Layout Structure Before Extraction Ever Runs
Agent Appends Footnotes as Inline Text Instead of Linking Them to Their Reference
Agent Interleaves Repeating Headers/Footers Into Body Content
Poorly Calibrated Confidence Thresholds Flood the Review Queue
Document Format Diversity Overwhelms Rule-Based Extraction
Agent Flattens Spanning Headers and Merged Cells Into a Grid, Destroying Parent-Child Structure
Agent Interleaves Text From Different Columns Into Nonsensical Output
Agent Groups Batch-Scanned Pages Into the Wrong Documents
OCR swaps visually similar characters (0/O, 1/l/I, 5/S, 8/B), so extracted IDs and codes look right but are wrong
OCR/ICR returns garbled or nonsensical text on handwritten form fields and signatures
Low DPI scans, faxes, and compressed mobile photos produce fragmented, unreadable OCR output
OCR mixes watermark and background pixels into the extracted text, producing garbled characters
OCR fails on decorative fonts, stylized brand typography, and logos, consistently misreading the same sources
Physical stamps and handwritten annotations overlap printed text, so OCR interleaves both into a corrupted field
Skewed, rotated, or angled document photos cause OCR to merge adjacent lines into scrambled text
OCR misreads punctuation — decimals become commas, currency symbols drop, dashes get interchanged — silently corrupting parsed amounts
A Single Extraction Error Cascades Across Downstream Systems
Agent Extracts Right-to-Left and Mixed-Direction Text Reversed or Jumbled
Agent Extracts Table Data as Continuous Text Instead of Rows and Columns
A Vendor Changes Their Document Template and Extraction Silently Breaks