FPS Quality Document Automation Prototype
Domain: Rail vehicle manufacturing quality
Status: Work prototype; AI-extracted records require employee review
Overview
This prototype explores how AI-assisted document processing can reduce manual effort in handling supplier quality documents, including inspection certificates 3.1/3.2 and declarations of conformity. It supports quality-document intake, structured data extraction, validation, and a human-reviewed QA workflow.
The project applies manufacturing quality expertise to a practical data and automation problem: making document information easier to review and connecting it with delivery and traceability records.
Workflow
- Document intake: Fetch supported email attachments through IMAP or import documents and archives from a folder.
- Parsing and extraction: Parse PDFs, spreadsheets, and supported images using LlamaParse; use the OpenAI API to map parsed content to a structured schema and flag missing, uncertain, or inconsistent values.
- Validation and reference checks: Apply document-type, completeness, order, quantity, and heat-number checks. Master data is used for comparison and QA warnings, not as a substitute source for the document's extracted values.
- Human review: Store records in SQLite and present pending documents, source evidence, extracted fields, and anomalies in a Streamlit QA interface. An employee reviews and approves or corrects the data.
- Export preparation: Produce a JSON contract for a potential downstream IFS Cloud adapter.
Architecture and Technologies
| Area | Technologies and methods |
|---|---|
| Application | Python, Streamlit, command-line interface |
| Document processing | LlamaParse Agentic parsing, OpenAI API, JSON Schema |
| Ingestion | IMAP over TLS, ZIP/RAR/7z/TAR archive handling |
| Storage | SQLite, relational records, source-file hashes, review audit data |
| Classification | scikit-learn TF-IDF and logistic regression trained on QA-verified examples |
| Data checks | Master-data cross-checks, completeness validation, quantity comparisons, heat-number rules |
| Supporting tools | OpenPyXL, python-dotenv |
Quality and Traceability
The data model can represent deliveries, source documents, document items, heat lots, and review status. It preserves source-document references and supports checking whether required documents have been approved before physical receipt. A document associated with multiple orders requires separate QA decisions for each order.
The classifier is advisory and only uses verified examples when there is sufficient training data. AI extraction and classification do not independently establish document compliance or replace an employee's decision.
Prototype Boundaries
- This is a prototype, not a certified or production-approved quality system.
- It does not connect to or write directly to IFS Cloud. Its JSON output is an integration starting point whose fields and interface still require agreement with the IFS owner.
- Document contents are sent to Llama Cloud and OpenAI when AI processing is enabled. Organizational data-handling approval is required before using real or sensitive documents.
- A human QA review is required; extraction output is not automatically treated as correct.
No supplier documents, employee records, credentials, or internal configuration are published as part of this portfolio description.