How AI Transforms COI Management: A Real Factory Use Case (Hybrid Rasa + LangChain)
Managing COIs (Certificates of Inspection) inside a factory is usually a slow and manual process. QC staff search for customers, check lot numbers, look up QC results, generate Excel files, and manually send reports.
At Simplico, we built a Hybrid AI Assistant powered by Rasa (structured conversational control) + LangChain (agentic reasoning + SQL tools + RAG) to automate these workflows using a simple chat interface.
In this article, we walk through a real end-to-end use case from our Factory Automation POC and show the full system architecture diagram behind it.
🧠 System Architecture (Hybrid Rasa + LangChain)
Before jumping into the story, here is the architecture that powers the COI AI assistant:
┌─────────────────────────────┐
│ Factory Staff │
│ (QC, Engineer, Sales, Admin) │
└──────────────┬───────────────┘
│
▼
┌─────────────────────────────┐
│ Web Chat UI │
│ (Browser, LINE, Slack, etc.)│
└──────────────┬───────────────┘
│
▼
┌────────────────────────────────────┐
│ AI Gateway Layer │
│ Routes messages to Rasa/LangChain │
└───────┬────────────────────────────┘
│
┌──────────────────┼───────────────────┐
│ │ │
▼ ▼ ▼
┌────────────────┐ ┌───────────────────┐ ┌───────────────────────┐
│ Rasa NLU + │ │ LangChain RAG │ │ LangChain Agent │
│ Dialogue Core │ │ Document Search │ │ Tools + Reasoning │
└────────────────┘ │ (Manual, SOPs) │ └───────────────────────┘
│ └───────────────────┘ │
│ │
▼ ▼
┌──────────────────────────┐ ┌────────────────────────────────┐
│ Rasa Custom Actions │ │ Agent Toolsets │
│ (Python logic, routing) │ │ - SQL Query Tool │
│ - Entity disambiguation │ │ - COI XLSX Generator Tool │
│ - User selection logic │ │ - Lot Lookup Tool │
└───────────────┬──────────┘ │ - Product Data Tool │
│ └───────────────┬────────────────┘
▼ ▼
┌────────────────────────────────┐ ┌──────────────────────────────────┐
│ COI / QC Database │ │ Document & Vector Store │
│ (Customers, Products, Lots, │ │ (Manuals, SOPs, Embeddings) │
│ Test Results, History, etc.) │ │ FAISS / PGVector │
└────────────────────────────────┘ └──────────────────────────────────┘
This hybrid model combines the safety of structured dialog with the intelligence of agentic AI—making it perfect for real factory environments.
🔍 1. Searching Customer Data with Natural Conversation
Instead of browsing menus, the staff simply types:
User:
“Show me data of Toyota”
The AI instantly looks up the COI database.
Since factories often have multiple similar customers, the assistant clarifies:
AI:
“I found multiple customers named ‘Toyota’.
Please choose one:
- Toyota Motor
- Toyota Thailand
- Toyota Industrial Asia
- Toyota Logistics Service”
This disambiguation is generated by LangChain SQL tools but controlled safely by Rasa dialogue rules.
The user chooses:
User:
“2”
AI:
“You selected Toyota Thailand.
Here is the customer profile:
- Customer Code: C-TH-112
- Total COIs issued: 243
- Active product codes: 18
- Address: Samut Prakan, Thailand”
🧾 2. Generating a COI File
Now the user requests a COI.
User:
“Create COI for lot 123-456A”
AI performs:
- Lot lookup
- QC result check
- Template loading
- XLSX generation
- Upload to COI storage
AI:
“✔ Lot found
✔ QC: Passed
✔ Using template: COI_Template_v3.xlsx
Generating COI…”
After 2 seconds:
AI:
“Your COI is ready:
📄 Toyota_Thailand_COI_123-456A.xlsx
Download: s3://coi/Toyota_Thailand_COI_123-456A.xlsx”
The entire COI workflow—normally 5–10 minutes—finishes instantly.
📦 3. Listing Lots Under a Product Code
User:
“List lot numbers for product code P-9981”
AI:
“Here are the lots for P-9981:
- 123-456A — Completed
- 123-456B — Awaiting QC
- 123-457A — Completed
- 123-458C — Testing
- 123-460A — Completed (Pending COI)
Would you like to see any lot?”
User:
“Okay”
AI:
“Please choose 1–5.”
🏭 4. Inspecting Lot Data
User:
“1”
The AI returns a full QC + production summary:
Product
- Code: P-9981
- Name: Aluminum Housing
QC Results
- Hardness: 88.5 HRC
- Chemical Composition: OK
- Dimension: Passed
- Visual: No defects
Production
- Machine: CNC Line #2
- Date: 2025-01-14
- Operator Team: B
- Cycle Time: 2.8 minutes
Then the AI asks:
“Would you like to generate the COI, export to Excel, or compare with other lots?”
📘 5. Retrieving SOPs Through RAG
User:
“Show SOP for this product.”
AI (via RAG search):
“Here are the SOP steps for P-9981:
- Visual inspection
- Measure dimensions (±0.05 mm)
- Hardness test (85–90 HRC)
- XRF analysis
- COI preparation”
Everything comes directly from the factory’s SOP documents using vector embeddings + LangChain.
📊 6. Summarizing COI History
User:
“Summarize COI history for Toyota Thailand.”
AI:
COI Summary – Last 90 Days
- Total COIs: 62
- QC Pass Rate: 98.3%
- Delayed COIs: 2
- Main product: P-9981
“Would you like this as PDF, Excel, or email?”
🚀 Final Thoughts
This use case shows how a Hybrid Rasa + LangChain AI Assistant can transform COI workflows:
- Natural conversation instead of complex UI
- Automatic COI generation
- Fast lot lookup
- Instant QC insights
- One-click SOP retrieval
- Summary reports on demand
It’s not just a chatbot—it's an intelligent bridge connecting people, data, QC history, manuals, and COI documents into one seamless experience.
This POC proves that AI can save time, reduce errors, and unlock new productivity for factories of any size.
Get in Touch with us
Related Posts
- 用 AI 改造 COI 管理:真实工厂案例解析(Hybrid Rasa + LangChain)
- SimpliAgentic —— 新一代自律智能工厂,从这里开始
- SimpliAgentic — The Future of Autonomous Factory Automation Has Arrived
- 为什么理解 Android Internals(安卓内部机制)如此重要?——帮助企业打造高价值系统级服务
- Why Android Internals Matter — And the High-Value Services Your Business Can Build With Them
- 为什么企业应该开发自己的电商系统(而不是依赖租用型平台)
- Why Your Business Should Build Its Own E-Commerce System (Instead of Renting One)
- Upstream、Downstream 和 Fork:Android 与 Linux 开发者必须理解的核心概念
- Upstream, Downstream, and Fork: A Clear Guide for Android & Linux Developers
- NVIDIA、Microsoft、OpenAI、Google、Oracle 以及 AMD:正在共同推动 AI 泡沫如何形成?
- The Real AI Bubble: How NVIDIA, Microsoft, OpenAI, Google, Oracle — and Now AMD — Shape the Future of Compute
- 深度学习在房地产开发中的应用
- Deep Learning in Property Development
- 代码修复与遗留系统维护服务 —— Simplico 助力企业保持系统稳定、安全、高效
- Code Fixing & Legacy System Maintenance — Keep Your Business Running Smoothly with Simplico
- Python 深度学习在工厂自动化中的应用:2025 全面指南
- Python Deep Learning in Factory Automation: A Complete Guide (2025)
- 工厂 / 制造业专用 Python 开发与培训服务
- Python Development & Industrial Automation Training Services
- 为什么 Python + Django 是现代电商系统的最佳技术栈(完整指南 + 定价方案)













