What Is Prompting And Why Does It Matter?

Do you ever use AI to generate content or answer questions, only to find that you're not getting the same high-quality results as other people? Or perhaps you find the quality of outputs is inconsistent? If so, learning some basic prompting techniques could be what you need in order to unlock the power of AI. Before we get into prompting techniques and some additional practical tips, let's take a look at what prompting is.

Put simply, prompting is the way we tell an AI what we want. The good news is you don’t need technical abilities to be a good prompter, and basic techniques are easy to learn. A well-written prompt is like giving instructions to a helpful colleague: the more information you provide and the more specific you are with your request, the more likely you are to receive a useful response. If you don't give AI enough detail, it has to make up the missing detail. You may get lucky and it could give a good response, but without providing that detail you are leaving it to chance.

Let's take an imaginary example of a 6 year old child asking you to explain electricity. You decide to use AI to provide the explanation, and here are two prompts you could use:

1) Explain how electricity works
2) Explain how electricity works to a 6 year old child

If you use the first prompt you're likely to find that it gives you a long and quite technical response, which is unlikely to be appropriate in this scenario. The AI is unaware of who it's providing the explanation for, so it takes a guess. In the second prompt, you've added context by telling the AI that you want an explanation for a 6 year old, so it is much more likely to give a suitable response. You could go further and add additional details, or you could leave it like that. The amount of detail you need to add depends on the scenario, and there are no rules, so you can include as little or as much as you choose. Try modifying the above prompts by adding phrases like ‘make it funny’ or ‘use cats as an analogy’ to see how the output changes.

Once you get the hang of it, prompting quickly becomes less of a guessing game or something you need to remember, and pretty soon you'll barely need to think about it when you use AI. Whatever you choose to use AI for, whether you’re drafting content, analysing data, brainstorming ideas or automating tasks, a good prompt makes all the difference.

RTF - A Simple Prompting Technique That Works

There are many different prompting formats that have shown to produce good results, and as you get more experienced with prompting you can even mix-and-match prompting techniques or make up your own to fit your specific request. A basic format I recommend learning is role-task-format (RTF), which will usually provide the AI with enough information to give a decent response. Let's take a look at how it works.

  • Role: Assign the AI a role so it knows how to respond effectively. AI has a huge amount of knowledge and capability, so it can take on almost any role you can think of. For example, you could ask it to be a successful entrepreneur if you want to ask it about business ideas, or you could ask it to be an award-winning author if you want it to assist with creative writing. You can keep the role simple, or you can choose to include a lot of detail if you want. For example, you may choose to list specific areas of expertise or qualifications you want the AI to have, or you could even describe what type of personality it has!

  • Task: Describe the task you want the AI to do. The more detail you give it and the more specific you are with your request, the more you can control the output. For example, if you ask it to do a competitor analysis, you could specify whether you want it to focus on pricing, marketing strategies, or product features, or how many competitors to include. Alternatively, if you're asking AI to write a blog post, you might choose to give it brief details about what to include or suggested section headers.

  • Format: Describe the format you want the AI to provide the output in. Unless you request something else, AI will usually provide a text output. You can control the output by giving details on what you'd like. For example, you could give a word limit, or you could specify which language to use. You can also specify whether it uses bullet points, write in prose, or even outputs the response as a rhyming poem! The response doesn't have to be text, and you can ask for alternative formats, for example, asking for a table in a spreadsheet, or lines of Python code.

Here's an example of a complete prompt using this role-task-format structure.

You are an award-winning technology journalist with experience writing for non-technical audiences. Write a 600-word blog post in British English explaining the basics of quantum computing in simple terms, using relatable analogies. Present the information in three clear sections with subheadings and a short summary at the end.

Learning this basic technique will significantly improve the quality of your results, and there are plenty of other techniques you can learn too. For example, you could choose to add background to an RTF prompt to provide the AI with further background detail about a specific company or person relative to your prompt. There are many other techniques, and you could also include step-by-step instructions, examples, details of scope or other context as needed. A good prompt can end up being very long, potentially even thousands of words long, and the more detail you give the AI, the better quality the response is likely to be.

Some further practical tips

Getting comfortable with basic prompting techniques is a great start, and here are some additional simple techniques that can save you a lot of time and really help the AI give you what you're looking for:

  • Provide an example: If you share with the AI an example of what you want then it's much more likely to reply in a similar format. For example, if you're using AI to write a report, share an example of a similar type of report. This technique works for images too if you want it to produce an image in a certain style.

  • Ask AI for help with prompting: If you're not sure how to write a good prompt for a particular task, AI can often provide you with a good prompt. Remember to give the AI a role when you ask it for a prompt, so in this case you could ask it to be an expert prompt engineer!

  • Ask AI what information it needs from you in order to complete the task to the best of its abilities: This is a great little tip to ensure that the AI has all of the relevant information from you and you haven't forgotten anything in your prompt.

  • Re-use your prompts: Good prompts can be very long and detailed, so I suggest getting in the habit of saving and reusing prompts. Share successful prompts with colleagues, and avoid starting from scratch each time you need a detailed prompt.

  • Tell the AI to use code: Generative AI models can be bad at maths, but they have access to tools which can help them. If you're asking a question involving maths or coding then adding the simple instruction for the AI to use code will significantly increase the chances of getting the correct result.

I hope you find these tips useful, and please share with me any additional tips you may have so that I can collate them and share them in a future article.

The Red Giant says

Prompting isn’t about learning a complex language and it’s just about being clear and specific. The more context and direction you give to the AI, the better the results you’ll get. There are techniques to explore, but you don’t need to master them all at once. Start simple by adding more detail to your requests and specifying the format you want back, and you’ll quickly notice your prompts improving.

Coming next

In the next article of The Red Giant I'll begin to explore how AI is reshaping the jobs market and what this could mean for you.