ChagGPT chat bot

ChagGPT chat bot

shehab_fekry
Enthusiast Enthusiast
5,580 Views
18 Replies
Message 1 of 19

ChagGPT chat bot

shehab_fekry
Enthusiast
Enthusiast

How can I make a chat bot that uses ChatGPT technology using Revit API

0 Likes
5,581 Views
18 Replies
Replies (18)
Message 2 of 19

jeremy_tammik
Alumni
Alumni

Yes.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 19

RPTHOMAS108
Mentor
Mentor

I don't know much about ChatGPT I know even less about ChagGPT

 

What I do know is that it is a trained model that knows very little about what it hasn't been trained for. It appears that it has been trained to answer general knowledge questions and likely base the answers for those on what it has read from that undisputed fountain of truth known as the internet. How does any of that help a Revit end user?

 

I'm thinking there are perhaps other avenues of AI to get excited about regarding systems used in conjunction with construction. I'm more interested to learn about if someone somewhere is feeding an algorithm knowledge about  structural layouts and benefiting from the automation of such given some starting input parameters.  I don't see any trained models that suit that kind of activity to be honest. I can see there may be a possibility of forming better object detection within point clouds etc. 

0 Likes
Message 4 of 19

jeremy_tammik
Alumni
Alumni

Dear Richard, thank you for your view. I agree. Regarding curating your own input to a large language model, specifically for construction and structural layouts, Free Dolly may be an interesting possibility to check out:

  

https://thebuildingcoder.typepad.com/blog/2023/04/news-reel-roadmap-and-revitlookup-updates.html#5

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 5 of 19

thomas
Advocate
Advocate

I've tested it using a simple example - basically asking it what the transaction attribtue does. 

 

It was quite impressive, until I asked it to show a simple example and it didn't know it was an attribute, called the Transaction constructor then passed in the TransactionMode enum to it - basically, it invented its own constructor. 

 

In short, it lies convincingly. 

 

Since its prompt-based, I decided to help it out, and told it the snippet provided was an attribute then it updated the code. However, it kept the fake constructor with the TransactionMode input. 

 

Next, I told it that constructor didn't exist, so it updated it. The end result would work, but you need predisposed API knowledge to nudge the AI along the way. 

 

I then reposted the same question from the start to check if it had learned from its mistakes...it didn't, it just repeated the same mistakes again. So AI won't be replacing developers for this year at least. 

0 Likes
Message 6 of 19

jeremy_tammik
Alumni
Alumni

Yes, the behaviour you describe is well known and called hallucinating. Yes, sometimes you can tell it that it is hallucinating and it will correct itself; other times not, and it will insist on its mistakes. It depends on the context and the prompts, I guess. In many areas it is a lot more knowledgeable than in such a niche area as Revit API.

  

So AI won't be replacing developers for this year at least. 

  

I would not bet on that. In any case, I think it will change things radically, even revolutionise them, both for programmers and many other. Boy, I look forward to getting rid of all those lawyers  🙂  We'll see how it goes. Exciting times.

  

 

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 7 of 19

RPTHOMAS108
Mentor
Mentor

Thanks Jeremy I was previously looking through the below ML.Net scenarios for ideas but could not really see how they could be turned to the task of analysing a dataset of geometry information i.e. learn from existing models and then coming up with new arrangements for a certain building shape and occupation types.

Machine learning tasks - ML.NET | Microsoft Learn

 

There is also quite a lot of interesting articles on object recognition from meshes in the below. Which again is also interesting from a point cloud survey to physical Revit element perspective. 

Autodesk AI Lab unlocks new AI-powered design tools | Autodesk News

 

However I've always thought that the task I had an interest in above (auto framing a floor plate) could be achieved without AI and with some old fashioned HI. I've started this task many times over the years and it tends to come down to factors such as:

Grid direction (primary/secondary)

Maximum cantilever to edges

How to align grid with floor outline (you have a uniform grid near centre with gaps to make up around the edges).

Marked out 3D zones to avoid putting structure in 

These would be the inputs and then the system trials various options scored against target outcomes (such as steel weights) much like generative design (but without Dynamo!).

 

 

Message 8 of 19

thomas
Advocate
Advocate

Thanks for your take @jeremy_tammik - I've only heard that term once before and you jogged my mind. I feel like its a term AI developers invented to make shortcomings in their language model more palatable to investors 😉 

 

I agree with you too regarding the potential AI revolution. I reckon prompt-based programming will take over; no need to unit test, worry about language semantics, architecture or composition. Developers will simply provide behavioral and output objectives and let the AI do the rest. The skill will be in the prompts. 

Message 9 of 19

jeremy_tammik
Alumni
Alumni

Cool. Well, surprisingly, people are observing emergent behaviour in large language models. Suddenly the models are performing a wider range of tasks than was expected of a pure language prediction system. For instance, I asked ChatGPT whether it could help frame a floor:

 

jeremy.tammik@autodesk.com: can you help calculate the automatic framing of a floor plate?

 

