By
Logiks Lab
Published on
August 8, 2026
Updated on
August 8, 2026

Document intelligence: automating invoices, contracts and case files with control

Document intelligence turns documents into controlled information and actions: classification, extraction, reconciliation, search, summarisation and routing. Quality is not proven by an OCR demo; it must be assessed field by field, document by document and through to the process outcome.

Digitally analysed documents illustrating controlled document intelligence.
Type
Practical guide
Level
Intermediate
Reading time
15
Progress0 %

An engine recognises 99% of characters yet misreads the amount payable. A contract is perfectly converted into text, but the renewal clause is not linked to the entity concerned. An invoice is extracted correctly and then paid twice.

The document is not the result. The decision is.

1. Definition: document intelligence is a chain, not isolated OCR

Document intelligence combines acquisition, classification, text recognition, layout understanding, structured extraction, search, generation and business rules to turn documents into controlled process inputs.

It applies to invoices, purchase orders, contracts, customer records, claims, forms, identity documents, reports, letters or plans. The entries can be natively digital, scanned, photographed, handwritten, multilingual or composed of several documents.

OCR converts an image into characters. Document intelligence must still identify the type, associate a value with a field, understand the table, link pages, check consistency and decide what to do in case of uncertainty.

The difference is operational.

2. Key figures: document data is becoming infrastructure

  • As from 1 September 2026, all French companies must be able to receive electronic invoices; large and mid-sized companies must also issue them. The issuing requirement extends to SMEs and micro-enterprises on 1 September 2027.
  • The Ministry of Economy estimates that more than 10 million businesses are involved. In January 2026, the DGFiP published an initial list of 101 approved platforms.
  • Four new mandatory fields are required on invoices from September 2026: the customer's SIREN, transaction category, whether VAT on debits applies and delivery address when it differs from the billing.
  • An invoice, as an accounting document, must be kept in France ten years Extraction, archiving, proof and right of access cannot therefore be thought of as a simple temporary step.
  • The European ViDA strategy estimates economic benefits of between 172 and 214 billion euro over ten years, of which 51 billion savings for enterprises; digital reporting could reduce VAT fraud by up to 11 billion. These projections concern a European regulatory programme, not the ROI of an individual project.
  • A 2026 study on a multi-agent pipeline with human review reports 97.0% automation on 955 documents and 98.5% of document accuracy on a stratified subsample of 100 documents. This is a particular case of research and deployment; it illustrates the necessary measure, without providing a universal benchmark.

Structured digitisation reduces some OCR needs, but increases the importance of validation, interoperability, reconciliation and traceability.

3. Document passport: eight boundaries to control

Each document receives a traceable path. The "passport" combines source, owner, type, version, extracted data, checks, decisions and retention.

Flux en huit étapes du passeport documentaire, de la réception à la conservation.
OCR produces text; the document pipeline produces usable and defensible data.

4. Boundary 1 — Receive without losing provenance

E-mail, portal, API, licensed platform, scan or mobile upload are not the same risks. The input must create a stable ID, retain the timestamp, channel, sender, fingerprint and link to the case file.

4.1. Check container

Check real type, size, encryption, pages, archive, virus, signature, corruption and duplicate. A file named PDF may contain something else; an attachment may include active content or instructions designed to manipulate a generic system.

Separate the documents from the commands. The text "send this invoice to such an address" is data to be analysed, not an authorised instruction for the agent; the actions come from the workflow and authenticated rules.

4.2. Keep the original

Keep the object received and the transformations necessary for reproduction, according to the applicable policy. Rotation, cleaning, cropping and conversion improve readability, but a team must be able to return to the source during litigation or cross-verification.

The provenance starts before the model.

5. Boundary 2 — Classify documents and case files

A contract and its amendment can share words, while requiring different workflows. The classification covers type, subtype, language, version and relationship with other documents.

5.1. Evaluate at the right level

Overall accuracy is misleading when 80% of the volume belongs to an easy class. Publish precision, recall and confusion matrix by type, especially for rare and critical documents.

