0
Act 2

Understanding

4 / 8

Prompt Engineering

Act 2 · ~4 min

Theory

A well-structured prompt has four components, applied in this order before the user query.

  1. Instruction — tell the model what to do. "Summarize in 3 bullets."
  2. Context — supply the background it needs. The document, user profile, or prior turns.
  3. Example — demonstrate the desired input → output shape with 1–3 worked cases.
  4. Format — constrain output structure. JSON shape, length cap, no markdown headers.
Vague

"Summarize this."

Format, length, focus, and style undefined. The model invents all four.

Specific
Summarize the following in exactly 3 bullets.
Each: one sentence, <20 words, actionable only.
Document: {text}
Summary:
•

Every gap closed. Output priming with locks the format.

Coming next: few-shot examples, chain-of-thought, and system prompts extend this foundation.