Safety documentation assistant
The safety team used a structured hazard-analysis workbook. I built an assistant that drafts the analysis from photographs and a short note, while keeping every field editable before export.
≈2 slongest request, down from 107.6 s
PhotographsEditable draftHuman review
The user confirms the analysis before it reaches the workbook.
Method and results
- Two vision calls run in sequence: the first drafts a structured cause analysis and the second converts it into an editable grid. The schema requires every category.
- Before writing the code that fills the template, I wrote a 23-check script to confirm that openpyxl would not damage its formatting.
- Field limits were derived from the destination template so generated text fits the existing workflow.
- The model never fills the fields that need human judgement: likelihood, severity, risk score, owner and status.
- After moving to FastAPI, I redesigned long-running analysis as a background job to work reliably within the QA environment's request limits. The longest request fell to about 2 seconds.