What's new

Alibre Designing with AI - NVIDIA ChatRTX and RAG

stepalibre

Alibre Super User
I'll keep it short...

NIVIDIA ChatRTX is a quick and easy way to utilize AI. My AI projects include a lot more than ChatRTX and a dataset used for RAG, this is the simplest setup to get you started.



NVIDIA ChatRTX User Guide

My Testbed for Alibre Design GitHub projects, contain Alibre help and API scripting source and example files. These are experiments and projects I use to design and development public and private solutions.

I won't cover the literal steps to install and configure ChatRTX. There are plenty of videos and content online to get you up and running. Any Alibre Design AI related questions are welcome.

Telling AI to make a working script (Alibre Script IronPython) or program (AlibreX .NET) is not as simple as telling it what you want. You'll need to understand Alibre APIs, .Net, IronPython2.7 and the dataset you give it. As complexity increases, AI's can make obscure errors and mistakes that become harder to catch, getting lost in the chat history, and logic loops. It's often necessary for you to fix it because the AI simply can't find the correct solution or the solution is bad practice.
Note: programming is not the only AI use case for Alibre Design.
Real example:

@gld "Script won't run" post, and my reasoning

I tested ChatRTX and it passed, finding the correct answer:

Dataset used for RAG:

1744572394453.png

Now don't be as confident as I was. AI can and will fill in missing data that it think is logical. In this example it referenced Parameters-with-Units.txt.


But not Units.py:


1744573007904.png
C:\Program Files\Alibre Design 28.0.4.28141\Program\Addons\AlibreScript\AlibreScript.chm

UnitTypes.Nanometers, Micrometers and MicroInches? This is a good example of AI hallucination, or simply, AI is wrong. The answer appear to be correct, UnitTypes.Inches is the correct enum. This can cause you to think, the AI is smarter than it actually is.

Let's understand what's happening here: the dataset has example scripts, some include UnitTypes. Units.py has the three enums being used that match AlibreScript.chm. It's possible ChatRTX did read Units.py but didn't reference it. There are control questions and techniques that can help reduce or avoid this type of AI error.

My posts and ramblings here can help understand the beginning efforts I took to get to this point:


Working examples of AI generated Alibre Design code:



Note: I don't use ChatRTX to generate the code in those databases, I have custom programs that generate them using OpenAI's ChatGPT Pro and APIs. I will use other LLMs and software to generate database content but for now only OpenAI is used.

Datasets:

You can use the content on my GitHub or build your own. When using RAG and Gen-AI with datasets, you may need to restructure the data to produce something that is easy to use as input (prompting) to get the correct output (AI generated script, instruction steps or post processing)

APIs, software and websites I use with my Alibre Design work:
I have paid chat and API accounts for all that offer them.

Hugging Face
LM Studio
Jan
Notion AI
Perplexity Pro
Claude Pro
Grok SuperGrok
Mistral LeChat Pro
Gemini Advanced
ChatGPT Pro
IKI.AI
ChatRTX

They each have unique features, and how I use them varies.

Prompt engineering is very important and now is where I spend the most time; designing and developing prompting systems and tools. FYI, I don’t use the terms prompt engineering or prompting in my AI work I prefer the traditional input and output terminology. The usage here is formal.

My top 5s:


This cookbook is awesome and highly recommended: https://cookbook.openai.com/, https://github.com/openai/openai-cookbook
 
Last edited:

HaroldL

Alibre Super User
o_O@stepalibre, you should have your own section on the forum to post your eh...stuff. Posting it in the General or Using Alibre sections always tricks me in to selecting it and I end up being more confused by whatever it is that you post than I was before I opened it. :confused: That said I think, as I have posted before, it would be helpful if you recorded video tutorials about what it is you are trying to accomplish with the high-level scripting/programming info that you post. A long post with numerous images make no sense to me, it's just more "stuff" without a frame of reference.
 

stepalibre

Alibre Super User
o_O@stepalibre, you should have your own section on the forum to post your eh...stuff. Posting it in the General or Using Alibre sections always tricks me in to selecting it and I end up being more confused by whatever it is that you post than I was before I opened it. :confused: That said I think, as I have posted before, it would be helpful if you recorded video tutorials about what it is you are trying to accomplish with the high-level scripting/programming info that you post. A long post with numerous images make no sense to me, it's just more "stuff" without a frame of reference.
DavidJ might move it, but AI is more broad and not just useful for coding. AI is general. You might need to do some research and that's ok. It's really easy to get started, you don't need to be an expert in any subject to make use of AI. You don't even need to care about it, make it a tool that's used for a task. I understand that some forum users are using AI but choose not to share it, or they feel it's not welcome here. There are online communities that ban AI discussions and content. If something doesn't make sense, I can try to clarify. It might be me, not you.

Alibre Design is a good size, the level of complexity being a 3D Mechanical CAD software, it's in a sweet spot. Alibre's API is about 250 classes/interfaces, I'm not sure but Solidworks I know is well in the thousands. I'm not far from having a fully automated API code generator for my custom CAD software projects and Alibre Design. Llama 4 has 10M context window which is essentially the amount of input and history data it can hold. o1 Pro which is my current default, has only 200K. I may need just one million to build the dataset.
 
Last edited:

stepalibre

Alibre Super User
That said I think, as I have posted before, it would be helpful if you recorded video tutorials about what it is you are trying to accomplish with the high-level scripting/programming info that you post.
My goal is to build a 3D CAD application that competes with Alibre Design called Freelibra. ;) My work is CAD R&D. Everything gets applied or integrated into new or existing projects in some form or another.
 

JimCad

Alibre Super User
Quote: Stepalibre, "My goal is to build a 3D CAD application that competes with Alibre Design called Freelibra"
How does @Max feel about that?
Thank you for taking the time to explain it but . . . .
I still struggle to understand most of what you're doing but that's down to Me.
I was Crap at everything at school and not progressed much since.
I like Alibre and think it's great value for money although I spend too much time on here and not enough time using it.
Hoping that's going to change very soon. :)

Jim
 

DavidJ

Administrator
Staff member
I wouldn't know where to move posts like this too.

Without some meaningful introduction they make no sense at all to me.

Sorry but I've still no idea what the point of the post was...
 

stepalibre

Alibre Super User
@Max was so right about sarcasm and joking here.

I wouldn't know where to move posts like this too.
That was not a serious comment, my lighthearted attempt, a knock at my posts that overlap general, Alibre Script and AddOn development that you often move.

Quote: Stepalibre, "My goal is to build a 3D CAD application that competes with Alibre Design called Freelibra"
That was a joke, not a serious statement.

Without some meaningful introduction they make no sense at all to me.
Sorry but I've still no idea what the point of the post was...
If you're using AI already or want to start and is also an Alibre Design user, then this might be useful. It's not meant to be an entry level guide or a formal course covering all aspects that a user may need to know or be introduced to, including all prerequisites. That doesn't mean I won't make a formal introduction, it's not the purpose of this post.

I'm aware of users who are interested in AI for Alibre Design. Many people use AI for other tasks and are also Alibre Design users. I rather post to this forum, than to post in a technical forum or place where AI is the main focus. I assume not many AI users, enthusiast or hobbyist are also Alibre Design users.

The point is Alibre Designing with AI - NVIDIA ChatRTX and RAG. What I write is not important, if you only read the title, download ChatRTX and make a dataset for Alibre Design, then you've done it.

I like Alibre and think it's great value for money although I spend too much time on here and not enough time using it.
+1
 
Top