Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model output results #18

Open
3 of 4 tasks
bbartling opened this issue Dec 14, 2024 · 1 comment
Open
3 of 4 tasks

Model output results #18

bbartling opened this issue Dec 14, 2024 · 1 comment

Comments

@bbartling
Copy link

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

I have my own git repo for summarizing BRICK models:
https://github.com/bbartling/BrickModelSummarizer

Its basically a bunch of Sparql queries which I ran across the BRICK reference models to see if I can create a summary's of buildings in a text file output. Basically I tested my Py code against the BRICK reference models to make sure if can count AHUs, Central Plants, AHU points, etc...

Just for fun I have 3 ttl files in my repo one of this is building 6 of the reference BRICK model which appears to be a large building from what I can gather. And those 3 models converted to text files are here in the repo as well.

The my_building is the ttl file created from the brick-llm using the OpenAI method and prompt below.

I am no expert here but the results are interesting... these are some reflections on the feeding in a BRICK model created by ChatGPT 4o when using this prompt which is the text file output for building 6 ttl!

It does create a model which is this where it appears to make the model with the correct number of floors, AHUs, zones, and location but it doesn't appear to be able to make the AHUs variable volume or give the AHU any I/O for sensors or outputs...

Any thoughts on this? I wonder if its just a limitation with ChatGPT?

Also when I run my Sparkql queries across the model created by AI it doesn't summaries anything based on the text file output with the exception of my code can count the floors inside the building based on the data model but that is it. Would you have any thoughts on this as well? I went off of verifying my Sparkql queries are correct based on the BRICK reference models.

Cool project would love to hear your thoughts!

Cheers,
Ben

Reproducible Code Example

from brickllm.graphs import BrickSchemaGraph

# Description of the building
# Its a summary of building 6 in the BRICK model references!
building_description = """
I have a building located in the USA.

AHU Information:
  - Total AHUs: 16
  - Constant Volume AHUs: 11
  - Variable Air Volume AHUs: 0
  - AHUs with Cooling Coil: 10
  - AHUs with Heating Coil: 7
  - AHUs with DX Staged Cooling: 0
  - AHUs with Return Fans: 0
  - AHUs with Supply Fans: 0
  - AHUs with Return Air Temp Sensors: 4
  - AHUs with Mixing Air Temp Sensors: 1
  - AHUs with Leaving Air Temp Sensors: 18
  - AHUs with Leaving Air Temp Setpoint: 9
  - AHUs with Duct Pressure Setpoint: 0
  - AHUs with Duct Pressure: 0
Zone Information:
  - Zone Air Temperature Setpoints: Zone Air Temperature Setpoints Found.
  - Total VAV Boxes: 132
  - Number of VAV Boxes per AHU: {'AHU: AH1S': 4, 'AHU: AH2N': 3, 'AHU: AH2S': 3, 'AHU: AH3S': 1, 'AHU: AHBS': 2, 'AHU: AHU01N': 24, 'AHU: AHU01S': 22, 'AHU: AHU02N': 10, 'AHU: AHU02S': 30, 'AHU: AHU03N': 14, 'AHU: AHU03S': 30}
  - VAV Boxes with Reheat Valve Command: 0
  - VAV Boxes with Air Flow Sensors: 0
  - VAV Boxes with Supply Air Temp Sensors: 0
  - VAV Boxes with Air Flow Setpoints: 0
  - Cooling Only VAV Boxes: 132
Building Information:
  - Building Area: 130149 sq ft
  - Number of Floors: 4
Meter Information:
  - BTU Meter Present: False
  - Electrical Meter Present: False
  - Water Meter Present: False
  - Gas Meter Present: False
  - PV Meter Present: False
Central Plant Information:
  - Total Chillers: 1
  - Total Boilers: 0
  - Total Cooling Towers: 0
  - Chillers with Water Flow: 0
  - Boilers with Water Flow: 0
  - Cooling Towers with Fan: 0
  - Cooling Towers with Temp Sensors: 0

"""

# Create a BrickSchemaGraph instance with OpenAI provider
brick_graph = BrickSchemaGraph(model="openai")

# Display the graph structure
brick_graph.display()

# Prepare input data
input_data = {
    "user_prompt": building_description
}

# Run the graph
result = brick_graph.run(input_data=input_data, stream=False)

# Print the result
print(result)

# Save the result to a file
brick_graph.save_ttl_output("my_building.ttl")

Steps To Reproduce

No response

Expected Behavior

Not sure I thought it could maybe recreate the original model???

Current Behavior

No response

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • BrickLLM version:
  • Python version:
  • Operating System:
  • Browser:

Additional Information

No response

@PeriniM
Copy link
Contributor

PeriniM commented Jan 3, 2025

Hey @bbartling, from release v1.3.0 the sensors' detection has been enhanced, please try it out and let us know!

You can also summarize your ttl with the following code:

from langchain_openai import ChatOpenAI
from brickllm.utils import ttl_to_building_prompt

# Create a custom model
custom_model = ChatOpenAI(temperature=0.8, model="gpt-4o")

# Generate the building description from the ttl file
building_description, key_elements = ttl_to_building_prompt(
    your_ttl_file,
    custom_model,
    additional_instructions="Keep a professional and structured tone.",
)

print(building_description)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants