Module 0 · Lesson 3 of 10

What a prompt is

Three parts, one request

Your backend builds each prompt from instructions, context and a question, then sends it all in one request.

Scene 1 of 5 · The instructions

First come the instructions, which say how to behave: "Answer only from the policy below."

InstructionsInstructionsPolicyPolicyQuestionQuestionYour backendYour backendLanguage modelLanguage model
  • Instructions — healthy
  • Policy — healthy
  • Question — healthy
  • Your backend — healthy
  • Language model — healthy
The prompt your backend builds
PartText
Instructions (highlighted)Answer only from the policy below.
  1. The instructions. First come the instructions, which say how to behave: "Answer only from the policy below."
  2. The context. Next comes the context: the shop's refund policy, which allows returns for 30 days.
  3. The question. Last comes what the customer asked: may they return shoes after 40 days?
  4. One request. Your backend joins the three parts into one prompt and sends it as a single request.
  5. Answer from the policy. The model answers from the policy: no, since 40 days is past the 30-day limit.
  6. Now you try. Choose which parts go into the prompt, and see what the model can answer. For example, tapping "Instructions" and "Question" gives this: A guess: "Yes, returns are fine for 90 days". With no policy in the prompt, the model never saw your rule, so it guesses a common number.

Scene 1 of 5: The instructions. First come the instructions, which say how to behave: "Answer only from the policy below."

Key points

  1. Instructions say how to behave, such as "use only the policy".
  2. Context is the material to answer from, such as a document.
  3. The model sees only what is in this one prompt.
  4. Leave out the context, and the answer becomes a guess.

A is everything you send to the model in one request. It usually has three parts: instructions that say how to behave, context such as documents or earlier messages, and the question itself.

The model sees only what is in the prompt. It does not remember earlier requests by itself. A chat app that seems to remember is sending the earlier messages again, inside each new prompt.

Better context gives better answers. That is why much of the work in an AI feature is choosing what goes into the prompt, and what stays out.

Example. A support bot's prompt might hold three parts. Instructions: "Answer only from the policy below." Context: the shop's refund policy. Question: "Can I return shoes after 40 days?"

In system design: Your backend builds the prompt. It decides which documents, user details and limits go in, and it pays for all the text it adds.

Check yourself

A chat app seems to remember what you said five messages ago. How does it do that?