Sovereign AI for documents
Handwritten document OCR: sovereign AI that reads handwriting
An open-weight vision-language model transcribes the handwritten page, then a text model fits the transcription into fields. Learners' papers, site reports and paper forms are processed on a dedicated GPU in Europe, for a flat fee.
By François-Guillaume Ribreau, CEO & CTO, Co-founder
Updated on September 25, 2026
A classic OCR engine reads printed text well, and cursive handwriting, scribbled digits or ticked boxes much less well. For these documents, we use a two-step chain. A vision-language model transcribes the page, then a text model fits the transcription into a fixed schema.
These documents often contain personal data, sometimes about minors. So they go through a private route, on a dedicated GPU in Europe.
The documents in scope
The chain targets documents filled in by hand in large numbers, which then need to go into a spreadsheet or a business application.
- Learners' papers and homework, for grading or progress tracking.
- Site reports written on location.
- Service tickets filled in and signed at the customer's premises.
- Paper forms, such as registration forms, questionnaires or inspection sheets.
The limits of classic OCR on handwriting
A classic OCR engine recognizes characters from learned shapes, mostly on printed text. Handwriting falls outside that frame.
- Cursive: letters are joined, and their shape changes from one person to the next, sometimes from one line to the next.
- Digits: a 1 and a 7, a 4 and a 9 get mixed up. An error on a grade or a quantity changes the meaning of the document.
- Ticked boxes: a cross, a tick or a stroke that overflows must become a yes or no value, which lies outside what a character OCR does.
The output is often plain text where values have lost the printed label that gave them meaning.
Transcribe, then structure
The chain separates two tasks that tend to be handed to the same model.
- Transcription by a vision-language model: an open-weight VLM, for example Qwen2.5-VL 7B, reads the image and outputs plain text. We ask it to keep each printed label next to the handwritten value (“Service date: 12/03”, “Compliant: ticked”), so the value keeps its meaning.
- Structuring by a text model: an LLM receives that transcription and fits it into closed-schema JSON, whose fields, types and allowed values are known in advance.
It is best never to ask the VLM for strict JSON. On long outputs, it skips fields or produces invalid JSON. Plain text is more robust, and formatting is left to the text model.
The case of pre-printed forms
When the form is fixed, the list of fields is known in advance. We give it to the structuring model as a canonical profile, with the name, type and possible values of each field.
The output then becomes deterministic. Every field of the profile appears in the JSON, and a box left empty is marked as empty instead of being skipped or guessed. Two documents from the same form produce comparable outputs, ready for a spreadsheet or a business application.
Assisted correction
No chain reads every handwriting perfectly. Human review remains necessary, and it has to stay fast.
For each field to check, the review tool shows the area of the page, cropped and enlarged, next to the extracted value. The reviewer compares, corrects if needed and confirms, without searching the whole page for the value.
Queue-based processing
Handwritten documents arrive in batches, such as a stack of papers or the week's service tickets, and nobody waits for the answer in front of a screen. Processing therefore goes through a queue and batches.
Throughput is sized on the volume to process in the day. The latency of a single page matters little, which keeps the GPU steadily busy and absorbs peaks without oversizing the machine.
Settings to check before switching models
Switching VLM or version is a configuration change, as with any private LLM hosted in Europe. Three settings still weigh on quality and deserve a check at every change.
- Resolution of the image sent: too low, and the handwriting becomes unreadable for the model. Too high, and the page consumes many tokens and a lot of memory.
- Context size of the inference server: a page heavy in image tokens can exceed the configured window and get truncated.
- “Thinking” mode: on models that have one, it is best switched off for transcription. It lengthens the answer and the processing time, for a task that does not need it.
Personal data and the private route
Pupils' papers, often from minors, named reports or forms filled in by customers contain personal data. These documents go through the private route of our sovereign AI gateway, to an internal model on a dedicated GPU, the foundation of our AI hosted in Europe.
This route is fail-closed. If the internal model is unavailable, processing stops with an explicit error and no page falls back to the cloud.
You remain the controller. For data about minors or sensitive data, a data protection impact assessment (DPIA, GDPR Article 35) will likely be required. The Private GPT technical guide covers the private route and the implementation recommendations.
A flat fee rather than per-token pricing
Handwriting OCR combines high volume and a low need for intelligence, the typical profile of a task to put on a flat fee. Per token, every page adds image and text tokens to the bill.
On a dedicated GPU, the AI Instance starts at €160 excl. VAT per month. That amount does not depend on the number of pages as long as the machine absorbs the load (beyond that, the next tier is quoted).
During the prototype, we measure the number of tokens and pages per document on your own files, to work out the real cost. At low volume, a per-token API can still be cheaper, and this measurement lets you check.
Measuring quality on your own documents
We promise no accuracy rate. Quality depends on the handwriting, the scan, the form and the chosen model.
It is measured on a real sample of your documents, field by field, by comparing the output with a reference entry. This protocol gives a figure specific to your case, then serves as a non-regression test at every change of model or setting.
Frequently asked questions
Is a classic OCR enough for handwritten documents?
Rarely. It reads print well, but cursive, ambiguous digits and ticked boxes cause it trouble. A transcription by a vision-language model, followed by structuring with a text model, suits these documents better.
Why not ask the vision-language model for JSON directly?
On long outputs, a VLM forced to produce strict JSON skips fields or outputs invalid JSON. So it transcribes to plain text while keeping the printed labels, then a text model produces the closed-schema JSON.
What accuracy can you expect?
No rate is guaranteed. Accuracy depends on the handwriting, the scan and the form, and it is measured on a real sample of your documents during the prototype. Human review on an enlarged area remains planned for doubtful fields.
Do pupils' papers go to a cloud?
No. They go through the gateway's private route, to an internal model on a dedicated GPU in Europe, and that route never falls back to the cloud. A data protection impact assessment (DPIA) will likely be required on the controller's side.
How much does handwriting OCR on sovereign AI cost?
Processing runs on a flat-fee AI Instance, from €160 excl. VAT per month, as long as the machine absorbs the volume.
The number of tokens and pages per document is measured during the prototype to work out the real cost. At low volume, a per-token API can still be cheaper.
Do documents need to be processed in real time?
Rarely. Handwritten documents arrive in batches, so a queue and batches are enough. Throughput is sized on the day's volume, which avoids oversizing the GPU.
Next steps
Test the chain on your own documents
A prototype on a real sample, a measurement of quality and cost per page, then flat-fee processing on GPUs in Europe.