Safety documentation assistant

Reached the QA server Jul to Aug 2026
  • React
  • FastAPI
  • Azure OpenAI
  • openpyxl
  • Redis

The safety team recorded each hazard analysis as a KYT cause tree and a 5M1E grid in a fixed Excel template. The assistant drafts both from before-and-after photographs and a one-line note. The user can edit every field before it fills the team's own template.

≈2 slongest request, down from 107.6 s
Real interface, sample content. Each counter is sized to the template cell its text lands in.

Method and results

  1. Two vision calls run in sequence. The first builds the cause tree and the second converts it into the 5M1E grid. The schema marks every category as required, so none can be skipped.
  2. Before writing the code that fills the template, I wrote a 23-check script to confirm that openpyxl would not damage its formatting.
  3. Field limits of about 70 and 52 characters were measured from the real cells and written into the prompts.
  4. The model never fills the fields that need human judgement: likelihood, severity, risk score, owner and status.
  5. I moved it from Flask to FastAPI (28.2 s to 11.0 s per run), then merged it into the team's shared platform. On QA a proxy cut requests after 30 idle seconds, so I made analysis a polled background job, and the longest request fell from 107.6 s to about 2 s.
  6. I did not measure the time saved per document, so I do not claim a figure.