Prompt Engineering in Construction Safety: A Comparative Study of Zero-Shot, One-Shot, and Few-Shot Strategies for Accident Classification
Abstract
This study presents a novel prompt engineering framework for automated semantic classification of construction accident categories by processing real-world accident reports. Focusing on detailed accident narratives, we examine zero-shot, one-shot, and few-shot prompting techniques in this framework. Our framework enables automatic binary classification of construction accidents, eliminating the need for manual reading of construction narratives. For our case study, we curated a balanced dataset of 300 OSHA accident reports and extracted narrative descriptions, followed by application of the framework. The analysis provides quantitative evidence of their performance in this classification task and draws insightful discussions on the rationale behind their performance differences. While results demonstrate promising outcomes across all approaches, their fundamental differences in this classification task are presented. The findings reveal the impact of prompt engineering on model performance, offering a robust and scalable framework for analyzing unstructured safety narratives and enhancing risk assessment in construction safety management.
Fields of Study & Subjects
Occupational Health and Safety Research
Topic Modeling
Text and Document Classification Technologies
Publication details
- Journal / source
- ASCE International Conference on Computing in Civil Engineering (i3CE)
- Pages
- 786–794
- Publication date
- 28 January 2026