Safety Intelligence
Inspiration
Every workplace incident contains lessons that can prevent the next one. However, incident investigations are often inconsistent, time-consuming, and heavily dependent on the experience of individual investigators.
Safety Intelligence was created to help safety professionals investigate incidents more consistently, identify underlying causes, recommend practical preventive actions, and generate professional reports with AI assistance.
What it does
Safety Intelligence is an AI-powered workplace safety investigation assistant.
It supports the investigation workflow from incident input to a completed report:
- Protects sensitive information through local PII masking before OpenAI processing
- Analyzes direct causes and underlying contributing factors
- Recommends corrective and preventive actions
- Retrieves relevant historical cases
- Supports human review and approval
- Generates structured HTML, ODT, and PDF investigation reports
- Supports multilingual outputs
The Build Week demo uses synthetic incident data only. It does not contain real company, employee, or workplace incident information.
How we built it
Safety Intelligence combines a FastAPI web application, a structured incident workflow, local privacy protection, retrieval-augmented generation, and OpenAI GPT-5.6.
The Build Week workflow is:
- A user enters or selects a synthetic incident
- Sensitive information is detected and masked locally
- Minimized incident data is sent to OpenAI
- GPT-5.6 returns structured analysis results
- The user reviews the findings and recommended actions
- Safety Intelligence generates a professional investigation report
The application uses Structured Outputs and strict function calling to keep the model response aligned with the required investigation schema.
The masking, analysis, and report-generation stages are separated so that individual components can be replaced later. In the commercial architecture, privacy processing can be moved to a dedicated private service without redesigning the complete workflow.
How we used Codex
Codex was used throughout Build Week as a development and verification partner.
It helped us:
- Review the existing application architecture
- Implement and refine the Build Week configuration
- Separate the submission repository from the commercial development repository
- Improve the English user interface and documentation
- Create and validate synthetic demonstration data
- Run regression, security, packaging, and layout checks
- Prepare a clean and reproducible GitHub submission
The final submission repository was independently prepared without modifying the original commercial development repository.
Challenges we ran into
The main challenge was balancing the flexibility of generative AI with the consistency required for safety investigations.
Safety-related outputs cannot rely only on unrestricted free-form generation. We therefore used structured workflows, schema-constrained outputs, validation, historical-case retrieval, and human review.
Another challenge was presenting a realistic product while protecting future commercial architecture and avoiding the use of confidential incident data. We addressed this by creating an independent submission repository and using synthetic data throughout the demo.
Accomplishments that we're proud of
- Built a working end-to-end safety investigation application
- Implemented local PII masking before OpenAI processing
- Added structured root-cause and corrective-action analysis
- Generated professional ODT and PDF reports
- Created 100 synthetic incident cases and quality evaluation data
- Completed 13,931 regression tests with zero failures
- Verified that no API keys, personal paths, databases, logs, or private incident data were included in the submission
What we learned
Building AI for a safety-related workflow requires more than selecting a capable language model.
Reliable results depend on:
- Structured data
- Clear system boundaries
- Privacy protection
- Output validation
- Evidence-based retrieval
- Human review
- Honest communication about system limitations
OpenAI models are most valuable when integrated into a controlled workflow rather than used as an unrestricted text generator.
What's next for Safety Intelligence
Future development will focus on:
- Private-cloud privacy protection
- Organization-specific safety knowledge bases
- More international public incident sources
- Enterprise safety-management-system integration
- Team collaboration and approval workflows
- Continuous evaluation of analysis quality
- Secure multi-tenant commercial deployment
Built With
- ai
- codex
- docker
- fastapi
- function-calling
- gpt-5.6
- javascript
- openai
- pii-masking
- privacy
- python
- rag
- safety
- sqlite
- structured-outputs
- workplace-safety
Log in or sign up for Devpost to join the conversation.