ChatGPT - a tutorial writer?

Kia ora koutou

In exploring the role of ChatGPT in my courses I tried to test it with this question:

write grasshopper code for analysing the thermal performance of a school within the Ladybug Tools environment

Its extraordinary response is below. I am posting this with a view to engaging with others in building environmental performance education to try to brainstorm opportunities and caveats in regards to this new tool.

To analyze the thermal performance of a school within the Ladybug Tools environment, you can use Grasshopper, which is a graphical algorithm editor.

Here are the steps to follow:

  1. First, make sure that you have installed Ladybug Tools and its necessary components on your computer.
  2. Open a new Grasshopper canvas, and import the necessary Ladybug Tools components. You can do this by typing “Ladybug” or “Honeybee” in the Grasshopper search bar.
  3. Load the school geometry into Grasshopper. You can do this by using the “Import” component in Ladybug Tools.
  4. Define the building envelope by creating surfaces that represent the walls, roof, and floor of the building. You can use the “HB Generate Apertures” component to create openings in the walls for windows and doors.
  5. Set the location and orientation of the building using the “HB Weather Station” and “HB Sun Path” components. These components will provide information about the climate and sun position at the building’s location.
  6. Define the thermal properties of the building materials using the “HB Material” component. This component allows you to set the material type, thickness, and other relevant properties.
  7. Create an energy simulation using the “HB Run Energy Simulation” component. This will run a simulation to calculate the energy consumption and thermal performance of the building.
  8. Analyze the simulation results using the “HB Visualize Results” component. This will allow you to visualize the data in a variety of ways, such as temperature maps, energy use graphs, and more.

Here is some sample Grasshopper code that performs these steps:

// Import Ladybug Tools components
import “Ladybug” as lb
import “Honeybee” as hb

// Load school geometry
school_geometry = lb.import_3dm_geometry(“path/to/school.3dm”)

// Create building envelope
walls = hb.generate_walls(school_geometry)
roof = hb.generate_roof(school_geometry)
floor = hb.generate_floor(school_geometry)
apertures = hb.generate_apertures(walls)

// Set location and orientation
location = lb.location(51.5, -0.1) // Set the school’s latitude and longitude
climate_file = lb.epw(“path/to/climate.epw”) // Load a weather file
weather = lb.weather_data(climate_file, location)
sun = lb.sun_path(location)

// Define thermal properties
walls_material = hb.material(“Brick”, 0.2) // Set the wall material to brick with a thickness of 0.2 meters
roof_material = hb.material(“Metal”, 0.1) // Set the roof material to metal with a thickness of 0.1 meters
floor_material = hb.material(“Concrete”, 0.1) // Set the floor material to concrete with a thickness of 0.1 meters

// Create energy simulation
simulation = hb.run_energy_simulation(walls, roof, floor, apertures, walls_material, roof_material, floor_material, weather, sun)

// Visualize simulation results
temperature_map = hb.visualize_results(simulation, “Temperature Map”)
energy_use_graph = hb.visualize_results(simulation, “Energy Use Graph”)

Hi @MichaelDonn, curiously i started to give ChatGPT a try, ut just for the fun right now.
So far i’ve found that many/some of the code statements are not existing. I recommend to check the code right away. The feeling is that there is a lot of debugging to do. Probably the code is not going to work as suggested by the ChatGPT.
Probably you can let the chat to know about those bugs to refine the code, but … i didn’t went to far by now.
For your code above, there is plenty of mistakes when testing it … :slight_smile:
It is interesting and promising, though.
-A.

1 Like

Interesting topic. :slight_smile:

I’ve tried playing with it, but my experience so far is not yet convincing when it comes to such tasks.
I find chatGPT really helpful when it comes to extending ideas or making it explain things, but asking it to do research or write steps that should include commands and links to resources: it’s generating gibberish.

URLs, Youtube links, DOIs that look plausible, but none of them work - it makes me question which portion of its answers are to be trusted. It also makes up paper titles, tutorial content, etc., it has no idea where its knowledge is coming from.

Don’t get me wrong, I find it astonishing when I ask it something and the answer just flows and I can skim through miriads of well structured ideas, I’m just not sure that this language model is adequate for tutorial writing, which should have pretty grounded semantics and logical understanding.

1 Like

Agree with both comments

However, I would argue the intriguing potential to me is that the English Language outline of tasks to complete the analysis is a fairly well-written guide. I would need to add illustrations of the steps, but the text is a good start on a step by step guide…

Appropriate use to speed up / improve readability ?

2 Likes

Very interesting! I know the initial version of ChatGPT was trained before the new plugins were out. I wonder if the new version can do better for providing a starting point.

1 Like