What is prompt engineering?
With prompt engineering, you make your expectations clear to an AI model. You describe what the model should deliver. You also describe who the answer should help and what the reader should be able to use it for. A task like writing a social media post gives the model more choices than a task where you also specify the target audience, channel and message. In other words, you choose which decisions you want to make yourself and which you want to leave to the model.
Google Cloud distinguishes between prompt design and prompt engineering. You design the prompt when you write it. You do prompt engineering when you test the wording, assess the answer and adjust your instruction. You may also come across terms such as prompt development, prompt optimisation and prompting. The point is to work out which instructions help with the task at hand. No single wording works for every task.
How do you use prompt engineering?
You start by deciding what you need the answer for. A list of ideas for an editorial meeting doesn't need the same detail as a draft text for a specific channel. You can use the following steps to make the task concrete:
- Describe what the model should deliver and what you'll use the result for.
- Add the background the model needs, such as target audience, product or channel.
- Specify your requirements for tone, length, format and content.
- Compare the answer with your requirements, and clarify the instruction if anything is missing.
You don't need to rewrite the whole prompt if the answer misses the mark. If the content suits the task and the language doesn't suit the target audience, you can ask the model to keep the structure and explain the technical terms.
Why should you use prompt engineering?
You can use prompt engineering to get drafts you can assess against a specific marketing task. For example, you can ask for ideas for a blog post, subject lines for an email or an outline for an SEO brief. You give the model a clearer basis for suggesting relevant angles when you explain what the target audience wants answered and where the content will be used.
You should distinguish between the quality of a draft and the effect of the finished content. Three ad suggestions can all follow your brief, and that still doesn't tell you which one will get the most clicks. You can use the answer as a basis for your further work. It isn't evidence of an effect.
Which types and variants can you use?
You can combine several techniques in the same prompt. So you don't need to choose one fixed type. You can start from what the model is missing to solve the task.
- Context: You give the model background on the product, the target audience or the situation.
- Role: You ask the model to answer from a professional perspective, for example as a copywriter.
- Examples: You show the tone or structure you want. You use few-shot prompting when you give the model a few examples to lean on.
- Format: You specify the form of the answer, for example a bulleted list with three suggestions.
- Follow-up: You clarify or change the requirements based on the first answer.
How do you use prompt engineering in practice?
You can use an ad brief as the starting point for your prompt. Product, target audience and message give the model direction, while channel, number of suggestions and desired action make the deliverable more concrete.
For example, you can ask for draft ads with this prompt:
Write three draft Google Ads for a beginner's photography course. Write for new camera owners who want to learn to use the camera's manual settings. Use one main message per suggestion, and encourage the reader to view the course programme.
You can now check whether each suggestion speaks to new camera owners, sticks to one message and mentions the course programme. If a suggestion tries to highlight several benefits at once, you can ask the model for a new version with one clearer point.
What should you watch out for?
There's no single standard formula for measuring the quality of prompt engineering. Instead, you can assess the answer against your own brief. Does the content suit the target audience? Does it follow the tone, length and structure you asked for? Do you need to correct individual phrases or change the whole angle?
You should review and edit the answer before you use it. An answer can follow the format and still get the message wrong. Use your corrections to see where the prompt needs to be more precise next time.