Using Large Language Models for the Interpretation of Building Regulations

📄 arXiv: 2407.21060v1 📥 PDF

作者: Stefan Fuchs, Michael Witbrock, Johannes Dimyadi, Robert Amor

分类: cs.CL, cs.AI

发布日期: 2024-07-26

备注: Presented at the 13th Conference on Engineering, Project and Production Management


💡 一句话要点

利用大型语言模型解释建筑法规,实现自动合规性检查。

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 建筑法规 合规性检查 LegalRuleML 自然语言处理

📋 核心要点

  1. 传统建筑法规合规性检查依赖人工,效率低且易出错,将自然语言法规转换为机器可读格式成本高昂。
  2. 利用大型语言模型(LLM)的文本生成能力,自动将建筑法规翻译为LegalRuleML等可计算的语义表示。
  3. 通过少量样本学习和系统提示,使LLM能够理解LegalRuleML结构,并利用预训练知识进行法规转换。

📝 摘要(中文)

合规性检查是建筑项目的重要组成部分。建筑信息模型(BIM)在建筑行业的快速普及为自动合规性检查(ACC)创造了更多机会。BIM能够共享数字建筑设计数据,用于检查是否符合法律要求,而法律要求通常以自然语言传达,并非为机器处理而设计。创建适用于ACC的法律要求的可计算表示形式既复杂、成本高昂又耗时。诸如生成式预训练Transformer(GPT)、GPT-3.5和GPT-4等大型语言模型(LLM)可以生成逻辑连贯的文本和源代码来响应用户提示。这种能力可用于自动将建筑法规转换为语义和可计算的表示形式。本文评估了LLM在少量样本学习设置中将建筑法规翻译成LegalRuleML的性能。通过仅向GPT-3.5提供几个示例翻译,它可以学习该格式的基本结构。使用系统提示,我们进一步指定LegalRuleML表示形式,并探索模型中是否存在专家领域知识。这种领域知识可能通过广泛的预训练而根深蒂固于GPT-3.5中,但需要通过仔细的语境化来激发。最后,我们研究了诸如思维链推理和自我一致性等策略是否适用于此用例。随着LLM变得越来越复杂,常识、逻辑连贯性和领域适应性的提高可以显著支持ACC,从而提高检查过程的效率和有效性。

🔬 方法详解

问题定义:论文旨在解决建筑法规合规性检查中,将自然语言法规转换为机器可读格式的难题。现有方法依赖人工或复杂的专家系统,成本高昂且效率低下。痛点在于法规的自然语言形式与机器处理的需求之间存在鸿沟。

核心思路:核心思路是利用大型语言模型(LLM)强大的自然语言理解和生成能力,将建筑法规自动翻译为LegalRuleML等可计算的语义表示。通过少量样本学习,使LLM能够理解目标格式的结构,并利用其预训练知识进行法规转换。

技术框架:该方法主要包括以下几个阶段:1) 准备少量示例的建筑法规及其对应的LegalRuleML表示;2) 使用少量样本学习,训练LLM理解LegalRuleML的结构;3) 通过系统提示,引导LLM生成符合规范的LegalRuleML代码;4) 探索思维链推理和自我一致性等策略,提高LLM的推理能力和生成质量。

关键创新:关键创新在于利用LLM的zero-shot或few-shot学习能力,避免了从头构建专家系统或手动编写大量规则的繁琐过程。通过精心设计的prompt,激发LLM内部蕴含的领域知识,实现自动化的法规转换。

关键设计:论文重点在于prompt的设计,包括系统提示和示例选择。系统提示用于明确LegalRuleML的语法和语义,示例选择则影响LLM的学习效果。此外,论文还探索了思维链推理和自我一致性等策略,以提高LLM的推理能力和生成质量。具体参数设置和网络结构未在摘要中体现,属于未知信息。

📊 实验亮点

论文评估了GPT-3.5在少量样本学习设置中将建筑法规翻译成LegalRuleML的性能。通过提供少量示例,GPT-3.5能够学习LegalRuleML的基本结构。研究还探索了系统提示、思维链推理和自我一致性等策略对LLM性能的影响。具体的性能数据和提升幅度未在摘要中体现,属于未知信息。

🎯 应用场景

该研究成果可应用于建筑行业的自动合规性检查,提高设计和施工过程的效率,降低合规成本。未来,结合BIM模型,可以实现更智能化的法规解读和冲突检测,辅助建筑师和工程师进行设计决策,并减少人为错误。

📄 摘要(原文)

Compliance checking is an essential part of a construction project. The recent rapid uptake of building information models (BIM) in the construction industry has created more opportunities for automated compliance checking (ACC). BIM enables sharing of digital building design data that can be used for compliance checking with legal requirements, which are conventionally conveyed in natural language and not intended for machine processing. Creating a computable representation of legal requirements suitable for ACC is complex, costly, and time-consuming. Large language models (LLMs) such as the generative pre-trained transformers (GPT), GPT-3.5 and GPT-4, powering OpenAI's ChatGPT, can generate logically coherent text and source code responding to user prompts. This capability could be used to automate the conversion of building regulations into a semantic and computable representation. This paper evaluates the performance of LLMs in translating building regulations into LegalRuleML in a few-shot learning setup. By providing GPT-3.5 with only a few example translations, it can learn the basic structure of the format. Using a system prompt, we further specify the LegalRuleML representation and explore the existence of expert domain knowledge in the model. Such domain knowledge might be ingrained in GPT-3.5 through the broad pre-training but needs to be brought forth by careful contextualisation. Finally, we investigate whether strategies such as chain-of-thought reasoning and self-consistency could apply to this use case. As LLMs become more sophisticated, the increased common sense, logical coherence, and means to domain adaptation can significantly support ACC, leading to more efficient and effective checking processes.