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."
- Instructions — healthy
- Policy — healthy
- Question — healthy
- Your backend — healthy
- Language model — healthy
| Part | Text |
|---|---|
| Instructions (highlighted) | Answer only from the policy below. |
- The instructions. First come the instructions, which say how to behave: "Answer only from the policy below."
- The context. Next comes the context: the shop's refund policy, which allows returns for 30 days.
- The question. Last comes what the customer asked: may they return shoes after 40 days?
- One request. Your backend joins the three parts into one prompt and sends it as a single request.
- Answer from the policy. The model answers from the policy: no, since 40 days is past the 30-day limit.
- 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
- Instructions say how to behave, such as "use only the policy".
- Context is the material to answer from, such as a document.
- The model sees only what is in this one prompt.
- Leave out the context, and the answer becomes a guess.
A (Everything sent to a language model in one request: instructions, context and the question.) 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.
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.