Leveraging Quantized Language Models for Automating Behavioral-Based Safety Observations Analysis
摘要
The oil and gas industry faces significant safety challenges, making behavioral-based safety (BBS) a critical approach to mitigating risks by focusing on human behavior. Traditionally, safety observations are analyzed manually, a process prone to errors and inefficiencies, particularly when handling large datasets with unstructured narratives. This research introduces an automated pipeline leveraging open-source pretrained language models (LLMs) to streamline BBS narrative report analysis and categorize at-risk observations. Three 4-bit quantized LLMs (Llama 3.1: 8B, Gemma 2: 9B, Mistral-Nemo: 12B) were evaluated for accuracy and inference speed on 10 sample BBS reports, with Gemma 2 selected for its superior performance. To improve the performance of the auto BBS analyzer, techniques such as in-context learning (ICL) and chain-of-thought (CoT) prompting were employed. The model's results were then manually evaluated on 400 sample BBS reports, yielded accuracies of 98% for task identification, 94.5% for positive observations, 97% for at-risk observations, 95.3% for follow-up actions, and 97% for risk categorization. However, due to the absence of a ground truth dataset, further validation by safety experts is necessary to refine the model’s understanding of industry-specific terms and scenarios. The analysis results were visualized in Power BI dashboards, highlighting frequent terms in positive and at-risk observations, and supporting proactive safety interventions. This study demonstrates the potential of open-source LLMs to enhance safety management in high-risk industries by automating BBS report analysis on corporate servers, ensuring secure handling of proprietary data and offering insights to improve safety outcomes.