03 - Process Safety - Hybrid RAG

PreventA

A process-safety workspace that turns HAZOP and LOPA methodology into structured, auditable software, with a grounded AI layer that suggests causes, consequences and safeguards from plant documentation.

Role Designer & Engineer Year 2025 Stack FastAPI - PostgreSQL - pgvector - React - Hybrid RAG

Safety studies are rigorous, but the workflow is still too document-shaped.

HAZOP and LOPA work depends on structure: nodes, guidewords, deviations, causes, consequences, safeguards, risk ranks and approvals. When that structure lives in spreadsheets and long documents, it becomes hard to search, compare, reuse and audit.

PreventA keeps the methodology intact while moving the work into a product surface: each study is decomposed into typed records, risk state is visible, and AI suggestions stay clearly separated from approved engineering decisions.

A structured safety workspace, not a chatbot on top of PDFs.

I designed the product around the actual safety-study objects: studies, nodes, deviations, safeguards, risk matrix cells and source-backed recommendations.

  • HAZOP worksheets. Guideword-driven rows capture deviation, cause, consequence, safeguards and recommendations per study node.
  • Risk matrix. A 5x5 severity/probability matrix makes initial and residual risk visible before decisions are signed off.
  • Grounded AI suggestions. Hybrid retrieval combines keyword and vector search over plant documentation, then attaches citations to suggestions.
  • Audit boundary. Suggested content is review material until an engineer approves it into the study record.

The product tour: worksheet first, AI second.

The strongest screens are the HAZOP worksheet and risk matrix. Together they show the core product promise: keep the safety method structured while using AI to accelerate evidence gathering and first-pass recommendation drafting.

PreventA HAZOP worksheet with study nodes, deviation rows and AI suggestions.

HAZOP workspace

Every deviation is a typed record.

The worksheet captures guideword, deviation, causes, consequences, safeguards and recommendation status in one review surface.

  • Study nodes and deviations stay structured.
  • Causes, consequences and safeguards can be reviewed row by row.
  • AI suggestions remain visibly separate from approved entries.
PreventA 5 by 5 risk matrix with color-coded likelihood and severity cells.

Risk matrix

Initial and residual risk stay visible.

The 5x5 matrix gives engineers a shared language for ranking severity and likelihood before and after safeguards.

  • Color-coded cells make high-risk combinations obvious.
  • Initial and residual risk can be compared during review.
  • The matrix anchors recommendations to a repeatable method.

Source grounding

Suggestions cite the plant context.

The retrieval layer uses full-text and vector search, then keeps source-backed suggestions distinct from approved study rows.

  • Hybrid retrieval combines keyword and vector matching.
  • Sources are used as evidence, not hidden prompt context.
  • Review status protects the audit trail.

A product architecture aligned with safety review flow.

The system is built so deterministic study data and probabilistic AI suggestions never collapse into one ambiguous blob.

01

Study model

Nodes, deviations, safeguards and risk cells are stored as structured records that can be filtered, audited and compared across studies.

02

Hybrid retrieval

Postgres full-text search and pgvector retrieval are fused to find relevant plant docs, incident notes and prior safeguards.

03

Review boundary

AI output enters as a suggestion with source context; human approval is required before it becomes part of the official worksheet.

What changed.

HAZOP
guideword workflow captured as structured software
5x5
risk matrix embedded directly into study review
RRF
hybrid retrieval combining text and vector search
Audit
AI suggestions separated from approved engineering decisions

More from the build.