Skip to the workspace
Pebellslearn by building
Introduction  ›  Lesson

What Is a Prompt?

What is a Prompt? 12 minA prompt is all the text the model receives before it answers, and it usually has an instruction, context, input data and an output format.

prompt engineering / What Is a Prompt?

Explore each scene at your own pace.

01 · The rule

The rule

What Is a Prompt?

The shop owner's first attempt was one line: "What is this email about?" The model replied with a friendly paragraph summarising the email, which no program could file into a folder. Nothing was wrong with the model. The prompt simply did not say what was wanted.

The rule

A prompt is everything the model reads before it answers.

That includes the words you type, but also any hidden system instructions, earlier turns of the chat, pasted documents and examples. The model continues all of it. Most useful prompts contain four parts:

  • Instruction — the job: "Classify this email."
  • Context — background that shapes the job: who you are, what the labels mean.
  • Input data — the thing to work on: the customer's email.
  • Output format — exactly what the answer should look like.

Here is the Spoke & Chain triage prompt with all four:

You sort emails for Spoke & Chain, a bicycle shop.            <- context
Classify the email below into one category:                    <- instruction
repair, order, refund or other.
Reply with the category only, in lowercase.                    <- output format

<email>
Hi, I ordered a red helmet on Monday and it still hasn't come. <- input data
</email>

The expected answer is order. Notice the tags around the email. They mark where the data starts and stops, so the model does not confuse the customer's words with your instructions.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.