ChatGPT is by far the most well-known and widely used AI tool to date. It boasts a ridiculous 1.5 billion visits per month on average as of February 2023. It can help you with just about everything that can be put into words, from writing essays, to giving dating advice (it didn’t work), to writing code. I will be focusing on the latter in this blog, and I aim to help you refine your usage of ChatGPT to make sure you get the most out of this chatty chat bot, and mitigate the endless back and forth so many people get stuck in with it.
The key to getting good responses from ChatGPT is to provide clear and specific prompts. When it comes to asking it to help you write code, don’t be vague. Start by giving it context about the project or component you are working on, give it the language and any other relevant information that you might use to achieve what you want ChatGPT to achieve. Let’s take a look at what I consider to be a bad prompt: Hey ChatGPT, give me a web page with a heading, an input box, and a button.
ChatGPT naturally provided me with HTML, and when rendered gave me exactly what I asked for:
It is as barebones as can be, but that is exactly what was asked of ChatGPT. AI models put on display something I learned early on in my IT journey, the GIGO principle. GIGO stands for Garbage In – Garbage Out. If you supply a bad prompt to ChatGPT, chances are you are going to get exactly what you asked for – a bad response.
Next, let’s ask ChatGPT to create the same webpage, but let’s make ChatGPT work a bit harder and make it nicer for us, so that we don’t have to change as much. Here is the prompt:
Hey ChatGPT, please give me an Angular webpage with a heading, input box and a button. It is supposed to be the login page of a website, and I would like it to look like the Microsoft website. Add the CSS as well to make it look good.
Immediately after receiving this prompt, I got a more fleshed out response. When rendered it looks like this:
Yes, the textboxes aren’t in the center properly and it isn’t perfect, but with a little bit more effort on being more specific in the prompt, ChatGPT delivered much more usable code, including the HTML and the CSS necessary, as well as an explanation on where to use the CSS.
To further refine your prompts, consider breaking them down into smaller, more specific parts. For example, instead of asking ChatGPT to generate an entire web page, you could ask it to generate specific components, such as a navigation bar or a footer. This can help you get more targeted responses that are better suited to your needs. Additionally, providing examples and context can also help ChatGPT better understand what you are looking for and generate more accurate responses.
When it comes to using ChatGPT, obviously there are infinite possibilities of what it can be used for, not just creating webpages. So I decided to ask ChatGPT what it considers to be principles of good prompting, because I bet nobody ever asks ChatGPT about what it wants (it’s always help me ChatGPT, never how are you ChatGPT?). The response I got was much more substantial than I expected, so I think ChatGPT might have some pent up bad-prompting rage it had to get off its chest:
Now if that is too much to read for you, let me (a human) use my experience with ChatGPT after spending a lot of time with it to summarize for you just some basic things to keep in mind when asking ChatGPT questions:
After taking into account the principles of good prompting, the next step is looking at the responses and knowing how to use and interpret them.
So you’ve spent 3 minutes crafting the finest, most polite prompt to ChatGPT ever seen and it hits you with a response that you don’t understand or don’t like for whatever reason. What do you do next? Spend more time thinking about your prompt and changing your word choice because you think maybe you made a mistake? Rather have ChatGPT draw up a new response on the same prompt first. It doesn’t take much time, and maybe on the second try it gets the job done better. From my experience, especially when you are drafting massively long prompts, regenerating a response sometimes works better and faster than creating a new prompt. I have compiled a few points to think about when you are considering regenerating your responses:
The too long, didn’t read of this topic is simple: Regenerate some of your responses if you are even slightly unhappy. It doesn’t take more time than creating an entirely new prompt, and chances are on the second try you get what you need.
Do you consider yourself an active user of ChatGPT? Maybe you just use it when you get lonely, that’s fine too, ChatGPT can even communicate to you in your home language. Maybe you are a bit scared of becoming lazy or growing dependent on ChatGPT, that will depend on your personality and work ethic I suppose. I however believe that one can almost not use ChatGPT enough. From cooking advice, to a replacement for Googling something, to very granular and in-depth questions, ChatGPT can provide you with so much information and can boost your efficiency in practically any environment. It can help you solve minor problems very quickly, answer tedious questions to Google in seconds, and it even helped me come up with chord progressions for a song I was writing, even though it can’t draw sheet music. The uses and possibilities of ChatGPT are endless, and the more we use it and integrate it into our daily workflows and lives, the better it is going to get.
AI is not something to be scared of, ChatGPT isn’t alive or thinking when it isn’t being asked questions. ChatGPT should be used, abused even, to get the most out of your own abilities and boost your overall efficiency.
In conclusion, even though its dating advice is lackluster, ChatGPT is a tool that I implore you to use every day. And if you have ever been locked into an endless back and forth with it, I hope this blog can help you refine your interactions with ChatGPT.
WRITTEN BY
Jandre Kritzinger