What Does a Prompt Consist Of? Four Key Elements

A prompt can contain four main elements, each of which performs its own unique function.

Instruction

A clearly worded task or command that you give the model. It defines what exactly the model should do, whether that is generating text, answering a question or performing some other task. The clearer and more precise the instruction, the better the result.

Example:

Write a description for the home page of a website that will attract new visitors to a coffee shop.

Context

Background information that helps the model understand your task better. It supplies the details that make the request clearer, letting the model take the nuances into account and generate more precise, more relevant answers.

Example:

My coffee business has been running for 3 years. We recently launched a coffee delivery subscription and want to attract new customers by offering the first month of the subscription at a 50% discount.

Input data

The basis for the model's answer. This can be a question, a statement or any other information you provide to the model. The more precise and specific the data, the more relevant and useful the answer you get back.

Example:

Our coffee shop offers unique coffee varieties and fresh pastries.

Output indicator

Sets the format or type of answer you want from the model. This can be text, a list, code, an image or another format. By defining clearly what the result should look like, you significantly raise the chance of getting the answer you need.

Example:

A list of 5 examples.

It is worth noting that not all four elements have to be present in every request. The structure and content of a request depend largely on the specific task and the desired result. Some may contain only an instruction and input data, while others may require a more complex structure using all four elements.

Try it in GPTunneL