Anatomy of a Prompt
A prompt is an instruction given to a model to perform a task.
The Text You Type Becomes a Prompt
Imagine you type a question into a model and wait for an answer. The text you typed is the starting point for everything that follows in this module. In this course, that text has a name: a prompt. Before we look at how prompts are built or how to write good ones, we need a precise idea of what a prompt is and what it asks a model to do.
The rest of this article follows one prompt from the moment a person writes it to the moment a model is expected to finish the job it describes. Along the way you will learn to pull a prompt apart and name its parts.
Tracing a Prompt from Person to Model
Read the definition of a prompt as a sequence of steps. A person writes an instruction. That instruction is given to a model. The model is then asked to perform a task. A prompt is the link that carries an instruction from a person to a model so that a particular task gets done.
The diagram shows the key point about what travels and what is expected. The prompt is what moves between the person and the model. The task is what the model is ultimately expected to accomplish. Keep these two ideas separate: the prompt is the message, and the task is the work the message asks for.
The Three Parts of the Definition
A prompt is an instruction given to a model to perform a task.
The definition has three parts worth separating. The first part is the instruction: a prompt tells the model what to do, rather than merely supplying material to read. The second part is the model, which is the recipient of the instruction. The third part is the task, which is the thing the model is meant to carry out.
Deciding Whether a Question Is a Prompt
A question addressed to a model counts as a prompt when it asks the model to perform a task. That means a question is not automatically a prompt just because it ends with a question mark. The test is whether the text asks the model to do something.
Checking a piece of text against the definition
Decide whether the text 'Summarize this article in three bullet points.' is a prompt, using the three parts of the definition.
- 1Look for an instruction
The word 'Summarize' tells the model what to do, so the text is an instruction and not just material to read.
- 2Identify the model
The text is addressed to a model, which is the recipient of the instruction.
- 3Identify the task
The task is to produce a three-bullet summary of the article.
- 4Apply the test
The text asks the model to perform a task, so it counts as a prompt.
The text is a prompt. It contains an instruction, is addressed to a model, and describes a task the model is meant to carry out.
Now consider a question such as 'What is the capital of France?' The source's test still applies. The question is addressed to a model and asks it to perform a task, which is to answer. So it counts as a prompt, even though the task is very small.
Tasks from Small Requests to Large Projects
The task a prompt describes can be very small or quite large. At the small end is a simple request for an answer. At the large end, the same kind of instruction can ask a model to take on work with many parts. The source gives three examples of the larger end: researching competitors for a product idea, building a website from scratch, and analyzing data.
| Scale | Example task | What the model is asked to do |
|---|---|---|
| Small | Answering a simple question | Produce a single answer |
| Large | Researching competitors for a product idea | Gather and organize information about several competitors |
| Large | Building a website from scratch | Carry out a project made of many parts |
| Large | Analyzing data | Examine a body of data and report on what it shows |
Prompts can describe tasks across a wide range of scope
The important lesson is that size does not change the definition. Whether the task is a single answer or a website project, the text is still an instruction given to a model to perform a task. Only the scope of the task changes.
Mistakes Learners Make About Prompts
Common mistake Thinking a prompt must be a large or complicated request
What it looks likeDismissing 'What is the capital of France?' as too simple to be a prompt.
Why it failsThe definition covers any instruction given to a model to perform a task, and a simple question qualifies.
Do this insteadAsk whether the text asks the model to perform a task. If it does, it is a prompt, regardless of size.
Common mistake Confusing the prompt with the model's response
What it looks likeSaying the prompt is the answer the model returns.
Why it failsThe prompt is the instruction that travels from the person to the model. The task is what the model is expected to accomplish.
Do this insteadKeep the prompt on the sending side of the flow and the completed task on the receiving side.
Common mistake Treating any text given to a model as a prompt
What it looks likePasting a block of reference material and assuming it is a prompt by itself.
Why it failsA prompt tells the model what to do. Material to read, on its own, does not give that instruction.
Do this insteadCheck for an instruction that asks the model to perform a task.
Naming the Task in a New Prompt
Read this prompt: 'Analyze this sales spreadsheet and tell me which region grew fastest.' Identify the instruction, the model, and the task. Then decide whether the scope of the task is small or large, and explain your choice in one sentence.
Hints
- The instruction is the part that tells the model what to do.
- The task is the thing the model is meant to carry out, which here involves examining data.
- Compare the work described with the examples of large tasks in the table.
Key Takeaways About Prompt Anatomy
- 1A prompt is an instruction given to a model to perform a task.
- 2The definition has three parts: the instruction, the model that receives it, and the task it asks the model to carry out.
- 3A question counts as a prompt when it asks the model to perform a task, however small that task is.
- 4Tasks described by prompts range from simple answers to large projects such as analyzing data or building a website.
At a glance
- A prompt is an instruction given to a model to perform a task.
- The three parts of the definition are the instruction, the model that receives it, and the task.
- A question counts as a prompt when it asks the model to perform a task.
- Tasks described by prompts range from simple questions to complex projects such as building a website or analyzing data.