How mobility-smglab/rca_agent works
RCA Intellect accepts manufacturing failure context, logs, and optional defect imagery; its analysis pipeline retrieves historical evidence, detects visual and telemetry defects, dynamically selects causal analyses, and produces structured findings and a consolidated report. A FastAPI dashboard supports uploads, run monitoring, downloads, and interactive knowledge-base management. The graph preserves documented analysis capabilities and sampled module relationships; some orchestration details are based on README statements because the relevant portions of main.py were not shown.
Main entry points: main.py RCA pipeline · rag_service.py RAG service · models.py Output schemas · server.py FastAPI API
Components 25
Web experience
- Dashboard UI
static/app.js - FastAPI API
server.py
RCA analysis
- RCA pipeline
main.py - Image analysis
agents/image_analysis.py - Anomaly detection
agents/anomaly_detection.py - Analysis selection
main.py - 5-Why analysis
agents/five_why.py - Ishikawa analysis
agents/ishikawa.py - Pareto analysis
agents/pareto.py - Evidence graph
agents/evidence_graph.py
Knowledge retrieval
- RAG service
rag_service.py - RAG agent tool
tools/rag_tool.py - Qdrant store
data/qdrant_db - NCR ingestion
ingest_ncr.py - CAPA ingestion
ingest_capa.py
Reports and schemas
- Output schemas
schemas/models.py - 5-Why report
tools/fivewhy_generator.py - Fishbone report
tools/ishikawa_generator.py - Pareto report
tools/pareto_generator.py - Evidence report
tools/evidence_graph_generator.py - Merged RCA PDF
main.py
Other components
- Engineer
- Web browser
- Azure OpenAI
- Qdrant
Connections 34
- Engineer → Dashboard UI: uses
README.md - Web browser → FastAPI API: requests
README.md - Dashboard UI → FastAPI API: submits runs
- FastAPI API → RCA pipeline: triggers run
server.py - RCA pipeline → RAG service: retrieves NCR evidence
main.py - RCA pipeline → Image analysis: analyzes imagery
README.md - RCA pipeline → Anomaly detection: analyzes logs
README.md - RCA pipeline → Analysis selection: selects analyses
README.md - Analysis selection → 5-Why analysis: dispatches
README.md - Analysis selection → Ishikawa analysis: dispatches
README.md - Analysis selection → Pareto analysis: dispatches
README.md - Analysis selection → Evidence graph: dispatches
README.md - Image analysis → Azure OpenAI: queries vision model
README.md - Anomaly detection → Azure OpenAI: queries model
agents/anomaly_detection.py - RCA pipeline → Output schemas: validates outputs
main.py - Image analysis → Output schemas: returns typed result
agents/image_analysis.py - Anomaly detection → Output schemas: returns typed result
agents/anomaly_detection.py - 5-Why analysis → Output schemas: returns typed result
agents/five_why.py - Ishikawa analysis → Output schemas: returns typed result
agents/ishikawa.py - Pareto analysis → Output schemas: returns typed result
agents/pareto.py - Evidence graph → Output schemas: returns typed result
agents/evidence_graph.py - RCA pipeline → 5-Why report: generates report
main.py - RCA pipeline → Fishbone report: generates report
main.py - RCA pipeline → Pareto report: generates report
main.py - RCA pipeline → Evidence report: generates report
main.py - RCA pipeline → Merged RCA PDF: merges PDFs
README.md - RAG agent tool → RAG service: searches
tools/rag_tool.py - RCA pipeline → RAG agent tool: uses search
- RAG service → Qdrant: queries and updates
rag_service.py - RAG service → Qdrant store: persists vectors
- NCR ingestion → RAG service: ingests documents
ingest_ncr.py - CAPA ingestion → RAG service: ingests documents
ingest_capa.py - FastAPI API → RAG service: queries and manages
server.py - FastAPI API → Dashboard UI: serves interface