ailiteracynepal 🇳🇵
Text size

Chapter 01 · Section III · 10 min read

1.3 The parts of a working prompt

A working prompt is usually five parts — role, task, context, examples, format. What each part does, why it helps, and when you can skip one.

Prompts that produce reliable output almost always have the same five moving parts. You don’t need every part every time — a two-line prompt can be perfectly good. But when a prompt is failing, it’s almost always because one of these parts is missing.

The five parts

  1. Role — who the model should behave as. “You are a copy editor for a Nepali travel magazine.”
  2. Task — the single thing you want done. “Rewrite the paragraph below for clarity.”
  3. Context — the material the task operates on, plus any background it needs. “The paragraph is a caption for a photo of Rara Lake.”
  4. Examples — one or two demonstrations of the shape you want. Optional but powerful.
  5. Format — how the response should be structured. “Return only the rewritten paragraph. No preamble, no explanation.”

Not every prompt needs all five. A quick “translate this to Nepali: …” needs a task, context (the sentence), and an implicit format. A serious production prompt for classifying customer support tickets probably needs all five, plus examples.

A worked example

Starting from a lazy prompt:

Categorize this ticket.

"App keeps crashing when I try to send money to my brother's Khalti."

The model will produce something — probably a plausible category — but you don’t know which categories it chose from, or in what shape. Add the parts:

You are a support-triage assistant for a mobile payments company in Nepal.

TASK
Categorize the customer message below into exactly one of these categories:
  - payment_failure
  - login_or_auth
  - kyc_or_verification
  - other

MESSAGE
"App keeps crashing when I try to send money to my brother's Khalti."

FORMAT
Return only the category slug, lowercase, no punctuation.

Same task, different reliability. The role sets the frame, the task is a single verb, the categories are a closed set, the format is a single token you can parse.

When you can skip parts

  • Skip the role when the task is neutral (translation, arithmetic, summarizing a factual paragraph). Roles help when the register or judgement matters.
  • Skip examples when the shape is unambiguous. “Return valid JSON with keys title and summary” doesn’t need an example. “Rewrite this in the voice of Onion News Network” probably does.
  • Skip context only when the task is truly self-contained. “Convert 250 rupees to US dollars at 1 USD = 133 NPR” is self-contained. Most real prompts are not.
  • Never skip format if you’re going to parse the output programmatically. Even for humans, “return three bullet points” beats “give me a few thoughts.”

The order

A good default order is: Role → Task → Context → Examples → Format. The model reads top-to-bottom and weights early instructions strongly, so putting the task near the top keeps it anchored. We’ll come back to ordering in Chapter 2.

Check your understanding

Quick check

A prompt that says "Rewrite this paragraph to be clearer" returns rewrites that are longer and more formal than the original, when you wanted them shorter and plainer. Which of the five parts is most obviously missing?