Hybrid rule-based and LLM-assisted mapping for B2B EDI documents.
Team final-year project; the repository is private.
EDIConnect walkthrough, 2 minutes 35 seconds
Overview
EDIConnect maps Electronic Data Interchange documents between standards such as Tradacoms, X12, and HL7, and toward ERP-ready structures. Standard cases go through deterministic rules; the hard ones get help from an LLM; every output is validated.
Problem
EDI mapping is still largely manual. Each trading partner and standard has its own segments, delimiters, and loops, and a mapping mistake silently corrupts orders and invoices downstream.
Approach
A hybrid pipeline: parse and normalise the input, apply rule-based mappings for well-understood segments, and use LLaMA 3.1 assistance for complex or ambiguous ones. Segment meanings are embedded and semantically matched to target fields, and automated syntax and consistency checks validate the result before export.
Architecture
Select a component to see what it does. Blue packets show the direction data moves.
- EDI or custom file to Parser
- Parser to Rule mapper (standard)
- Parser to LLaMA 3.1 assist (complex)
- Parser to Semantic match
- Rule mapper to Validation
- LLaMA 3.1 assist to Validation
- Semantic match to LLaMA 3.1 assist
- Validation to Mapped output
What it does
- Parsing of segments, delimiters, and loops across Tradacoms, X12, and HL7.
- Rule-based mapping for standard cases, so common documents are deterministic.
- LLM-assisted mapping for complex cases.
- Embedding-based semantic matching of EDI elements to target schema fields.
- Automated syntax and consistency validation of generated output.
Engineering decisions
- Rules first, model second: deterministic mappings where the standard is unambiguous keeps output auditable and cheap.
- Validation as a separate stage, so LLM suggestions never reach the output unchecked.
Limitations
- Built as a team project; code is in a private repository and not linked here.