Skip to content

SafeRAG: A Large-Language-Model-Based Multistage Retrieval-Augmented Framework for Oil and Gas Safety Report Generation

Aug 2026 · SPE Journal · 0 citations · 30 references

Abstract

In high-risk industrial settings, leveraging large language models (LLMs) for automated accident analysis and generating safety reports has emerged as an efficient workflow. However, this approach is fundamentally constrained by the models’ inherent knowledge limitations, frequently resulting in analyses that lack domain-specific understanding and regulatory alignment. To tackle this issue, we introduce SafeRAG, a multistage retrieval-augmented framework for safety report generation. Specifically, the framework uses an entity-centric approach that prompts the LLMs to internally generate domain-specific knowledge. Concurrently, it performs a hierarchical retrieval of external regulations relevant to the accident at topic, concept, and context levels. To obtain well-structured reports, we leverage prompt engineering, integrating internal and external knowledge. Furthermore, a domain-expert persona is also assigned to help LLMs analyze accidents from a specific perspective. To evaluate our approach, we construct a data set from 10,818 accident-description/report pairs collected from real-world industry reports. Experiments show that SafeRAG substantially outperforms baseline LLMs on metrics that include bidirectional encoder representations from transformers (BERTScore) and bidirectional auto-regressive transformers (BARTScore), demonstrating the effectiveness of our approach.

View source

Similar papers

Open access Aug 2026

TMCAS: Efficient Large Language Model-Assisted Topic Modeling for Civil Aviation Safety Reports

This paper proposes TMCAS, an efficient large language model-assisted topic modeling framework for civil aviation safety reports that achieves superior clustering and interpretability while substantially reducing inference cost compared with document-wise LLM baselines.

Xiangge Li, Haofeng Wang, Xiuting Zhou et al. · 0 citations
Aug 2026

PAMI-GPT: knowledge-grounded LLMs for reliable pattern mining workflow generation

Experimental evaluation on 300 realistic pattern mining tasks demonstrates consistent improvements in algorithm configuration accuracy, parameter compliance, and dataset specification correctness across zero-shot, one-shot, and few-shot settings, highlighting the effectiveness of inference-time domain grounding for enabling more reliable and reproducible pattern mining workflows without requiring model retraining.

Madhavi Palla, Uday Kiran Rage, Arjun Chakravarthi Pogaku · 0 citations
Preprint Jul 2026

Knowledge-Centric Agents for Workflow Generation in ComfyUI

This work argues that successful workflow generation requires modeling knowledge itself, including its structure, hierarchy, and reasoning dynamics, and proposes a knowledge-centric framework that learns to invert, inject, and infer with knowledge across multiple abstraction levels.

Zhendong Li, Lei Sun, Ruibo Ming et al. · 0 citations
Conference Jul 2026

Detecting Software Requirements Smells Through Domain-Augmented Generation

Context: The quality of software requirements is a critical determinant of success in mission-critical and large-scale software systems. Requirements smells, which indicate potential quality issues in software requirements, such as imprecision, ambiguity, and poor verifiability, can significantly impact project outcomes. Despite their crucial role in software projects, software requirement documents often contain inconsistencies, ambiguities, and conflicts that are challenging to detect and manage manually. Objective: We aim to develop a novel approach using data representation and a large language model (LLM) based approach to improve the detection of conflict and ambiguity requirements smells. Method: We construct domain-specific vector databases from software requirements and domain knowledge documents, where vectors represent embedded requirements and contextual domain information. These databases are populated offline and utilized during inference time for semantic similarity-based retrieval and smell detection. We compare our domain-augmented generation based approach with traditional reasoning-based methods for performance evaluation using diverse retrievers. Additionally, we include zero-shot and one-shot prompt techniques. Results: Our experimental results demonstrate that our RAGbased approach detects requirements smells across multiple datasets using five LLMs: Claude 3.5 Sonnet, Claude 3.7 Sonnet, GPT-4o, o3-mini, and GPT-5. For conflict smell detection, compared to previous approaches on cross-datasets, these models have superior F1 scores, up from 0.566-0.804 to 0.676–0.857. The integration of domain knowledge showed mixed results, generally improving recall while decreasing precision and F1 scores. For ambiguity smell detection, the GPT-5 model achieved an F1 score of 0.783 compared to 0.762 of previous approaches. LLM-based approaches, besides GPT-4o, had better precision scores compared to previous approaches. Domain knowledge integration substantially increased the F1 score of the tested LLMs, with the most significant improvement observed in Claude 3.7 Sonnet, which rose from 0.526 to 0.677. In contrast, misleading or low-quality domain knowledge decreased F1 scores. Conclusions: The proposed RAG-based approach offers a promising automated solution for detecting requirements smells, demonstrating competitive performance compared to existing methods. Integrating domain knowledge enhances detection capabilities while highlighting the importance of balancing precision and recall.

Orhun Aysan, Giray Akyol, Eray Tüzün · 0 citations
Conference Jul 2026

Retrieval-Augmented Large Language Models for Evidence-Based Hazard Log Generation in Emerging Aviation Systems

We introduce a retrieval-augmented synthesis pipeline for deriving structured hazard logs for emerging aviation concepts from historical aviation accident evidence. NTSB accident reports are transformed into a schema-consistent corpus combining coded findings and narrative mechanisms for semantic indexing. Mechanism-level retrieval uses sentence-transformer embeddings, a FAISS inner-product index, evidence-derived seed extraction, and maximal marginal relevance to obtain diversified, scenario-relevant cases. Hazard generation is constrained by strict JSON schema validation, one-to-one evidence binding, explicit causal sequencing, and enforced primary-mechanism uniqueness. A multipass strategy with critic-based filtering and deterministic de-duplication improves robustness against mechanism repetition and evidence drift. Evaluation of an urban eVTOL safety-landing scenario compares locally deployed open-weight models under identical constraints. Retrieval augmentation supports mechanism-specific and traceable hazard derivation compared to unconstrained scenario-based prompting. Mistral-7B requires multipass generation to achieve acceptable mechanism diversity and evidence consistency, whereas GPT-OSS-20b produces structurally valid and mechanism-differentiated hazard sets in a single pass. Scaling to GPT-OSS-120b yields only marginal improvements at substantially higher computational cost.

Michael Schultz, Simon Göppel · 0 citations