Llm-querybc: An llm-based regulation query system for textual and tabular information in building codes

Zhu, X.; Ma, J.; Chen, W. and Tan, Y. (2026) Llm-querybc: An llm-based regulation query system for textual and tabular information in building codes. Journal of Construction Engineering and Management, 152(6): 04026075, ISSN 0733-9364

Abstract

The process of querying building codes has long been time-consuming and labor-intensive, requiring extensive manual effort to repeatedly consult and confirm regulations throughout design and review phases. Existing regulation query systems are limited to simple searches, often resulting in errors and failing to provide intelligent responses to users. Although the emergence of large language models (LLMs) offers potential solutions due to their natural language processing abilities, they face challenges such as insufficient domain knowledge, semantic misalignment, and difficulties in handling complex tabular data. To address these limitations, we propose a novel system, LLMs Query Building Codes (LLM-QueryBC), which integrates LLMs with a semantic network-enhanced retrieval-Augmented generation (SN-RAG) for text-based queries and a specialized agent called Agent for Tables in Building Codes (TaBCe) for tabular queries. TaBCe leverages the Reasoning and Acting (ReAct) framework, think-by-structure planning method, RAG, computational tools, and a memory module to enhance its functionality. The system autonomously determines internal logic, invokes external tools, and mitigates hallucination issues associated with LLMs in the building code domain. We evaluated our system using fire safety regulations-a critical domain due to its impact on life safety, property protection, and legal compliance. Experimental results demonstrated significant improvements: Textual query accuracy increased by 24%, and tabular query accuracy rose by 25%. Additionally, we conducted a case study involving fire safety code queries for a real-world design of a mixed-use high-rise building, further validating the system's practical applicability. These advancements offer greater value to users and promote broader adoption of intelligent regulation query systems.

Item Type: Article
Uncontrolled Keywords: artificial intelligence; building codes; large language model; regulation query; tabular query
Index terms: compliance, face, planning method, large language model, misalignment, high-rise building, building code, fire safety, module, agent, emergence, functionality, case study, artificial intelligence, regulation, accuracy, reasoning
Subjects: design features, data science, construction type, architectural elements, cognitive psychology, regulatory law, systems engineering, psychology, urban planning, engineering problems, artificial intelligence, political science, data collection methods, health safety and environment, professional development, practitioner
Topics: Roles and Professions, Information Management, Governance, Digital Applications, Research Practice, Engineering Principles, Legal Issues, Construction Technology, Health and Safety, Design Practice, Organizational Design
Descriptive scope: 3 PCE

N.B. Descriptive scope is a count of how many of the five facets of empirical research are indicated by the words used in title, abstract and keywords. It is not intended as a judgement on the research; merely a count of the kind of word we would expect to indicate Phenomenon, Concepts, Theoretical framing, Empirical techniques, Analytical techniques. If all five are present, then a code of “5 PCTEA” will indicate this. If you feel the coding for this record is questionable, we welcome discussion around the terms we matched or the way we categorized them. The facet you would expect may not be coded, or a facet may be coded inappropriately. This can also bear on a larger question, of which facets should be treated as defining in construction management research. Please get in touch, and we will look at it. More details here