ChatGPT is everywhere – this is probably just one of about 500 blog posts that were published in the last 5 minutes about ChatGPT. Most of them are probably written by ChatGPT, unlike this one. I probably should have used it to save myself some time, but as much as I like ChatGPT, I also just enjoy writing a little too much. So here we are.
What I’d specifically like to write about today is the art of crafting prompts. Everyone’s using ChatGPT, but I want to be very clear – prompt-writing is a skill, and one that we’re still developing. Let’s look at what a bad prompt gives you, and compare it to what happens when we put a little finesse and specificity into our prompt writing.
The task we’re going to get ChatGPT to complete is to write a paragaph of text about the importance of good prompt writing. Just to double down on the theme. Let’s start by telling it that.
1. The Basic Prompt
Prompt: write a paragraph about the importance of good prompt writing
Response: Good prompt writing is of paramount importance as it serves as the foundation for effective communication and successful outcomes in various contexts. Whether it’s in education, business, or creative writing, a well-crafted prompt provides clear instructions, stimulates critical thinking, and inspires creativity. A good prompt sets the tone and direction for the task at hand, guiding the recipient towards the desired outcome. It helps to spark curiosity, encourages exploration, and fosters engagement. A poorly written prompt, on the other hand, can lead to confusion, ambiguity, and misinterpretation, resulting in subpar results or misunderstandings. Well-designed prompts are essential tools for educators, writers, and communicators, facilitating the exchange of ideas, stimulating thought processes, and enabling effective communication.
So here’s our basic result. Already, we’ve got an issue – the AI wasn’t sure what we meant by a prompt. We didn’t tell it what the purpose of the prompt we’re specifically talking about was, we didn’t tell it any context, we told it nothing about what we needed the prompt for. The output reflects that – it’s vague, unsure what it’s talking about. It does exactly what we told it to do, and it’s well-written, but that’s not enough for a piece of writing to actually be good.
This is the level of prompt that a lot of people using ChatGPT are using, and it’s easy to see why the results are underwhelming. Let’s step it up a little by adding some specificity.
2. Being More Specific
Prompt: Write a paragraph of text for a blog about the importance of writing good prompts when using ChatGPT. The paragraph should focus on the impact that specificity has on the output.
Response: The power of ChatGPT lies in its ability to generate text based on the prompts it receives, and the quality of these prompts cannot be overstated. Writing good prompts is essential to ensure accurate and meaningful responses from ChatGPT. One key aspect of a good prompt is specificity. When prompts are vague or ambiguous, the output from ChatGPT can also be similarly vague or unhelpful. However, when prompts are specific, providing clear instructions or asking precise questions, the resulting output is more likely to be relevant, coherent, and useful. Specific prompts allow ChatGPT to understand the user’s intent and provide targeted responses, making the interaction more effective and efficient. So, when using ChatGPT, remember that the more specific and well-crafted your prompts are, the better the output will be, making your experience with ChatGPT truly valuable.
This is considerably better, and for a lot of applications this is actually good enough, particularly those where we only need a small amount of text (like a paragraph). By providing it the context of being a blog, we give it clues as to what it’s for – we could’ve gone even more specific here by telling it who the audience of the blog is, what their pre-existing knowledge of ChatGPT is, and all manner of other things, but I wanted to illustrate a significant shift with a relatively minor shift in the specificity of my prompt. But let’s see what it does when I go deeper with specificity.
3. Providing Instructions and Audience Intent
Prompt: Write a paragraph of text for a technology blog for users who are technically literate and have intermediate knowledge of machine learning fundamentals, but are not skilled at writing. The paragraph should focus on the impact that writing specific and detailed prompts has on the output of ChatGPT, including a comparison between a poor prompt and a good one.
Response: Writing specific and detailed prompts when using ChatGPT can have a significant impact on the quality of the output. As a machine learning model, ChatGPT relies heavily on the input it receives to generate responses. A poor prompt, such as a vague or ambiguous question, may result in inaccurate or irrelevant responses. For example, asking “Tell me about AI” may yield generic and surface-level information. However, a well-crafted prompt, such as “Can you explain the application of recurrent neural networks in natural language processing?” can result in a much more detailed and informative response. Providing context, specifying desired output format, and being clear in the prompt can greatly improve the accuracy and relevance of ChatGPT’s responses, allowing users to harness the full potential of this powerful language model in their interactions.
As you can see, this shifted the tone and content of the output considerably. By providing information about the reader, we told the AI effectively “It’s OK to use words this reader profile understands”. This resulted in it talking about things like language models, recurrent neural networks, and natural language processing. It took the information I gave it about our fictional audience and related its examples to that audience. I also gave it instructions to include a comparison to help drive its point home, in doing so improving the impact of the piece of writing. This result is pretty great from an information standpoint, but we can go even further with what instructions we give to ChatGPT.
4. Providing a Voice
Prompt: You are an experienced technology professional with excellent writing skills, a friendly, warm writing style and a great sense of humour. You are also British. Write a paragraph of text for a technology blog for users who are technically literate and have intermediate knowledge of machine learning fundamentals, but are not skilled at writing. The paragraph should focus on the impact that writing specific and detailed prompts has on the output of ChatGPT, including a comparison between a poor prompt and a good one. Ensure that the examples are entertaining and strange to catch the reader’s attention.
Response: Greetings, tech-savvy readers! Today, we’re diving into the fascinating world of machine learning prompts and their impact on ChatGPT’s output. As someone who knows their way around the tech landscape, you’re likely aware that the quality of your prompt can make all the difference in the world. Let’s take a moment to compare a poorly written prompt with a brilliantly crafted one. Imagine asking ChatGPT to generate a story about a “cat with a hat.” A lackluster prompt might be something like “Tell me a story about a cat.” Pretty mundane, right? But, oh, how the magic happens when you unleash the power of specificity! Picture this instead: “Write a whimsical tale about a mischievous tabby named Mr. Whiskers who dons a top hat and hosts tea parties for squirrels in his treehouse.” Now that’s a prompt with pizzazz! So, fellow techies, remember that the devil is in the details when it comes to prompts, and the more vivid, quirky, and specific, the better. Unleash your inner wordsmith and watch ChatGPT’s creativity soar to new heights! Cheers, and happy prompt-writing!
OK ChatGPT dial it back, dial it back! But look at what a huge impact those additions to our prompt made to our response. It was given the exact same instruction, but before I gave it the actual prompt, I gave it a persona. This is an awesome technique that you can use while using ChatGPT to set the tone and feel for your writing to prevent you from getting those cold, sterile responses that we’ve had up until this point. The additional instruction to make the prompts entertaining and strange probably affected the rest of the output, so this paragraph isn’t exactly what I’d call good, but it works well for showing what a difference giving ChatGPT a character to play has on the output.
General Tips
While I’d love to spend all day writing about this, we have to wrap up somewhere, so instead I’ll share some final tips for getting the most out of ChatGPT, as well as recapping what we’ve seen in our examples.
- Be specific about how much text you want it to generate. I glossed over this, but actually even our “bad” prompt followed this rule, simply to make it fit into this blog. If you don’t specify “a paragraph”, “500 words”, “3 sentences” or similar, ChatGPT will just guess what you wanted, and the more ChatGPT has to guess, the worse your output will be.
- Be specific about what you want it to write about. We also don’t want ChatGPT to guess the topic of our writing. Tell it exactly what the primary focus of the text needs to be.
- Give ChatGPT an audience to write to. When ChatGPT knows who it’s writing for, it adjusts the examples and vocabulary it uses.
- Give ChatGPT an idea or example to build around. A specific idea (like our comparison in the example) helps the model to shape its response around that idea, which gives you far greater influence over the output.
- Give ChatGPT a role to play. This does not necessarily have to be a character, but that’s a powerful tool to experiment with. When ChatGPT is told to respond in a specific style or voice, it starts to apply perspective to its output that the model typically lacks. This may do some weird things to the output, but by adjusting the output you can inform future responses.
- Edit ChatGPT’s responses yourself. When you say “This was a good start, but I’ve edited your output to read like this”, you give the model a massive amount of information around tone, writing style, and what you’re trying to get back. This is incredibly useful when generating more than one bit of text, because it will remember your editing style in the future.
- Work collaboratively with the AI. This is the absolute biggest one. If something is bad, tell it that it’s bad and how it can fix it. Go back and forth offering critique and suggesting changes. Become the editor, and try to get it to give you exactly what you need. This won’t always work, the AI can get very knotted up over minor changes, but that’s part of the process where you can start doing things like feeding it direct edits. ChatGPT is a tool, and it works best when you’re the one steering it.
Hopefully this has shed a little light for you on how to get actual useful outputs from ChatGPT. I’m not an expert – almost nobody can claim to be right now. But anyone who isn’t looking at how language models like ChatGPT and other AI tools can improve their efficiency and the words they write is simply missing a trick.
As the weird British ChatGPT version of me would say – Cheers, and happy prompt-writing!
Pingback: AI Prompt Packs are a Scam - Ina Helps