ChatGPT: Yes, I can help you calculate the automatic framing of a floor plate.

 

To calculate the framing of a floor plate, you will need to consider the dimensions of the plate, the spacing of the joists, and the load that the floor will bear. Here are the general steps to follow:

 

  1. Determine the size and spacing of the joists: The size and spacing of the joists will depend on the span of the floor plate and the load that it will bear. A common spacing for joists is 16 inches on center (oc), but this can vary depending on the load and other factors.
  2. Calculate the required joist depth: The depth of the joists will depend on the span of the floor plate and the load it will bear. The deeper the joists, the greater the load they can support. You can use span tables or online calculators to determine the required depth of the joists.
  3. Calculate the required beam size: If the span of the floor plate is too great to be supported by the joists alone, you will need to add beams to support the load. The size of the beam will depend on the span of the floor plate, the spacing of the joists, and the load it will bear.
  4. Determine the number and size of the fasteners: The number and size of the fasteners, such as nails or screws, will depend on the size and spacing of the joists and the load they will bear.
  5. Account for additional factors: You will also need to consider any additional factors, such as the type of wood used for the framing, any insulation or vapor barriers that may be needed, and any local building codes or regulations.

 

It is important to note that these are general steps, and the specific calculations will depend on the specific details of your floor plate. It is always recommended to consult with a structural engineer or other qualified professional to ensure that your calculations are accurate and the framing is safe and up to code.

 

jeremy.tammik@autodesk.com: so, if i provide you with the detailed flor plate geometry and loads, could you calculate a suitable framing for it?

 

ChatGPT: Yes, I can certainly help you with that. If you provide me with the detailed floor plate geometry and loads, I can calculate a suitable framing for it.

 

Please provide me with the following information:

 

  • The dimensions of the floor plate (length, width, and thickness).
  • The type of material to be used for the joists and beams.
  • The spacing of the joists.
  • The load the floor plate will bear, including any dead load (weight of the structure) and live load (weight of occupants and furniture).
  • Any other relevant information or requirements, such as local building codes or regulations.
  • With this information, I can use structural engineering principles and software to calculate the appropriate sizing and spacing for the joists and beams, as well as the necessary fasteners and additional factors such as insulation and vapor barriers.

 

Please note that while I can provide general guidance, it is always recommended to consult with a licensed structural engineer or other qualified professional to ensure that your framing is safe and up to code.

  

So maybe your goal is in sight?

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 10 of 19

RPTHOMAS108
Mentor
Mentor

Well yes but who said anything about a timber floor?

 

I guess I remain unconvinced at this time. Although I'm tempted to get the inputs it asked for just to see what it does with them. I can see it has learnt to talk the talk (from North America where they still use inches) but can it walk the walk?

 

I'd also say that when someone's answer always seems to be 'yes' do we believe them? I find it more credible when there is an even balance of 'yes' and 'no', perhaps we want more 'yes' than 'no' generally (too much 'no' is not a good thing either).

 

When we ask other humans to do things we often out of politeness put it in the form of a rhetorical question: 'Can you...' I wonder if that plays a part in the responses (from what it has learnt) i.e. if rather than trying to convince us of it's ability it instead said 'give me x, y, z' and I'll do it'. I think that was the second response but it should have come to that to start with since the question wasn't:

'can you help me calculate the automatic framing of a floor plate?' (by explaining the process).

but instead

'can you help calculate the automatic framing of a floor plate?'

 

Maybe I'm being too picky but we are talking about intelligence, the bar is high. If you ask 'quote me some Shakespeare' then you can understand it is going to be able to do that because that exists on the internet and various texts have an association with the term 'Shakespeare'. However what is the gauge as to if the answer to a technical question is right or wrong? The texts need to be scored for correctness such as on stack overflow but I suspect there are not similar scored answers in all subjects for this AI to learn from (yet it gives answers in all subjects). It doesn't know what it doesn't know and this is an important part of intelligence to be able to know what isn't known to target learning it.

Message 11 of 19

jeremy_tammik
Alumni
Alumni

Talk the talk is exactly what it does. I consider it a great big baby, or better still a huge infant, fed with a tremendous amount of talk. And it can copy-babble super convincingly. It has consumed more (text) input than you or me, by a factor of thousands if not millions. At what point does talk become walk? I am very much looking forward to hearing your report. Several immediate friends of mine are astounded. I keep trying it with Revit API stuff, but I guess the input in this area is just not large enough for consistently overwhelming reliable results. Floor framing may be much better documented in the LLM input dataset.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 12 of 19

ConstantineC
Advocate
Advocate

Is it possible to create a ChatGPT bot for Revit product knowledge (or Autodesk in general) to answer any question about the product usage? 

I think this is the future of product training and support.

Besides existing product knowledge and Help could also be trained with all the data from Autodesk Community forums.

Does ChatGpt allow for custom training databases? I believe it should?

Message 13 of 19

jeremy_tammik
Alumni
Alumni