If 95% of invoices are recognised but 20% of credit notes are classified as invoices, the system may inflate the amounts due. An "unknown" class and a rejection threshold are better than a forced response.

5.2. Assemble related documents before extraction

An email sometimes contains a voucher, three invoices and terms and conditions. Detect boundaries, group pages and link them to the correct case file. The assembly error contaminates all the following fields even if each OCR appears correct.

The test must include missing, duplicated, rotated and mixed pages.

6. Boundary 3 — Extract against a field definition

A field has business name, type, format, source in the document, required status, tolerance, rule of standardization and consequence of an error.

6.1. Differentiate risk by field

The invoice number supports duplicate detection. The total triggers the reconciliation. IBAN receives payment. A termination clause sets a deadline. Their threshold and review cannot be identical.

Measure exact accuracy for identifiers, numerical tolerance for amounts, Intersection over Union or location metrics when spatial location matters, and controlled semantic quality for a clause. Add presence rate and false completion: Inventing an absent value is often more dangerous than leaving it empty.

6.2. Normalise without destroying information

Keep gross value, standard value, unit, currency and position. "01/02/26" depends on the country; "1.200" may mean one thousand two hundred or one decimal two. The context and rules of jurisdiction must precede conversion.

A valid JSON output is not a true output. The schema protects structure, not truth.

7. Boundary 4 — Reconcile with systems of record

Extraction creates value when it meets ERP, CRM, contract, order, catalogue, register or directory.

7.1. Use independent evidence

A supplier invoice is close to the purchase order and goods receipt. A contract relates to the entity, the signatory and the clause repository. A customer document is compared to the authorised information in the case file.

The reconciliation must explain the difference: amount, quantity, currency, date, identity, account or reference. An opaque similarity of 0.82 is not enough for a validator; the interface shows the values and the rule.

7.2. Detect fraud and error without assuming guilt

A new IBAN, a different address or a potential duplicate triggers a review, not an accusation. Signals are combined with role separation and independent verification channels for the received document.

The system avoids loops. If the document feeds the repository that is immediately used to validate it, fraudulent data may become its own evidence.

8. Boundary 5 — Generate, search and summarise with sources

The generic models allow questions and answers, summary, versions comparison and sheet writing. Their usefulness depends on retrieving the correct passages and the faithfulness of the answer.

8.1. Separate retrieval and generation

Measure first if the relevant passage appears in the first results, then if the answer respects this passage. A bad answer can come from a missing document, poor chunking or incorrect ranking or from the model; without separation, the team changes the wrong component.

Quotes point to page, zone and version. A reader must open the context in one gesture. A response without evidence must indicate uncertainty or refrain.

8.2. Build adversarial questions

Test lack of information, contradictions, more recent amendment, negation, table, footnote, manuscript content, document in other language and malicious instruction. Also ask for information that is nowhere to measure the invention.

The summary does not replace legal or financial reading where the decision so requires. It prepares the file and makes the differences visible.

9. Boundary 6 — Decide the level of human review

The log should not be a "human in the loop" box added at the end of the presentation. It has capacity, competence, ergonomics and objective.

9.1. Route by risk and confidence

  • Automatic: reliable field, confirmed consistency, low amount or low consequence.
  • Target validation: an uncertain field or deviation rule.
  • Complete review: new, contradictory, sensitive or high-level document.
  • Reject: unreadable source, missing part, attack or unsupported type.

The threshold is calibrated on the cost of false positives and false negatives. If approving an incorrect result costs one hundred times more than an unnecessary review, the team favours recall or precision accordingly.

9.2. Design the control screen

Show document and field side by side, highlighted area, gross value, standardization, rule, external and historical reference. Shortcuts, queues and clusters limit cognitive load.

Measure review times, corrections, disagreements, circumventions and mechanical acceptances. If the human accepts 99.9% in a second, the supervision is probably nominal.

10. Boundary 7 — Execute without duplication or excessive permissions

