# Natural-Language EDI for a US EDI Solutions Vendor | Super Cat

> Natural-language EDI: business users ask raw X12 questions in plain English, answered by a Llama 3 model fine-tuned on EDI, with SAP IDoc matching.

Source: https://www.super-cat.tech/portfolio/ai-edi-data-exchange  
Last modified: 2026-10-22

[← All case studies](https://www.super-cat.tech/portfolio)Ask the EDI in plain English

# Natural-Language EDI for a US EDI Solutions Vendor

Business users ask questions of raw X12 — “what are the net terms on invoice 4471?” — and get answers in plain English, from a Llama 3 model fine-tuned on EDI and grounded in the parsed transactions.

## The problem

A US EDI vendor’s customers had two teams that did not share a language. The business side talks in invoice and PO numbers; the EDI side talks in 810s, 850s and segment positions. Every question crossed that gap by hand, and the vendor’s existing “plain text” rendering of each transaction was really hard-coded templates, not language anyone could ask questions of.

## What we built

A natural-language layer over the vendor’s EDI data: the user asks in business terms, the system resolves them to the right X12 transactions, retrieves the exact segments, and a fine-tuned model writes the answer in English. The same layer links each EDI document to its SAP IDoc counterpart and lays the whole exchange out as a timeline.

Before: Business and EDI teams speak different languages; Rejected transactions decoded by hand; No view of where an order is stuck. After: Ask the EDI in plain English.Before

- Business and EDI teams speak different languages

- Rejected transactions decoded by hand

- No view of where an order is stuck

How it works

- 01 Parse, keeping order. X12 files are parsed interchange → functional group → transaction (850 purchase order, 997 acknowledgement, 810 invoice) into JSON. Element order inside each segment is kept exactly, because in X12 position is meaning.

- 02 Store beside the existing index. Parsed documents live in a document store next to the Elasticsearch index the vendor already ran, so nothing upstream had to change.

- 03 Map business terms to transactions. An invoice number resolves to its 810, a PO number to its 850, and the question becomes a lookup over the right transaction set rather than a free-text search.

- 04 Fine-tune the model on EDI. Llama 3 in 4-bit via Unsloth, trained in stages: supervised fine-tuning on EDI vocabulary and on turning retrieved segments into answers, then ORPO preference tuning for EDI ↔ English translation.

- 05 Link EDI to SAP IDocs. An EDI document and an IDoc are matched when their PO or invoice numbers agree and their sender and receiver IDs resolve to the same trading partners in a company dictionary.

- 06 Draw the timeline. Once linked, every timestamp becomes an event — 850 on 1 May, 997 on 3 May, 810 on 5 May — plotted as a graph, so a stuck order is visible at a glance.

After
Ask the EDI in plain English

Stack
EDI X12 LLM Fine-Tuning SAP IDoc

## Why it holds up

The model is allowed to explain, never to decide. Parsing, matching and partner resolution are deterministic and auditable; the language model only reads what retrieval hands it and writes it in English. That split is what makes it safe to put an LLM in front of a supply chain’s system of record.

Related service: [Forward-deployed AI engineers](https://www.super-cat.tech/forward-deployed-ai-engineer)

## More case studies

Big 4 client · fully on-premise

### Enterprise RAG Chatbot for a Big 4 Accounting Firm

Multimodal retrieval over a Big 4 firm’s full compliance library, tuned for citation instead of summary — every answer arrives with its source paragraph attached.

- Juniors reading thousands of pages per question

- Seniors acting as search engines

Read the case → 200k calls/month · 67% booking rate vs 77% human

### 24/7 AI Agent Call Center: 200k Calls a Month Across 60 US HVAC Brands

Voice agents orchestrating 200,000 calls a month across 60 US HVAC brands for a 5,000-person enterprise, booking 67% of calls against 77% for human agents — within 10 points of a trained team, around the clock. Built as a product, an AI front desk that answers, books and routes, not a pilot.

- Night and weekend calls unanswered

- Staffing every shift hard to justify

Read the case → US$1M collected in the first 3 months

### AI Payment Collection and Reminders

The companion product to the AI front desk: it chases unpaid invoices with polite, timed reminders and a payment link, and stops the moment the customer pays or replies. It collected over US$1 million for the client in its first three months.

- Chasing payment is awkward and late

- Billable time lost to collections

Read the case →

Get started

## Talk to the engineer who will build it.

You will speak with me directly. Bring the use case, the data and the constraints, and I will give you a straight view on feasibility, effort and the first thing to ship.

[Book a call](https://calendly.com/super-chain/catyung)Hong Kong & London time zones
