← All workflows

Workflow

Document AI extraction, OCR boxes and reranking evaluation

Verify OCR pages and coordinates, extract checked invoice fields, compare PDF providers and establish multilingual rerank results.

Sources checked:

What you can do

Produce a reusable test fixture for a document, image payload or ranked search result.

Record exact input, model, output contract and acceptance before comparing tools. Check coordinate space, page labels and money fields against the original source.

Build your execution checklist

Inputs are processed in this browser only and cleared when you close or refresh the page.

You need a visual overlay or reproducible OCR for a PDF.

Read the full steps

Page OCR, paragraph boxes and local markdown

You need a visual overlay or reproducible OCR for a PDF.

  1. Pin the provider model. Mistral OCR 4 or newer supports include_blocks for paragraph-level boxes. Record page width, height, index and rotation before overlaying coordinates.
  2. For local GLM-OCR select its documented layout and serving integration. Render source pages to known dimensions and separately verify headings, table rows and cross-page reading order.
  3. Overlay boxes on a public page and test a rotated page. Record the coordinate transform, physical page index and printed page label.

Invoice extraction and provider comparison

You need to extract invoice values or compare Mistral and Gemini.

  1. Pick a fixed public or synthetic set with correct invoice ID, currency, amount in minor units and source page. Include rotated images and missing values.
  2. Choose Mistral document annotations or Gemini schema-based output using the exact model and revision. Compare values with the fixture and record missing, invalid, wrong and missing-evidence cases separately.
  3. Report accepted output per paid attempt and cost per accepted document across identical inputs. Keep PDFs and references available to reproduce the evaluation.
Template preview: invoice-expected-example.json
{"invoice_id":"DEMO-42","currency":"USD","amount_minor":12500,"source_page":1}

Multimodal request migration and multilingual rerank

A serving migration changes image payloads or a ranking model changes search results.

  1. For a Llama image migration pin the checkpoint and its server/chat template. Translate the image message to the target API’s schema, then use one known image to check modality, response and input limit.
  2. For multilingual hybrid search retrieve lexical and embedding candidates and deduplicate by stable ID. Pass consistent text or structured records to a Cohere model supporting the language mix.
  3. Score candidate recall before reranking and score nDCG or precision after. Keep query language, candidate pool and relevance labels fixed across comparisons.

Scope & limits

  • Fixtures establish how to measure. Actual field accuracy, coordinate alignment, accepted output cost and ranking quality need measured outputs.

Questions & answers

Can I compare OCR and schema extraction by text quality alone?
No. Also define field matching, source evidence, invalid output and task cost, and use the same pages and validation rules for each candidate.

Verified sources

Templates are authored by Kunavo. External product behavior depends on the linked sources and your account settings.

Related workflows