The OCR preflight: reviewing a low-quality image before an Agent Tools job
A poor image is not an invitation to submit and hope. In Skavio Agent Tools, the useful sequence is to define the output, inspect the source against the fields that matter, read the live quote, and submit one controlled asynchronous job only when the evidence can support it. This is a practical guide to treating image review as a preflight control rather than a formality.
Define the result before judging the image
An image is not good or bad in the abstract. It is adequate or inadequate for a particular extraction task. Start by writing the result you need: for an invoice, that might include supplier name, invoice number, issue date, due date, currency, net and tax totals, and line-item quantities. Mark which fields are mandatory and which may be absent. Then ask whether the image visibly supports that result. If the supplier name or final total is cropped away, processing cannot recover information that is absent from the source. Skavio Agent Tools is a live company-scoped, authenticated processing API with asynchronous jobs, a shared prepaid credit wallet and self-service keys; it processes supplied sources and cannot recover evidence that was never captured. A task with no acceptance rule becomes hard to review, so define the human check before you request a quote.
- List the mandatory fields and the fields that can be left blank.
- Separate a document-extraction task from simple image conversion or file-format work.
- Reject a source that omits evidence the output requires.
Inspect the source against the fields that matter
Inspect the whole source at normal and enlarged zoom. Check orientation, page order, all four edges, blur, glare, shadow, skew, compression artifacts, handwriting, stamps and overlapping text. Use the actual required fields as the test: a readable invoice number does not make an illegible line-item description acceptable if that description is mandatory. Do not adopt a single resolution or sharpness number as a universal pass rule; usefulness depends on the document and the output. Do not build the workflow on an assumption that an upload will be automatically graded for sharpness or that a confidence score will decide acceptance. Those controls belong in your own preflight and review steps unless the supplied product documentation for your account explicitly provides otherwise. If local editing can correct rotation or cropping, do that and compare again; otherwise request a rescan or reject the image.
- Check every page, not only the first page or the header.
- Test the exact mandatory fields at readable zoom.
- Treat ambiguous digits, dates and supplier identifiers as unresolved, not close enough.
Use the quote as a control, not a green light
Once the image passes the task-specific check, obtain the live server quote before submitting the job. Current self-service processing uses a shared Pricing V2 wallet, and the live backend quote is authoritative for the final job price. This article does not hard-code a credit figure because the quote depends on the submitted operation and measurement. A fixed quote and an atomic credit reservation are controls for the job, not proof that processing has finished. Use a stable idempotency key for each logical request so a timeout does not become a duplicate submission. Treat a submitted or running job as unfinished until completion is confirmed. Retrieve results through authenticated downloads and verify signed completion webhooks on your server. A successful job settles once; a permanent failure releases the reservation.
- Read the live quote and confirm that it matches the operation you intended.
- Keep a stable idempotency key with the source document record.
- Wait for completion, then download through the authenticated company-scoped path.
- Do not treat a quote, reservation or submitted job as a completed result.
Keep ambiguous fields as human-review exceptions
The final control is comparison, not trust. Put the downloaded result beside the source image and check the fields that drive the business decision: supplier, invoice number, dates, currency, totals and line-item arithmetic. Any field that was ambiguous during preflight should arrive in your workflow as a human-review exception, not as silently guessed data. If the output contradicts the visible source, reject it rather than editing the record to fit the model. Preserve the source reference, the reviewed values and the correction history according to your company's privacy and retention rules. Only approved results should move into downstream accounting or operational records. This keeps Agent Tools in its proper role: a company-isolated processing service that produces reviewable outputs, with a person still responsible for acceptance.
- Compare critical fields and arithmetic with the source.
- Mark unreadable, missing or contradictory values as exceptions.
- Require human approval before downstream accounting writes.
- Keep source-to-result traceability under your own retention policy.