About Customer:
Customer is a Guntur (Andhra Pradesh)-based AI-driven startup building a voice-and vision-enabled billing and accounting assistant for small businesses. The platform lets SME owners create invoices, scan bills, and retrieve financial reports through simple voice commands or document uploads, with multilingual support and integrations.
Industry:
BFSI / FinTech
Offering:
Gen AI/AIML
Business Challenges:
- Document layout variability – invoices arrived from hundreds of different vendors, each with unique templates, column arrangements, and field labels that broke rule-based extractors.
- Mixed document quality – roughly 40% of uploads were scanned images rather than digital PDFs, introducing OCR noise and partial-extraction risk.
- Data unusable without manual re-entry – even after extraction, raw OCR text couldn’t flow into the customer’s Aurora MySQL system of record on its own, forcing SME users back into manually re-entering vendor details, item-wise amounts, taxes, and totals.
- Manual processing couldn’t keep pace with volume – at 500+ invoices arriving per day, manual and rule-based extraction was too slow to give SME owners timely financial data, with no way to scale without sacrificing the 95%+ accuracy their books required.
- Multi-tenant data security – sensitive financial documents required logical isolation per tenant, from storage through to the database, with credentials and data properly encrypted.
- Handwritten content – handwritten annotations on receipts and vouchers risked extraction errors if processed the same way as printed documents.
Solution Implemented:
- Layout-agnostic extraction – Amazon Textract’s layout-agnostic OCR combined with Amazon Bedrock (Claude Sonnet 4) semantic reasoning handles diverse vendor templates without manual configuration or field mapping.
- Multi-mode OCR with noise-aware prompting – Textract processes both digital PDFs and scanned images, while prompt engineering in the downstream Bedrock Lambda accounts for OCR noise during semantic structuring.
- Schema-aligned prompt design – a detailed schema review with customer informed the Bedrock prompt design, ensuring the generated JSON aligns exactly with Aurora MySQL table and column structure before it is written via encrypted CRUD APIs.
- Serverless, event-driven pipeline – an S3-triggered Lambda chain (OCR Lambda → DynamoDB → Bedrock Lambda) using ARM-based Lambda functions minimises cold-start latency and cost, meeting the 10–15 second processing target at scale.
- Tenant-segmented, encrypted architecture – tenant-wise nested S3 folders plus API-layer tenant_id/user_id enforcement isolate every customer’s data; AWS Secrets Manager, encryption at rest, and VPC-secured APIs protect credentials and financial data end-to-end.
- Confidence-based review routing – a flagging mechanism uses Textract confidence scores to route documents with handwritten content to manual review instead of forcing fully automated extraction.
Services Used:
- Amazon Bedrock (Claude Sonnet 4)
- Amazon Textract
- AWS Lambda
- Amazon S3
- Amazon DynamoDB
Business Benefits:
- Manual errors reduced to near zero – – for standard formats, as AI-driven field classification replaces brittle rule-based extractors across hundreds of vendor layouts.
- 95%+ field extraction accuracy – – the target accuracy for vendor, amounts, taxes, and totals is met even with ~40% of documents arriving as scanned images.
- ~90% billing time reduction – – structured JSON maps directly into Aurora MySQL, eliminating manual data entry and re-keying for SME customers.
- 10–15 second processing per document – – well within the original 500+ documents/day target, with the serverless, auto-scaling architecture built to headroom of 100,000+ documents/month as the customer grows.
- 100% logical multi-tenant isolation – – with a full audit trail via CloudWatch and CloudTrail, and zero credentials stored outside Secrets Manager, meeting financial data security requirements.
- Safe handling of edge cases – – handwritten and low-confidence documents are automatically routed for review, keeping automation accuracy high without sacrificing data integrity.
Click Here to Get a Free GenAI Readiness Assessment
Frequently Asked Questions
Amazon Textract’s layout-agnostic OCR is paired with Bedrock (Claude Sonnet 4) semantic reasoning, which extracts fields by meaning rather than fixed position. This means new vendor layouts are handled automatically, with no manual template configuration or field mapping required.
Textract processes both digital PDFs and scanned images. For handwritten content or any extraction that falls below a confidence threshold, the system automatically routes the document to manual review instead of risking an incorrect fully-automated extraction.
Each document is processed in 10–15 seconds through a serverless, event-driven Lambda pipeline (S3 → OCR Lambda → DynamoDB → Bedrock Lambda). The architecture comfortably meets the initial 500+ documents/day target and is built with headroom to scale to 100,000+ documents/month as the customer grows.
Tenant-wise nested S3 folders plus API-layer tenant_id/user_id enforcement give each customer logical data isolation. Credentials and data are protected end-to-end via AWS Secrets Manager, encryption at rest, and VPC-secured APIs, with a full audit trail through CloudWatch and CloudTrail.
No. A detailed schema review aligned the Bedrock prompt design with the customer’s Aurora MySQL schema, so extracted data is written directly as structured JSON via encrypted CRUD APIs — eliminating manual re-entry and re-keying.