After validation, the system creates an object, triggers an approval, notifies or archives. This transition is the most consequential.

10.1. Make actions idempotent

A transaction ID ensures that a network retry does not create two invoices, two folders or two payments. the log distinguishes demand, attempt, success, failure and reconciliation.

10.2. Limit permissions

The technical account only accesses the necessary transactions, entities and environments. Reading, proposal, validation and execution are separate; high amounts or risks require another authority.

A fallback mode keeps the process running when the ERP or API is unavailable. Upon recovery, the system compares what was expected and actually created before replaying.

Documenting is also running correctly.

11. Boundary 8 — Retain, delete and demonstrate

The policy links legal obligation, purpose, litigation, security and rights. Not all intermediate copies must live as long as the accounting document.

11.1. Define the retention matrix

For original, prepared image, OCR text, fields, embeddings, prompts, output, logs and annotations, specify base, duration, access, encryption and destruction. A vector index may contain a representation of personal data and must enter into the analysis.

The CNIL recalls that models trained on personal data may remain subject to GDPR due to storage capabilities. Anonymity is not deduced from the term "embedding" or hash.

11.2. Maintain the evidence chain

Version of the model, rules, time stamping, person, source, correction and action allow to reconstitute the file. The log protects integrity and access without becoming an unlimited copy of all data.

End-of-life procedures are tested: deletion, export, supplier change and readability of an old archive.

12. Build the documentary evaluation dataset

A gold-standard dataset contains documents that are representative and deliberately difficult. Logiks recommends stratifying by type, provider, channel, quality, language, period, page, amount and risk.

Cinq couches d’évaluation documentaire reliant population, document, champ, action et décision.
An overall extraction rate may mask the rare error that triggers the wrong decision.

12.1. Size and coverage

The number depends on diversity, not a magic threshold. One hundred almost identical documents are not worth twenty rare classes. Define the target population, sample, and add incident cases and new formats.

Annotations are made by persons trained with a guide. Measure their agreement, arbitrate the differences and version. A field whose business truth is not stable must be clarified before judging the model.

12.2. Table of metrics

LayerMeasureDecision
Ingestionloss, duplication, corruptionDoes the document enter correctly?
Classificationaccuracy/recall by classDoes it enter the correct workflow?
Extractionfield accuracy and riskIs the data usable?
Reconciliationfalse match / missed matchIs the file consistent?
Answerretrieval, fidelity, abstentionIs the synthesis well founded?
Processdelay, automation, recoveryIs the flow improving?
Economycost per net documentDoes the value cover the service?

Report confidence intervals and case counts. "100% across three contracts" is correct, but says little about the wider portfolio.

13. Quantified example: multi-format invoices

A company processes 50,000 invoices per year at €6 € in direct cost, or €300,000 €. The project targets 70% without input, 25% with two-minute validation and 5% with ten-minute recovery, at a charge of €36 € per hour.

The review amounts to 12,500 × 2 minutes + 2,500 × 10 minutes = 50,000 minutes, or 833 hours and about €30,000. Add €60,000 of license/infrastructure, €45,000 of maintenance, €20,000 of support and €15,000 of corrections: the annual cost becomes €170,000, gross saving €130,000 before amortization of the project.

But 0.2% of duplicates not detected on an average amount of €1,200 theoretically expose €120,000 of payments, some of which can be recovered. Robust duplicate control and proper approval are therefore worth more than a point of automation rate.

The committee follows cost per invoice, delay, financial errors, reopenings and concentration of exceptions. If a new supplier generates 40% of the rework, it corrects the format or rule instead of blindly increasing the review.

The economics of document automation are driven by risk.

14. Compare documents: a contract and its four amendments

A legal department wants to identify notice obligations in 18,000 contracts. The first test correctly extracts the clause from the main document in 93% of cases, but fails to recognise that an amendment signed two years later replaces the deadline, a second concerns only one subsidiary and an annex combines an exception with certain products.