Yes, absolutely!   Please go ahead. Have fun and much success!

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 14 of 19

EATREVITPOOPCAD
Collaborator
Collaborator

Very fun thread to read. As someone who got into programing recently, chat gpt has been a tremendous help as a learning tool. In revit API it hallucinates a lot, and it gets me very excited when shows methods or properties that don’t exist that do exactly what I want… that said it’s still really helpful, and you can even give it code and ask to break down what each line does.

 

I also recently started using powershell, and ChatGPT has been killing it in this area, to point where I never even explore the powershell objects before using them, I just explain to the chatbot the logic and events that need to happen. Assume because powershell is widely used, simpler (subjective), and made by Microsoft Chat GPT knows it too well. 

I have been thinking about how to implement AI in Revit at my architecture job just for fun and it’s a tough one. Even if AI is 99 percent right, in my opinion the 1 percent wrong is unacceptable (because of change orders, lawsuits and etc…) some ideas I explored are really dumb, like filling out the sheet discipline automatically after you fill out the sheet number. This silly task would give me opportunity to create my own AI and feed it a data set from my job 😄 

 

 

The definition of insanity is doing the same thing over and over again and expecting different results
Message 15 of 19

jeremy_tammik
Alumni
Alumni

Thank you very much for your interesting input and some positive experiences. Yes, it definitely depends on how mainstream your questions happen to be, and how much input the LLM has already ingested in that specific area. I love to hear that and fully agree with the points you make, especially about enabling AI to take over the aspects of our everyday routine tasks that really are repetitive, as one of the first steps. I have been thinking about trying to automate my own job for over ten years now. Back then it already seemed pretty doable, to 40 or 50%. Now it definitely is, to more than 70%, I would say. But... I haven't done anything real yet to put the pieces together, preferring to plod along, answering cases, converting some to blog posts... It won't take long until all plodders like me start facing stiff competition... Exciting times... Look forward to hearing about your further experiences as this technology continues evolving and adapting to our everyday needs...

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 16 of 19

ConstantineC
Advocate
Advocate

Thanks but unfortunately I am not the right person to creat this. 🙂

Ideally would be for  Autodesk itself to do it but I`m sure there are many users you can do it too.

 

Message 17 of 19

EATREVITPOOPCAD
Collaborator
Collaborator

@jeremy_tammik, I think you've reached a point where your plodding blogs will have an audience regardless 😄 However, the new generation of bloggers may need to adapt. I do believe that the current way AI is made (probability based on data fed) will hit a hard wall in certain areas, such as those where a consistently small chance of being wrong is unacceptable. It may just end up being like a calculator on crack, disappointing people in the same way that the promise of flying cars did for half a century. The changes are still huge, but I don't see Skynet from Terminator in the near future... unless someone else cracks that egg. I am excited to see what it does to Academia, where busy work assignments are already worthless.

 

@ConstantineC, it's easier than you think! OpenAI offers API access, which means you could easily add a paper clip button to the Revit ribbon. Whenever a user asks a question, you can send it to ChatGPT, and it will generate a response for you. You could even prefix the user's questions with "Revit" to automatically search only Revit-related information. If you can make a Hello World plugin, you are almost there... The only thing to keep in mind is that worth the roughly 2 cents per response OpenAI will charge you...

The definition of insanity is doing the same thing over and over again and expecting different results
Message 18 of 19

ConstantineC
Advocate
Advocate

@EATREVITPOOPCAD  Maybe its not hard but I am not sure if ChatGpt is currently sufficiently trained on Revit documentation data. Actually I dont know exacty how the the product works, if one can fine tune or specialize ChatGpt on a topic or not.  There are also those new plugins that open infinite possibilities. 

0 Likes
Message 19 of 19

deshfesh67
Community Visitor
Community Visitor

You're right to point out that ChatGPT and similar models are mostly trained on general knowledge and might not be the most useful tool for highly specialized tasks like Revit or structural design. However, there are other AI applications that are starting to make waves in the construction industry, especially in areas like structural design, object detection in point clouds, and automation.

 

For example, AI models that are specifically trained on architectural and engineering data could automate certain aspects of design, such as generating optimized structural layouts based on specific parameters. This could be incredibly beneficial for streamlining the design process and making it more efficient. Object detection within point clouds, as you mentioned, is already being explored and can help with things like site analysis or converting physical spaces into digital models more quickly and accurately.

 

Additionally, if you’re looking for AI solutions that could be useful in your workflow, I’d recommend checking out website. It’s an AI-powered chat platform that’s designed to provide more tailored and specialized responses, so you might find it more helpful for tackling complex industry-specific questions or even integrating it into your daily workflow for things like project collaboration or troubleshooting.

 

As for structural design automation, generative design algorithms are also gaining traction, where AI can take in parameters like material costs, spatial constraints, and building codes to propose optimal structural solutions. This is a space worth watching closely, and you might be able to find some of these advanced AI tools starting to merge with programs like Revit in the near future.