Snowflake-Labs/sfguide-intelligent-jidoka-system-for-ev-manufacturing
Python
Captured source
source ↗Snowflake-Labs/sfguide-intelligent-jidoka-system-for-ev-manufacturing
Description: Build an AI-powered Jidoka system for EV manufacturing using Snowflake Cortex AI, featuring predictive maintenance, real-time OPE analytics, and an intelligent agent for production insights.
Language: Python
License: Apache-2.0
Stars: 0
Forks: 1
Open issues: 0
Created: 2026-02-24T19:21:51Z
Pushed: 2026-03-09T15:59:53Z
Default branch: main
Fork: no
Archived: no
README:
Intelligent Jidoka System for EV Manufacturing
Snowflake Cortex AI-powered manufacturing intelligence for EV Gigafactory OPE optimization
Overview
This project demonstrates an Intelligent Jidoka System that bridges the gap between Overall Equipment Effectiveness (OEE) and Overall Process Efficiency (OPE) in high-volume EV battery manufacturing.
The Problem
In modern Gigafactories, efficiency losses hide in the "white space" between production steps:
- Ghost Inventory Paradox: ERP shows inventory as "available" while shop floor sensors report material starvation
- OEE Blindness: High equipment uptime (90%+) masks low process efficiency (65%)
- Reactive Maintenance: Problems discovered after failures occur, not before
The Solution
This system implements Jidoka 2.0 - automation with human intelligence, powered by Snowflake Cortex:
| Component | Technology | Purpose | |-----------|------------|---------| | Natural Language Analytics | Cortex Analyst | Query OPE metrics in plain English | | Knowledge Retrieval | Cortex Search | RAG over maintenance manuals | | Intelligent Orchestration | Cortex Agent | Automated diagnosis and recommendations | | Predictive Maintenance | Snowpark ML | Forecast AGV failures before they occur |
What You'll Build
- Medallion Architecture: RAW (Bronze) → ATOMIC (Silver) → EV_OPE (Gold)
- Cortex Search: RAG knowledge base for maintenance documentation
- Cortex Analyst: Natural language queries over production metrics
- Cortex Agent: Multi-tool AI assistant for troubleshooting
- Streamlit Dashboard: 5-page interactive analytics app
- ML Notebooks: Synthetic data generation + AGV failure prediction
Demo Scenario
The synthetic data tells a specific causal story:
1. Baseline (Nov 8 - Dec 8): Normal operation, OPE ~85%, OEE ~92% 2. Crisis (Dec 9-11):
- Humidity drops to 25% (below 35% threshold)
- Dust spikes to 35 µg/m³ (above 25 µg/m³ threshold)
- AGV-ERR-99 (optical sensor obscured) errors spike
- Line 4 experiences material starvation
- OPE drops to 60%
3. Resolution: ML model identifies root cause → Cortex Agent recommends "Dust Mitigation Cycle"
Key Metrics
| Metric | Definition | |--------|------------| | OEE | Overall Equipment Effectiveness (Availability × Performance × Quality) | | OPE | Overall Process Efficiency (includes wait time and material flow) | | OEE-OPE Gap | Hidden inefficiency not captured by traditional metrics | | AGV | Automated Guided Vehicle — self-driving transport robots | | Starvation | Downtime due to material delivery delays | | AGV-ERR-99 | Optical sensor obscured (dust on LiDAR lens) |
Prerequisites
- Snowflake account (sign up for free trial)
- ACCOUNTADMIN role
> Note on Privileges: This guide uses ACCOUNTADMIN for simplicity in demo and learning environments. For production deployments, follow the principle of least privilege by creating a dedicated role with only the specific grants required.
Quick Start
Step 1: Run Setup
1. Open Snowsight → SQL Worksheet 2. Copy the entire contents of `scripts/setup.sql` 3. Paste and click Run All
> Note: Setup automatically executes two notebooks: > - VOLTSTREAM_EV_OPE_GENERATE_SYNTHETIC_DATA - Generates 5M+ rows of manufacturing data > - VOLTSTREAM_EV_OPE_AGV_FAILURE_PREDICTION - Trains ML model for predictive alerts > > Both notebooks are idempotent and can be re-run manually in Snowsight → Notebooks if needed.
Step 2: Access the Dashboard
Navigate in Snowsight:
- Streamlit Apps →
VOLTSTREAM_OPE_DASHBOARD
Step 3: Chat with Cortex Agent
Navigate in Snowsight:
- AI & ML → Snowflake Intelligence →
VOLTSTREAM_EV_OPE_AGENT
The agent includes pre-configured sample prompts - click any suggestion to get started, or try these:
Compare OPE vs OEE for Line 3 in December 2024
What are the top causes of starvation downtime?
How do I clean AGV optical sensors?
Show me humidity trends across all zones
Which shift has the worst AGV failure rate?
What Gets Created
| Object | Description | |--------|-------------| | Database | VOLTSTREAM_EV_OPE | | Schemas | RAW, ATOMIC, EV_OPE | | Warehouse | VOLTSTREAM_EV_OPE_WH (SMALL) | | Role | VOLTSTREAM_EV_OPE_ROLE | | Cortex Search | MFG_KNOWLEDGE_BASE_SEARCH | | Cortex Agent | VOLTSTREAM_EV_OPE_AGENT | | Streamlit | VOLTSTREAM_OPE_DASHBOARD (5 pages) | | Notebooks | 2 notebooks (data gen + ML) |
Repository Structure
sfguide-getting-started-cortex-ai-manufacturing-ope/ ├── scripts/ │ ├── setup.sql ← Run this to deploy everything │ ├── teardown.sql ← Run this to clean up │ └── semantic_models/ │ └── ope_semantic_model.yaml ├── streamlit/ ← Deployed from Git ├── notebooks/ ← Deployed from Git ├── data/ ← Markdown docs for Cortex Search └── README.md
Cleanup
To remove all demo objects:
1. Open Snowsight → SQL Worksheet 2. Copy the entire contents of `scripts/teardown.sql` 3. Paste and click Run All
Conclusion
Congratulations! You have successfully built an Intelligent Jidoka System that:
- Generates 5M+ rows of realistic manufacturing data with embedded crisis scenarios
- Deploys Cortex Search for RAG-powered knowledge retrieval over maintenance documentation
- Creates a Cortex Agent that combines analytics and knowledge to diagnose OPE issues
- Trains an ML model to predict AGV failures before they occur
- Launches an interactive dashboard for real-time OPE monitoring and alerts
You now have a complete AI-powered manufacturing intelligence platform running entirely on Snowflake.
License
Copyright (c) Snowflake Inc. All rights…
Excerpt shown — open the source for the full document.
Notability
notability 3.0/10Routine repo guide, low traction