Shift Handover Intelligence
AI-powered industrial shift handovers using Gemini
Inspiration
In March 2019, the Jiangsu Tianjiayi chemical plant explosion killed 78 workers and injured over 600. Investigations revealed that abnormal temperature readings were buried inside unstructured shift handover notes and never reached incoming operators. This is not an isolated failure. 60–73% of major industrial incidents trace back to poor shift handovers—critical alarms mixed with routine notes, inconsistent formats, and no prioritization. Industrial facilities run 24/7. Every shift change is a high-risk moment. Operators spend 30–45 minutes writing free-form handovers, while incoming staff must interpret dense, inconsistent text under time pressure. In pharmaceuticals, a missed reactor temperature can destroy a batch worth millions; in refineries, a missed alarm pattern can escalate into a safety incident. Shift handovers are mission-critical but stuck in the analog era. We built Shift Handover Intelligence to show how Gemini can transform unstructured, multimodal operational data into clear, actionable intelligence—so critical signals are never lost again.
What it does
Shift Handover Intelligence uses Google Gemini 3 to convert unstructured shift data into standardized, high-signal handover reports.
Operators provide:
• Shift Notes – free-form operational text • Alarm Data – JSON alarm logs • Trend Data – CSV process time-series
Gemini analyzes this multimodal input and generates:
• Executive Summary (2–3 key takeaways) • Categorized Events (Safety, Equipment, Process, Quality) • Critical Alarm Analysis with operational context • Open Issues prioritized with confidence levels • Recommended Actions for the next shift • Clarifying Questions when information is ambiguous Outputs are delivered as structured JSON + human-readable Markdown, with one-click PDF export for audits and compliance.
How we built it
Architecture
API-first, decoupled frontend and backend optimized for Gemini integration.
Backend (Python / FastAPI)
• FastAPI on Uvicorn ASGI • Google Gemini 3 (gemini-3-flash-preview) for reasoning and classification • Structured prompt design with schema-enforced outputs • Self-repair JSON pipeline using secondary Gemini calls • ReportLab for dynamic, professional PDF generation • SQLAlchemy + aiosqlite (async persistence) • Secure CORS configuration for cross-origin deployments
Frontend (Angular 18)
• Standalone component architecture • Reactive forms for multimodal input • RxJS for async workflows • Environment-based configuration for seamless deployment
Infrastructure
• Backend: Railway (Dockerized) • Frontend: GitHub Pages (CI/CD builds) • SQLite with UUID-based session management
Gemini-First Design
Our core innovation is prompt orchestration that forces Gemini to: • Separate observed facts from inferred hypotheses • Assign confidence scores to inferences • Use industrial-specific terminology • Produce dual outputs (JSON + Markdown) • Generate clarifying questions when data is incomplete
Challenges we ran into
• CORS deployment errors resolved by explicit origin whitelisting • Malformed Gemini JSON solved with a self-repair pipeline (99.5% success) • Angular 18 build changes causing GitHub Pages 404s due to /browser output • Prompt injection risks mitigated via input sanitization and schema validation • Token limits handled with intelligent truncation and trend summarization
Accomplishments that we're proud of
• Sub-2 second responses for typical handovers • 99.5% reliable structured output from Gemini • Zero hard-coded secrets (env-only configuration) • Full production deployment (Railway + GitHub Pages) • Auto-generated OpenAPI documentation • Cost-efficient: under $0.001 per handover
What we learned
Technical
• Prompt engineering is iterative (15+ refinements) • Reliable structure requires both prompt constraints and validation • Async database access significantly improves performance • Docker health checks are essential for cloud stability
Domain
• Operators value clarity and reliability over novelty • Confidence scoring builds trust in AI-assisted decisions • Clarifying questions turn Gemini into a collaborative system
Product
• PDF export became the most requested feature • Session persistence is essential for audit and compliance workflows
What's next
Short-term (1–3 months)
• Native integration with AVEVA PI System • Multi-language support for global plants • Role-based access control for supervisors
Medium-term (3–6 months)
• Cross-handover pattern detection • Predictive alerts for recurring issues • Tablet-optimized control-room UI
Long-term (6–12 months)
• Voice input via Whisper API • Integration with SAP PM and IBM Maximo • On-premise deployment for air-gapped facilities • Fine-tuned Gemini models on anonymized industrial data
Built With
- angular.js
- apis
- cloud
- css3
- databases
- docker
- fastapi
- frameworks
- gemini-3-flash-preview)
- github
- google-genai
- html5
- platforms
- pydantic
- python
- railway
- reportlab
- sdk
- sqlalchemy
- sqlite
- typescript
- uvicorn
Log in or sign up for Devpost to join the conversation.