{"title":"Long context window-based zero-shot legal interpretation of building codes and regulations","authors":"Jaekun Lee , Ghang Lee","doi":"10.1016/j.autcon.2025.106450","DOIUrl":null,"url":null,"abstract":"<div><div>South Korean authorities handle over 2000 inquiries daily about building code violations. Interpreting these complex, frequently updated codes is challenging, even for legal experts. Prior studies using large language models (LLMs) with retrieval-augmented generation (RAG) have struggled with context loss due to data segmentation. This paper proposes three automated building code interpreter (ABCI) models—Original, Inferred, and Filtered—that leverage long-context window (LCW) LLMs as the base model. On 171 challenging legal interpretative question-answering (LIQA) cases, ABCI-Filtered achieved 63.2 % accuracy, outperforming the RAG baseline approach (56.1 %), state-of-the-art LLMs like Claude 3.7 (60.2 %), as well as ABCI-Inferred (60.8 %) and ABCI-Original (56.7 %). Notably, unlike prior methods that require fine-tuning, ABCI-Filtered outperformed previous methods using only zero-shot reasoning. In an additional experiment using a relatively straightforward building code QA dataset, ABCI-Filtered and ABCI-Inferred outperformed the other methods (79.6 % and 80.0 %, respectively), confirming the difficulty of the initial task using the LIQA dataset.</div></div>","PeriodicalId":8660,"journal":{"name":"Automation in Construction","volume":"179 ","pages":"Article 106450"},"PeriodicalIF":11.5000,"publicationDate":"2025-08-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Automation in Construction","FirstCategoryId":"5","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S092658052500490X","RegionNum":1,"RegionCategory":"工程技术","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"CONSTRUCTION & BUILDING TECHNOLOGY","Score":null,"Total":0}
引用次数: 0
Abstract
South Korean authorities handle over 2000 inquiries daily about building code violations. Interpreting these complex, frequently updated codes is challenging, even for legal experts. Prior studies using large language models (LLMs) with retrieval-augmented generation (RAG) have struggled with context loss due to data segmentation. This paper proposes three automated building code interpreter (ABCI) models—Original, Inferred, and Filtered—that leverage long-context window (LCW) LLMs as the base model. On 171 challenging legal interpretative question-answering (LIQA) cases, ABCI-Filtered achieved 63.2 % accuracy, outperforming the RAG baseline approach (56.1 %), state-of-the-art LLMs like Claude 3.7 (60.2 %), as well as ABCI-Inferred (60.8 %) and ABCI-Original (56.7 %). Notably, unlike prior methods that require fine-tuning, ABCI-Filtered outperformed previous methods using only zero-shot reasoning. In an additional experiment using a relatively straightforward building code QA dataset, ABCI-Filtered and ABCI-Inferred outperformed the other methods (79.6 % and 80.0 %, respectively), confirming the difficulty of the initial task using the LIQA dataset.
期刊介绍:
Automation in Construction is an international journal that focuses on publishing original research papers related to the use of Information Technologies in various aspects of the construction industry. The journal covers topics such as design, engineering, construction technologies, and the maintenance and management of constructed facilities.
The scope of Automation in Construction is extensive and covers all stages of the construction life cycle. This includes initial planning and design, construction of the facility, operation and maintenance, as well as the eventual dismantling and recycling of buildings and engineering structures.