← Back to outline
Prompting That Works: Write Requests AI Can Execute Well · Lesson 2 of 7

2. The Five-Part Framework: Goal, Context, Format, Constraints, Example

Learn the five components of a strong prompt and diagnose which one is missing when an answer falls short.

Every prompt you send is made of up to five parts, and a weak answer is almost always missing one of them.

  1. Goal — What you want, and what it is for. "Write a summary" is vague; "Write a summary so a sales manager can decide in 30 seconds whether to read the full report" is a goal.
  2. Context — Who is involved, who will read the output, what already exists. The model cannot guess your situation; you have to sketch it.
  3. Format — Length, structure, language, tone. Do you need a table? Bullet points? Formal French? Say so.
  4. Constraints — What to avoid, what must be true. "Do not mention competitor names," "Use only the data I provide," "Stay under 200 words."
  5. Example — A short sample of the expected result. Models follow examples better than descriptions.

You rarely need all five in every prompt, but when an answer disappoints, check which part is missing before rewriting everything.

Goal & Context: the two parts people skip most

A prompt without a clear goal forces the model to guess what "good" looks like. And without context, it guesses who the reader is, what tone fits, and what level of detail matters.

A practical trick: name the reader and the purpose before the task itself. Compare these two prompts:

• "Explain cloud security." • "Explain cloud security for a non-technical CFO who needs to approve a budget line. Keep it under 150 words."

The second prompt carries a goal (inform a budget decision), context (non-technical CFO), format (under 150 words) and an implicit constraint (no jargon). The model can now optimize for something concrete instead of producing a generic essay.

Format & Example: show, don't just tell

Describing a format in words works, but showing a short example works better. If you need a table with three columns, paste a two-row sample. If you need valid JSON, show the keys and one filled entry.

This is especially important when the structure is unusual or when you plan to feed the output into another tool. The model will mirror the pattern you provide far more reliably than it will interpret a paragraph of formatting instructions.

Put the essential instruction first, the material or documents after, and the format request at the end — this ordering helps the model keep the most important directive in focus.

Constraints: preventing what you don't want

Constraints are the guardrails of your prompt. Two of the most powerful:

Grounding — Provide the source material and say explicitly: "Answer only from the provided sources; if the information is not there, say so." Ask for citations when facts matter. This dramatically reduces invention. • Exclusion — State what must not appear: competitor names, technical jargon, speculative claims.

Constraints work because the model can only optimize dimensions you name. "Make it better" gives poor results because "better" is not a direction. "Make it shorter, warmer, and add one concrete example per point" is three constraints the model can act on immediately.

Tip

When an answer falls short, don't rewrite from scratch. Diagnose which of the five parts is missing or weak, then add just that part in a follow-up message. Keep the conversation going — restarting throws away the context the model already has. If the chat has drifted, restate your goal in one sentence to refocus it.

Tip

A role helps only when it carries real expectations. "As a French labor-law specialist writing for an HR manager" narrows vocabulary, caution and depth at once. Empty roles like "you are a genius" change nothing. Prefer describing the audience and the quality standard over inventing a persona — that is your Context and Constraints doing the real work.

Try it now

Open ChatPro and write a prompt that uses all five parts: state a goal, give context about the reader, specify a format (e.g., a table or numbered list), add at least one constraint, and paste a short example of the output you expect. Send it, then evaluate: which part made the biggest difference? Try removing one part and resending to see how the answer changes.

Take this course in OUPI → This exercise is done inside the OUPI platform.
Recap

A strong prompt can carry five parts: Goal, Context, Format, Constraints, and Example. You rarely need all five, but a disappointing answer is almost always missing one. Name the reader and purpose up front, show the format with a sample, ground the model in sources to prevent invention, and state constraints as specific dimensions — not vague requests like "make it better." When iterating, diagnose the missing part and add it in the same conversation. When a prompt works well, save it as a skill or agent in OUPI so you never have to write it again.