With the release of Chat GPT-4, the latest of the AI-powered language models, the boundaries of what technology can achieve continue to expand at rapid rates. In terms of software application development, some developers are likely to use Chat GPT and other generative AI tools to work more strategically, be more productive, and learn new technology at a much faster pace. What’s not to like?
While Chat GPT’s capabilities are certainly impressive, it’s crucial to acknowledge its limitations in complex tasks, and ultimately, why it can’t replace human expertise. Here’s a brief overview of why ChatGPT is crucial to engineers to keep up and stay relevant but at the same time, why it isn’t taking any of our software engineering jobs.
A Critical Tool in our Toolbelt
The number of ways engineers can leverage a tool like ChatGPT is growing everyday as we get more and more creative in how we craft our prompts. While most people start with simple prompts just telling ChatGPT to do a straightforward thing, engineers who are spending a lot of time with ChatGPT are discovering how to use the different styles of prompts: prompt chaining, zero-shot prompting, and few-shot prompting. What follows are some creative ways to use prompting to really take the tool to the next level.
Explaining Code
One under-appreciated use of ChatGPT is explaining existing code. This is a tremendous way to learn what code may be doing. Especially if it contains a lot of framework code in a framework you may be new to. For example, in mobile development on iOS or Android, a very high percentage of the code is framework code specific to the platform. If you are new to mobile development, understanding it can be very overwhelming. Additionally, leveraging ChatGPT to explain code you’ve found on the internet or in some open source software can be very revealing on what it is doing, with minimal effort. Go ahead and try this out for yourself and be amazed at how detailed and useful the response is! Go to www.stackoverflow.com, find a post that has a snippet of code in it and copy it. Hop on over to ChatGPT and simple start a new chat with the following prompt:
“Explain what the following code does:
<paste your copied code here>”
Code Refactoring
A lot of engineers jump into ChatGPT just to get it to write brand-new code. One great way to evolve is to leverage generative AI to refactor existing code. You may suspect that your code could be optimized, be written in a more testable manner, or even refactored to follow a certain coding principle, such as one from the popular set of principles known as the SOLID principles. A great way to see this in action is to create a simple “switch” statement in code and write a prompt below to refactor from the O principle in SOLID:
“Refactor the following code to adhere to the Open-Closed Principle:
public string GenerateFromPrompt(AlgoType algoType, string prompt)
{
switch(algoType)
{
case AlgoType.ChatGPT35:
return ChatGPT35.ExecutePrompt(prompt);
break;
case AlgoType.ChatGPT4:
return ChatGPT4.ExecutePrompt(prompt);
break;
default:
throw new ArgumentException(“Unknown algorithm type”, “algoType”);
}
}”
Other Examples
The previous two examples really show the power of ChatGPT, but barely scratch the surface. It is important to play with the tool yourself to really begin to learn of its capabilities. Below are just a few other ways to leverage ChatGPT.
- Convert code from one language to another
- Use prompt-chaining to evolve code through providing more and more context with each successive prompt
- Generate a test plan for well-known workflows in an application, such as success and failure cases of a login workflow
- Write unit tests for existing code
The Pitfalls
Limited Problem-Solving Abilities
Chat GPT’s problem-solving capabilities are primarily based on patterns and examples it has been trained on. While it may excel in providing solutions for common or well-defined problems, it struggles when faced with more complex tasks. Here’s why:
Lack of Contextual Understanding
Chat GPT’s training process is based on large-scale language modeling rather than true comprehension, so its ability to understand and analyze complex scenarios is limited. It also often struggles to grasp the nuances, subtleties, and context-specific elements of a problem, such as inputs of algorithms or templates of login pages.
A primary contributing factor is that Chat GPT lacks the ability to draw on real-world experiences and common sense. Unlike humans who have a vast array of memories, experiences, and knowledge, Chat GPT relies solely on the textual information it has been trained on.
Reliance on Pre-Existing Data
Chat GPT learns from an extensive amount of training data, patterns, and language structures, which, in and of itself, is one of its biggest limitations. This is because of its heavy reliance on such pre-existing data, and when a user input deviates from these, Chat GPT, essentially, hits a brick wall.
In layman’s terms, let’s say a software development challenge involves a new type of technology that has not yet been covered in any training data. Chat GPT will most certainly lack the appropriate knowledge to provide any sort of accurate solution. Humans, on the other hand, can utilize a variety of sources, including human connection, which, ultimately, serves as a key advantage.
Adaptability Struggles
Humans are adept at thinking critically, considering various perspectives, and developing innovative approaches to problems. Chat GPT, though, is confined to its patterns and training data. This means it cannot think outside the box and adapt to certain scenarios.
Some of these scenarios include:
- Non-standard use cases
- Unexpected edge cases
- Emerging technologies
Prone to Errors
Since Chat GPT lacks a genuine understanding of the underlying concepts of inputs, it often produces inaccurate or misleading information, which may put your work, reputation, and career in jeopardy.
Chat GPT’s training data may also be occasionally biased or incorrect. Since Chat GPT heavily relies on pre-existing data to formulate responses, it may produce some of these inaccuracies and biases in its generated text.
Furthermore, Chat GPT doesn’t have the capacity to ask clarifying questions or seek further information. In complex tasks, such clarification and additional context are often necessary to develop accurate solutions. This makes Chat GPT susceptible to errors and/or misunderstandings.
And if that’s not enough, Chat GPT also lacks the ability to verify accuracy. Unlike humans who can reference their own expertise and/or outside sources, Chat GPT cannot identify, verify, and correct any errors it produces.
In short, our jobs are not going anywhere because Chat GPT is not perfect. It has pitfalls, drawbacks, and limitations that may hinder the coding process. However, due to the power that it does have, it should strongly be considered by every engineer to be an addition to the toolbelt. One might even argue that choosing not to do so, will leave you behind the others that do!Viagio Technologies builds the best software solutions on time and on budget. Let our experts support you and your professional growth today.