TL;DR
Construction safety regulations are complex and often require piecing together information from multiple clauses to answer questions. This paper introduces BifrostRAG, a novel system that uses two interconnected knowledge graphs and a hybrid retrieval method to help Large Language Models (LLMs) understand and answer these multi-hop questions more accurately. BifrostRAG significantly outperforms existing methods, paving the way for better automated compliance checking in construction.
What Problem Does This Paper Address?
Ensuring safety on construction sites is paramount, but the sheer volume and complexity of safety regulations make it difficult for workers and safety professionals to navigate. These regulations are not simple lists of rules; they often contain intricate relationships like exceptions, conditions, and complementary requirements that are spread across different sections or even documents. Answering a single safety question might require synthesizing information from several disparate clauses, a process known as "multi-hop question answering." Traditional information retrieval methods struggle with this complexity, leading to potential gaps in understanding and, consequently, safety risks. This paper aims to bridge this gap by developing a system that can effectively understand and reason over these complex regulatory structures.
Methods
The core innovation of this paper is the BifrostRAG system, which employs a dual knowledge graph architecture and a hybrid retrieval mechanism.
- Dual Knowledge Graphs:
- Entity Network Graph (ENG): This graph models linguistic relationships between regulatory entities (words, phrases) at a fine-grained level. It captures semantic similarities and interrelationships, even when not explicitly stated.
- Document Navigator Graph (DNG): This graph represents the structural relationships between regulatory sections, focusing on hierarchical structures (parent-child relationships) and explicit cross-references.
- Hybrid Retrieval Mechanism: This mechanism combines two approaches:
- Semantic Search: Utilizes vector embeddings to find semantically similar entities and triples, capturing implicit connections based on shared terminology.
- Structural Traversal: Leverages the DNG to navigate explicit hierarchical and cross-reference links between sections, ensuring a structured approach to information gathering.
- LLM-Assisted Pipeline: The system uses LLMs throughout the process for:
- Knowledge Graph Construction: Extracting entities, relationships, and validating information. An "incremental entity refiner" is used to consolidate similar entities and improve matching accuracy.
- Question Answering: Decomposing user queries, retrieving relevant information using the hybrid mechanism, and synthesizing a coherent answer.
Datasets
The research utilizes the OSHA 1926 (Safety and Health Regulations for Construction) standard as its primary dataset. A custom multi-hop question dataset was created for evaluation, consisting of 93 questions designed to specifically test the system's ability to handle complex, multi-hop reasoning across different regulatory subparts and relationship types.
Key Insights and Ideas
- The Power of Dual Representation: The paper strongly suggests that a single knowledge graph (either purely semantic or purely structural) is insufficient for complex regulatory reasoning. Combining both linguistic (ENG) and structural (DNG) representations is crucial for capturing the nuances of safety regulations.
- Hybrid Retrieval is Key: Simply relying on semantic similarity or graph traversal alone is not enough. The synergy between these two approaches in BifrostRAG's hybrid retrieval mechanism is what allows it to effectively bridge fragmented information and handle multi-hop queries.
- LLMs as Graph Builders: The research demonstrates that LLMs can be effectively leveraged not just for answering questions but also for the complex task of building and refining knowledge graphs from unstructured text, reducing the need for manual annotation.
- Implicit Relationships Matter: Many critical regulatory connections are not explicit. BifrostRAG's ability to capture these implicit relationships through semantic similarity is a significant advantage over methods that rely solely on explicit links.
Key Results
BifrostRAG achieved impressive results on the multi-hop question dataset:
- Overall Performance: 92.8% precision, 85.5% recall, and an F1 score of 87.3%.
- Superiority over Baselines: BifrostRAG significantly outperformed:
- Vector-based RAG (OpenAI Playground): Precision 91.1%, Recall 69.5%, F1 75.0%.
- Graph-based RAG (Neo4j): Precision 71.4%, Recall 50.8%, F1 56.5%.
- LLM-only (GPT-40 without RAG): Achieved only 25.8% precision and 40.7% recall, highlighting significant hallucination issues.
- Robustness: The system demonstrated statistically significant improvements in recall and F1 scores compared to both vector-only and graph-only RAG approaches.
Limitations and Future Work
- Domain Specificity: The current system is validated on OSHA 1926. Future work should explore its transferability to other regulatory domains and organizational documents.
- Methodological Exploration: Further research into agentic approaches for RAG and comparisons with other LLM-based knowledge graph construction methods are suggested.
- Scalability: While the current knowledge graphs are substantial, investigating the impact of graph scale on retrieval efficiency and QA quality is an important next step.
- Broader LLM Integration: Exploring more adaptive RAG paradigms and further refining LLM integration for multi-hop QA in dynamic scenarios is recommended.
Summary updated