AI Language Models

Imagine you move to a foreign country, like France.  You need to rent an apartment, but you don't speak a crouton of French. You would probably have a good mental picture of what type of apartment you were looking for, the price range, the lease terms, etc. but it would be very difficult to convey this to a French realtor. You could flip through an English-French dictionary, but that isn't very efficient. Ideally you need a translator. If you hire a French translator, your problem is solved. You could accomplish what you wanted almost instantly. 

Similar to being in a foreign country without language proficiency, mechanical engineers find themselves in a situation where programming languages serve as the means of communication in the machine world. We spend our valuable time looking up syntax in dictionaries, but much like hiring a translator in a foreign land, mechanical engineers require a translator that can bridge the gap between human language and machine language. Well it turns out that Artificial Intelligence (AI) language models are incredibly well suited for this task - the translation of human-readable instructions into machine code.

I wanted to test this. So I thought of an example where I could give a non-technical, human-readable instruction to a machine and see if it responds. I asked the most popular AI language model, ChatGPT...

"Write some code that captures an image using my laptop's webcam."

If you knew nothing about programming and wanted to do this yourself, it would be doable, but not easy. You would have to dig through documentation to find a coding language with camera libraries and learn the syntax to capture an image and display it. You would also need to learn about your particular laptop's hardware, like how to locate and initialize the webcam device. A task much like renting an apartment in France with only a dictionary. So this seemed like a good test, but I was skeptical that ChatGPT could do it.

Anyway, ChatGPT generated some python code and I ran it...

Holy crap, it worked.

One plain English sentence - and it just did it with one click

I went a step further and asked it to do the same webcam test but use C++, which is a more difficult programming language to use, but often preferred because it's faster - and it worked. 

Am I communicating with my laptop?

This encounter with ChatGPT is one narrow example, but it highlights the incredible potential of AI language models in bridging the gap between human intent and machine execution. 

Mechanical engineers are often challenged with the task of instructing machines to do something for us. We take an idea about what we need a machine to do (cut the widget into a shape, read data from sensors, etc.) and we translate that into instructions a machine can understand, programming code. Mechanical engineers typically aren't programming experts like a computer scientist is, so this can be a time consuming task.

I believe there is a future where machine language translation becomes effortless and intuitive for engineers, revolutionizing the way we interact with and harness the power of machines.

Imagine, instead of going through a lengthy design process, we simply ask a machine to 3D print a part that can withstand certain loads, is optimized to be lightweight, and will mate with an existing assembly. Based on the description, the AI language model could interpret the requirements and generate the appropriate CAD design and associated G-code instructions for the 3D printer. It would consider factors like structural integrity, material utilization, and compatibility with other components.

Capability like this would enable mechanical engineers and designers to communicate their ideas directly to the AI. This would not only save time and effort but also facilitate exploring more novel solutions with greater ease, ultimately pushing the boundaries of what is achievable in the realm of mechanical engineering.

If you enjoyed this content, hit the subscribe button below so you never miss a post. It's free!

Please help us out by sharing this article with friends and colleagues!


I asked ChatGPT to define an AI language model, and this is what it told me.

Artificial Intelligence Language Model Description Definition