How AI like ChatGPT Can Enhance Engineering Work

Avatar photo

The March of The Machines: How Large Language Models like ChatGPT Could Support and Enhance the Work of Engineers

When ChatGPT, the large language model (LLM) chatbot developed by OpenAI, was launched at the end of 2022, it caused a sensation worldwide with its seemingly human-like ability to interact conversationally and to construct effective responses to detailed questions and prompts.

The model has been trained on an enormous trove of online information and can be used for a wide range of natural language processing tasks, including text generation, language translation, text summarisation and sentiment analysis.

But what does ChatGPT mean for engineers? Can it provide any genuine value to those employed in technical roles? And if so, what does that mean for the future of engineers as automation increasingly comes to the fore?

ChatGPT in Action

Finding the answers to those questions provides a perfect opportunity for ChatGPT to prove its mettle. After all, why use traditional desk-based research methods when it is possible to get the LLM chatbot to do it for you?

So, let us give it a go:


Question: How can ChatGPT help engineers with their working life?

Answer (verbatim):

  1. Generating code: ChatGPT can generate code snippets for a variety of programming languages, allowing engineers to quickly prototype and test ideas.
  2. Documenting work: ChatGPT can assist with the creation of technical documentation, such as user manuals and design documents.
  3. Research assistance: ChatGPT can help engineers research and stay up-to-date with the latest developments in their field by providing relevant articles, papers, and tutorials.
  4. Problem-solving: ChatGPT can assist engineers in identifying and solving problems by providing suggestions and helping to troubleshoot issues.
  5. Automating repetitive tasks: ChatGPT can automate repetitive tasks such as generating reports, creating design documents and sending emails which can help engineers to save time.

Overall, ChatGPT can help engineers to be more productive and efficient in their work.

So far, so good, and the response was delivered almost instantly. But it is all a bit generic. Let us dig a little deeper, focusing more tightly on one of the specific points raised.

Question: How can ChatGPT help software engineers to generate code?

Answer:

ChatGPT can help software engineers generate code in a few ways:

  1. Code Templates: ChatGPT can generate code templates for a specific programming language, such as a basic structure for a class or function. This can save engineers time when starting a new project or adding new features to an existing one.
  2. Code Completion: ChatGPT can provide suggestions for code completion, allowing engineers to write code faster and with fewer errors.
  3. Code Refactoring: ChatGPT can assist engineers in refactoring code by providing suggestions for code improvements and optimizations.
  4. Bug Fixing: ChatGPT can help to identify and fix bugs by providing suggestions for code changes and providing possible causes of the bug.
  5. Code Generation from Natural Language: Engineers can describe a software requirement in natural language, ChatGPT can then generate corresponding code in a specific programming language.

It’s important to note that while ChatGPT can generate code, it’s not a substitute for human expertise and judgement. The generated code should always be reviewed and tested by the software engineer before being deployed to production.

The last paragraph is critical. And we will come back to that in more detail in a moment. But if ChatGPT says it can support engineers by performing such supporting tasks, then how good is it at actually doing so?

To find out, several engineers have been putting the software through its paces to see how it performs when asked to conduct specific tasks.

Here, the online tutorial by the software developer James Willett looks in detail at how the software can generate boilerplate code, commanding it to write a Python script that checks if a number is greater than or equal to 20. This task is managed in a matter of seconds. The software is then asked to write code for a Twitter bot that generates messages every ten minutes. The AI chooses Python as the language, and it prints out a script, a summary of what it has done, and some instructions on how to use it. Again, the task is performed successfully, providing the code that can be used immediately.

The video then goes on to other more complicated activities. These include creating a JavaScript code that generates the Fibonacci sequence and writing a Gatling script. It is also asked to create regular expressions; solve coding challenges; debug code by identifying a deliberate error inserted in Scala code; and provide guidance on how to get started with new software tools (in this case, how to set up the Flagger build tool used in Kubernetes).

In each case, ChatGPT does a reasonable job of producing code, making suggestions, spotting errors and providing advice. But it could be better. The responses are not always accurate, and some of the presented scripts would not have worked as expected. Despite being initially sceptical of ChatGPT’s capabilities, the software developer putting it through its paces is positively surprised by its capability. He concludes that ChatGPT’s primary use for the software developer, at the moment, is as an assistant – a tool that can be worked with in support of productivity. But its limitations and inaccuracies mean it cannot replace the software engineer.

Supporting the Mechanical Engineer

But ChatGPT is not restricted to software engineering. A second video by Vinayak Deshpande provides a detailed overview of how a mechanical or aerospace engineer can use the software. Here it is used to see if it is of any use in solving everyday problems related to rocket propulsion and guidance navigation and control. For example, the first exercise is to explain rocket propulsion in simple terms – which it efficiently manages in some detail. 

Then the tasks become more complex: how to write pseudocode to calculate the speed of sound given the ideal gas constant R, the temperature T, and the specific heat ratio g. Here, the correct equation is given. The next prompt – write pseudocode to determine the pressure behind a normal shock in supersonic flow – is more specific. And, again, it is achieved correctly, with a detailed answer.

Other questions asked on the video include ‘explain the difference between an oblique shock and an expansion wave’ with Vinayak Deshpande interpreting the response as ‘pretty much perfect’. Having asked several other questions in areas such as motion planning, computational fluid dynamics and finite element analysis, the reviewer concludes that he is pleased with the performance of ChatGPT and found it an informed and helpful tool.

The Future Role of Engineers

Those are just a couple of online reviews of ChatGPT and its relevance for engineers. Others are starting to emerge daily. The upshot seems that ChatGPT is an exciting advance that does have bearing for those performing technical roles.

But what does that mean for the future of engineering? Will the creep of automation eliminate the need for human input – with AI one day replacing engineers? For that all-important question, it is perhaps apt to ask the software for a reply.

Answer:

It is unlikely that ChatGPT or similar language models will replace the roles of engineers entirely. Engineers use their knowledge and skills to design and build complex systems, while ChatGPT and other language models are primarily used to generate human-like text based on the input they receive. While ChatGPT and similar models can assist engineers in tasks such as generating reports, documentation, and other written materials more efficiently, they cannot replace the critical thinking and problem-solving skills that engineers use to design and build complex systems.

It is also important to note that, this kind of model still needs human supervision and validation since, it’s not capable of understanding the context of the real-world problem and engineering constraints.

So, there you have it. ChatGPT comes as friend, not foe. Ultimately, it will provide engineers with a valuable resource that complements and supports their experience, knowledge and skills – boosting productivity and output.


SORA Unveiled: New Text-to-Video Tool from OpenAI

When ChatGPT was introduced, allowing direct communication with artificial intelligence…

Total
0
Shares
Previous Post

How Maglev Trains and High-Speed Rail are Revolutionising Travel

Related Posts