← Back to Projects Document AI Agent with OCR + LLM
Extract structured data from PDFs and scanned documents using OCR, layout analysis, NLP, vision/LLM assistance, confidence-aware validation, and human-in-the-loop review.
Categories
Agentic AIDocument AIGenAI
Tech Used
PythonDocument AIOCROpenAIVision APIGCPOpenCVNLPNERspaCyRegexpandasFastAPIFlaskHTMLCSSDockerAWS
Problem
Organizations receive PDFs and scanned documents with inconsistent layouts, noisy images, fragmented fields, and changing templates. Fully manual extraction is expensive, while rigid automation can fail when document structure changes or uncertain fields require human judgment.
Approach
- Built a reusable Document AI pipeline combining OCR, layout analysis, field detection, and document preprocessing
- Located candidate information regions using OCR and layout-aware heuristics
- Applied rule-based parsing, NLP, NER, vision APIs, and machine-learning methods where each approach was most effective
- Extracted structured entities such as names, addresses, identifiers, key-value fields, and other business data
- Normalized and validated extracted values before producing structured JSON and CSV outputs
- Added confidence-aware validation and a human-review interface for correcting uncertain extractions
- Prepared reviewed outputs for downstream APIs, analytics systems, databases, and business automation
- Designed the workflow to remain reusable across multiple document templates and scan-quality conditions
Results
- Created an end-to-end Document AI workflow from scanned input to validated structured data
- Reduced manual effort required to convert unstructured documents into application-ready information
- Added a human-in-the-loop review path for higher-confidence operational use
- Improved adaptability across noisy scans, changing layouts, and multiple document variants
- Produced integration-ready outputs suitable for APIs, analytics, internal software systems, and automation workflows
Screenshots