Executive Summary
Built an LLM-powered XML validation and correction prototype for a logistics company. Vendors were submitting files with inconsistent Incoterms and supplier IDs, causing system errors and shipment delays that required manual developer intervention. The Streamlit prototype validates XMLs against reference lists and uses OpenAI and LangChain to demonstrate automated corrections. The proof-of-concept shows how the AI can automatically fix errors without human intervention, with the vision to integrate this capability directly into their existing systems.
Challenge
Vendors in a logistics company's supply chain network were submitting XML files with inconsistent Incoterms and supplier IDs. These errors caused system rejections, delayed shipments, and required manual developer intervention to fix.
The procurement team was bottlenecked waiting for developers to correct vendor file errors. The company needed to explore how AI could automate error correction, with the vision of eliminating developer dependency entirely through direct system integration.
Approach
The real need wasn't just validation, it was an automated correction mechanism that could eliminate the developer bottleneck entirely by fixing errors without human intervention.
Key considerations:
- Errors were predictable (wrong Incoterms, invalid supplier IDs) but varied enough to need intelligent suggestions
- Must work with the existing XML format without system changes
- Corrections should be automated, not just flagged, to save time
- Prototype must demonstrate feasibility for future direct system integration
Solution
I designed and built an LLM-powered XML validation and correction prototype to demonstrate automated error fixing capability:
- Streamlit web app: Simple prototype interface for uploading and validating XML files
- Reference list validation: Automated checks against known suppliers and valid Incoterms locations
- LLM-powered corrections: OpenAI and LangChain demonstrate context-aware fixes for invalid entries
- Instant preview and download: Users see corrected XMLs before downloading, with detailed explanations of what was wrong and what was fixed
- Containerized deployment: Docker packaging for easy handover and testing
- Integration roadmap: Designed with vision for direct integration into existing procurement systems
Outcome
- Proof of concept validated: Demonstrated AI can accurately correct XML errors without human review
- Processing capability: Prototype corrects files in seconds, showing potential to eliminate hours of developer wait time
- Future vision demonstrated: Showed how automated correction could be integrated directly into existing systems for zero-touch error fixing
- Technical feasibility proven: Confirmed LLM-powered correction approach works with their XML format and business rules
- Handover ready: Delivered containerized prototype ready for internal testing and future integration planning
Tech Stack
Python • Streamlit • OpenAI API • LangChain • JSON • Docker