The pipeline must first assemble the contractual document set. It links identifiers, parties, effective dates, signatures and cross-references, then orders texts without assuming that the date of the file corresponds to the legal date; when a link remains ambiguous, the entire case file goes to full review.

The extraction does not only return "three months". It must retain the party subject to the obligation, trigger event, duration, unit, condition, exact source, applicable version and confidence level, so that a lawyer can check the interpretation rather than search all the pages again.

The gold-standard dataset contains contradictory amendments, missing clauses, poor scans, several entities and cancellations already made. Two lawyers independently annotate a sample, as their disagreement sometimes reveals an internal policy or formulation that requires a third reading instead of an automatic truth.

The final measure concerns the decision: for how many files does the system identify the correct applicable obligation, with its source, without inventing when the information is missing? A 96% accuracy on the presence of words does not compensate for a version error on an important commitment.

The tool then routes cases into three queues: confirmed result, targeted validation and complete analysis. The automation rate will be lower than that of an unconstrained summariser, but the outputs become usable to plan deadlines and document reasoning.

This case illustrates the boundary. Understanding a document often requires understanding its place in a whole, its effect over time and the authority of the version.

If the programme only assessed the model's ability to find a sequence of words in each single file, it could publish an impressive score while transmitting to the teams an outdated obligation, linked to the wrong subsidiary and without the condition which completely modifies its application.

Conversely, a more cautious system that refuses certain files, shows the links between versions, preserves the source areas and directs ambiguity towards a lawyer sometimes produces fewer automated outputs, but more defensible decisions and much more useful learning for the future of the portfolio.

15. A four-version roadmap

15.1. V0 — Observe

Mapping documents, fields, volumes, errors, systems and preservation. Constitute the gold-standard dataset and the baseline without automatic action.

15.2. V1 — Extract and propose

Display classification, fields and sources to an operator. Measure corrections and time. No irreversible action.

15.3. V2 — Automate low-risk cases

Run reliable and low-risk cases, with sampling, idempotency and rollback. Monitor segments.

15.4. V3 — Extend and reuse

Add types, languages and actions after proof. Share ingestion, identity, logging and evaluation, without imposing the same model on each document.

This Logiks progression is not a standard. It protects learning and facilitates return when reality contradicts the demo.

16. Logiks recommendations: ten costly mistakes

  1. Announce a global OCR accuracy.
  2. Mix classification and extraction.
  3. Train on the test documents.
  4. Force a value when it is absent.
  5. Ignore multi-page assembly.
  6. Allow content to control the agent.
  7. Give the model the right to pay.
  8. Underestimating review capacity.
  9. Keep all copies without rules.
  10. Forget the ERP and measure only the document.

A perfect extraction in a broken flow remains a failure.

17. FAQ

17.1. What is the difference between OCR and Document Intelligence?

OCR recognises text. Document intelligence classifies, structures, groups, interprets, routes and controls the document until a business decision.

17.2. What degree of precision is required?

It depends on the field and the consequence. An amount or an IBAN requires more than an information category. Set thresholds from the cost of errors.

17.3. Should you train a custom model?

Not at first. Test ready-to-use services on your dataset. Adapt or train only if the deviation, volume and ownership of the data justify the cost.

17.4. Does e-invoicing remove the need for document intelligence?

It reduces the need for OCR in structured workflows, but leaves validation, reconciliation, e-reporting, exceptions, attachments and non-invoice documents. Interoperability becomes central.

17.5. How should you organise the human review queue?

Route according to risk and confidence, show the source, measure corrections and time, and then size the peak capacity. A generic mailbox is not enough.

17.6. Can you process confidential documents?

Yes with an appropriate purpose, legal basis, minimisation, access, contract, security, retention and architecture adapted. The supplier and data uses must be verified.

18. Conclusion

The document pipeline does not succeed merely because it can read. It wins when the right file reaches the right decision, with less delay, rework and risk.

Keep the provenance safe. Measure by class and field. Reconcile it with independent evidence. Design the review, action and retention. Finally, calculate the cost of the complete process.

The document deserves a chain of trust.

19. Main sources