Building codes are complex documents that pose significant challenges for consistent interpretation and efficient compliance checking in the construction industry. Existing automated methods often overlook the interrelationships between provisions and lack comprehensive evaluation support from practical engineering perspectives. In this study, we develop a retrieval-augmented generation (RAG) system enhanced with a knowledge graph to interpret building codes by leveraging both the semantic content and structural relationships within the documents. We evaluated the system using 661 query-context-answer triplets from a particular building code. The RAG-enhanced model outperformed state-of-the-art pretrained transformer models and general-purpose large language models (LLMs) in answer quality. Shorter text chunks led to higher semantic relevance, while longer chunks improved precision. The closed-source model achieved better accuracy and speed than the open-source alternative. These findings demonstrate the potential of knowledge-graph-based RAG systems to support accurate, efficient, and scalable regulatory interpretation in real-world engineering contexts.
No takes yet. Share an insight, caveat, or question.
Yang et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: