1 of 23

checkMate

Carla Cortez�Redwan Hussain�Kam Kasravi�Edward Kirton�Ryan Wilson�

A novel approach to Building Code Compliance with Large Language Models

2 of 23

OUR TEAM

Carla Cortez�Software & Web Dev, Blockchain

Kam Kasravi�Artificial Intelligence, Cloud

Redwan Hussain�Industrial Controls & Automation

Ed Kirton�Data Science, BioInformatics

Ryan Wilson�Analytics, Education Management

David Fenster, AIA LEED AP�Subject Matter Expert, Architecture

3 of 23

MOTIVATION

Address Construction Industry Challenges

  • Architects and construction firms experience delays with plan-checkers

  • Verifying code compliance is very complex, and still performed manually

  • Regulatory costs can raise the cost of a home by 24%*

4 of 23

MOTIVATION

Digitizing this process can reduce delays and associated overhead costs for firms and prospective homeowners

Target Audience

Architecture, Engineering, and Construction (AEC) firms

5 of 23

VALUE PROPOSITION

Automated Compliance Reports

Building Standards and Codes

Building Information Modeling (BIM) Program Files

Compare project files against building codes…

… and auto-generate compliance reports with targeted feedback for reduced errors, faster approvals, and saved costs.

6 of 23

OPPORTUNITY: LARGE LANGUAGE MODELS

  • Leverage IFC standard across all BIM applications to ensure uniformity�
  • Natural language processing of inputs/outputs�
  • LLM integrated with dedicated building code repository for information extraction��

MODEL

IFC Schema

Natural Language Text

Building Codes

7 of 23

FUNCTIONAL FLOW

Backend Processing

Intuitive UI

Reports

UI allows easy selection of building elements that can be submitted for code compliance

Building elements are matched with relevant codes. Each element is evaluated for code compliance

A compliance report is returned to the user

8 of 23

APPLICATION WORKFLOW

2

1

9 of 23

checkMate

10 of 23

APPROACH 1: RAG MODEL�Prompt Example

Response

Entry prompt

+

{

"type": "Door Metal, Operable"

"IsExternal": true,

"FireRating": "1.0 hr", "Infiltration": "0.30 m"

}

{ R337.8.3: {

"compliant": True,

"summary": The door is external and it has the correct fire rating

}

}

Document(code='R302.2.1Each townhouse unit shall be separated from other townhouse units by two 1-hour ….

11 of 23

APPROACH 1: RAG MODEL�Architecture Diagram

2

1

12 of 23

APPROACH 1 - MODEL EVALUATION�

Misclassification analysis:

Results:

Accuracy

63%

"compliant": False,

"summary": "The entity does not comply with the building code.

Although the door has a high fire rating of 4.0 hours,

it does not meet the specific fire-resistance rating of not less than

20 minutes when tested according to NFPA 252. The door also does not

meet the performance requirements of Section R337.7.3.1 and SFM Standard 12-7A-1."

Precision

0.78%

13 of 23

Discussion, Pros/Cons of Retrieval-Augmented-Generation

RAG�

PROs

  • Versatility
  • Better understanding of context
  • Rich Content Generation
  • Based on up to date data

CONs

  • Challenging to present the answer in a structured format.
  • High Resource Requirements

14 of 23

APPROACH 2: TEXT-TO-SQL

The RAG approach asks a LLM to reason: “Does <wall-1> satisfy <code-X>?”

A LLM can be used to extract information from natural language.

The extracted values may be used to construct SQL queries programmatically.

DOOR

ACC

CRC

ALGORITHM

15 of 23

ZERO-SHOT TEXT-TO-SQL

Section R308 Glazing

R308.6.2: Materials

Glazing materials shall be limited to the following:

  • Laminated glass with not less than a 0.015-inch (0.38 mm) polyvinyl butyral interlayer for glass panes 16 square feet (1.5 m2) or less in area located such that the highest point of the glass is not more than 12 feet (3658 mm) above a walking surface; for higher or larger sizes, the interlayer thickness shall be not less than 0.030 inch (0.76 mm).
  • Fully tempered glass.
  • Heat-strengthened glass.
  • Wired glass.
  • Approved rigid plastics.

SELECT GlobalId FROM IfcWindow

WHERE ( … OR … )

  • Named entity recognition
  • List operator: [and|or]

16 of 23

ZERO-SHOT TEXT-TO-SQL

Section R308 Glazing

R308.6.2: Materials

Glazing materials shall be limited to the following:

  • Laminated glass with not less than a 0.015-inch (0.38 mm) polyvinyl butyral interlayer for glass panes 16 square feet (1.5 m2) or less in area located such that the highest point of the glass is not more than 12 feet (3658 mm) above a walking surface; for higher or larger sizes, the interlayer thickness shall be not less than 0.030 inch (0.76 mm).
  • Fully tempered glass.
  • Heat-strengthened glass.
  • Wired glass.
  • Approved rigid plastics.

SELECT GlobalId FROM IfcWindow

WHERE ( IsLaminated = true OR … )

  • Property
  • Comparison operator
  • Value

17 of 23

ZERO-SHOT TEXT-TO-SQL

Section R308 Glazing

R308.6.2: Materials

Glazing materials shall be limited to the following:

  • Laminated glass with not less than a 0.015-inch (0.38 mm) polyvinyl butyral interlayer for glass panes 16 square feet (1.5 m2) or less in area located such that the highest point of the glass is not more than 12 feet (3658 mm) above a walking surface; for higher or larger sizes, the interlayer thickness shall be not less than 0.030 inch (0.76 mm).
  • Fully tempered glass.
  • Heat-strengthened glass.
  • Wired glass.
  • Approved rigid plastics.

SELECT GlobalId FROM IfcWindow

WHERE ( IsLaminated = true OR IsTempered = true OR IsWired = true );

  • Score based on number of parsed vs unparsed lines
  • Provide unparsed lines to user in report for interpretation

18 of 23

AUTOMATIC CODE COMPLIANCE VIA SQL

Passing records:

SELECT FROM <named_entity>

WHERE <defining_attribute>

AND ( <attribute1> <AND|OR> … )

OR ( <exception1> OR … )

Failing records:

SELECT FROM <named_entity>

WHERE <defining_attribute>

AND NOT ( <attribute1> <AND|OR> … )

AND NOT ( <exception1> OR … )

ACC

SQL is very fast!

19 of 23

Text-to-SQL - EVALUATION�

CRC

ENTITY

HUMANS

TEXT-TO-SQL

COMPARISON

R337.8.3

IfcDoor

(isExternal == TRUE)

AND (FireRating >= 20)

AND (isTempered == TRUE

OR isLaminated == TRUE

OR isCoated == TRUE

OR isWired == TRUE)

SELECT GlobalId from IfcDoor WHERE IsExternal = 1

AND (FireRating >= 20)

TTS BETTER

R302.9.1

IfcDoor

SurfaceSpreadofFlame<200

SELECT GlobalId from IfcWallStandardCase WHERE (SurfaceSpreadOfFlame <= 200)

SAME

  • Ignoring human typo for entity

R302.1

IfcWall

FireRating >= 60

NONE (tables NYI)

HUMANS BETTER

R305.1

IfcWall

NominalHeight >=84

SELECT GlobalId from IfcWallStandardCase WHERE (NominalHeight >= 84.0)

SAME

R337.8.2.1

IfcWindow

FireRating >= 20

SELECT GlobalId from IfcWindow WHERE IsExternal = 1

AND (FireRating >= 20.0 OR IsTempered = 1 OR SmokeStop = 1)

TTS BETTER

R308.6.2

IfcWindow

IsWired == 1 OR IsLaminated == 1OR isTempered == 1

SELECT GlobalId from IfcWindow WHERE (IsLaminated = 1 OR IsTempered = 1 OR IsWired = 1)

SAME

20 of 23

DISCUSSION, PRO’S/CON’S OF TEXT-TO-SQL

TEXT-TO-SQL�

PROs

  • Cheap and efficient
  • Rules are explicit, may be corrected or extended by humans�

CONs

  • Additional templates+parsers need to be created for other patterns

Useful for driving the co-development of�law and file standards.

21 of 23

LESSONS LEARNED

  • Cooperation between IFC and ICC required
    • Flexible structure of IFC allows for multiple ways data may be encoded
    • Add additional entities and properties needed
    • Some language in ICC is ambiguous or difficult for NLP to parse

  • Extensive Data Engineering effort required
    • IFC files don’t contain all information required for code compliance
    • Building codes are not in computer-friendly format
      • E.g. tables not always square

  • GPT-4 does much better reasoning using natural language rather than structured input
    • Compliance analysis improved after converting IFC json to natural language

  • GPT-4 challenges related to the Compliance Report
    • Need to stream ChatCompletion API
    • Need parallel requests

22 of 23

SAVE TIME AND COSTS

FUTURE-PROOF

Leverage NLP for intuitive prompts and clear feedback responses

Automatically produce detailed compliance reports

Refresh model and constraints as regulations evolve over time

MINIMIZE ERRORS

RECAP: INDUSTRY CHALLENGES

  • Architects and construction firms experience delays with plan-checkers
  • Verifying code compliance is very complex, and still performed manually

checkMate VALUE PROPOSITION AND OFFERINGS

23 of 23

THANK YOU

Carla Cortez�Redwan Hussain�Kam Kasravi�Edward Kirton�Ryan Wilson�

CREDITS: This presentation template was created by Slidesgo, including icons by Flaticon, and infographics & images by Freepik