Back to the blog
Product27 May 20267 min readAndreas Pörtner

Why AI should explain EDI, never validate it

A language model is excellent at describing what a segment means and useless as a source of truth for compliance. Here is how we keep the two layers apart.

Two different questions

'Is this file valid?' and 'What does this file say?' are different questions. The first has a deterministic answer defined by a standard, a directory version and a partner profile. The second benefits enormously from natural language.

Mixing them produces confident nonsense: a model that invents a rule identifier is worse than no validation at all, because the output looks authoritative.

How the pipeline is layered

Detection and validation run first and are fully deterministic. Only afterwards does the interpretation layer receive the structure and the findings, and it may only describe them.

  • Layer 1 — detection: format, version, message type, encoding, confidence.
  • Layer 2 — structure: segments, elements, hierarchy, control counts.
  • Layer 3 — rules: standard, code lists, business arithmetic, partner profile.
  • Layer 4 — interpretation: a plain-language summary, clearly labelled as AI-generated.

Every finding carries its source

In the result view each finding is tagged with its origin: deterministic, schema, business rule, code list or AI interpretation. Nothing produced by the model can raise an error severity. It can add context, and that context is visually separated from the compliance verdict.

Privacy is part of the design

When PII masking is enabled, names, addresses, bank details and identifiers are replaced before anything leaves the deterministic layer. Documents are never used for model training, and retention follows the plan you are on.

Try it on your own document

Upload an EDIFACT, X12 or XML file and see structure, validation findings and a plain-language explanation in one view.

Analyze a document