OCR guide
ARVA OCR extracts text, tables, and layout from PDFs and scans. This guide shows how to prepare inputs, pick outputs, ground answers with boxes, and triage by confidence.
In this guide
- Prepare scans and respect format and size limits
- Pick markdown, JSON, or text output for your task
- Use bounding boxes and language hints for mixed documents
- Triage by confidence and improve handwriting results
Prepare clean inputs
Quality in determines quality out. Scan at 300 DPI, keep pages upright, and avoid shadows on receipts or citizenship cards. Flatten multi-page PDFs before upload instead of sending phone photos page by page.
Supported inputs are PDF, PNG, JPG, TIFF, and WEBP up to 100 MB per request. Compress oversized PDFs by lowering image DPI or splitting into page ranges, not by photographing the screen.
For schemas and auth, see OCR Process. For bulk backlogs, queue files with Batch.
Pick the right output format
Choose the output that matches the next step. Markdown preserves headings and tables for chat context, JSON preserves structure for databases, and text fits plain search indexes.
| Task | Format | Why |
|---|---|---|
| Document QnA with SAGE | markdown | Tables stay readable as context |
| Invoice fields to database | json | Typed blocks plus confidence |
| Full-text search index | text | No markup to strip |
| Expense table audit | json plus bbox | Cell positions for review UI |
Pair markdown output with Document QnA and JSON output with Invoice extraction.
Use boxes and language hints
Set bbox to true for tables and forms so each block returns its page and coordinates. Render those boxes in a review UI where staff can click a row and see the source cell highlighted.
Set language_hint when a page mixes scripts. A Kathmandu invoice may mix Nepali, Hindi, and English on one page, and the hint helps ARVA pick the right segmentation.
| Document | Hint | Tip |
|---|---|---|
| Nepali VAT invoice | ne-NP | Keeps Devanagari digits stable |
| Hindi delivery challan | hi-IN | Better conjunct handling |
| English contract | en-US | Default, fastest path |
| Mixed Kathmandu menu | ne-NP | Then post-fix Latin names |
See Table extraction and Multilingual documents for full patterns.
Triage by confidence and fix handwriting
Treat confidence as a router. Auto-accept high scores, queue middle scores for human review, and re-scan low scores instead of shipping them downstream.
| Confidence | Action | Example |
|---|---|---|
0.9 and above | Auto-accept | Clean 300 DPI invoice total |
0.7 to 0.9 | Human review | Faded receipt, verify total |
Below 0.7 | Re-scan and retry | Blurry photo, recapture |
Handwriting needs extra care: use dark ink on plain paper, keep one line per row, and crop tightly to the form. Print anchor words like Name and Date so ARVA can align the layout. For dedicated tips see Handwriting and the ARVA model card.
Best practices
- Scan at 300 DPI and keep files under 100 MB before upload.
- Default to
markdownfor QnA andjsonfor structured extraction. - Enable
bboxwhenever tables, forms, or audits need positions. - Set
language_hintfor Nepali and Hindi mixes instead of relying on default. - Route by confidence: auto-accept, review, or re-scan with clear cutoffs.
- Re-capture poor handwriting rather than tuning prompts around noise.
