Foundations · Module 02 · Novice

Prompting like a professional

Prompting isn't magic words. It's a set of patterns that make the model do reliable work. Master five patterns and you'll get better output than 95% of AI users.

The anatomy of a great prompt

Every strong prompt has four parts. Missing any of them is where things go wrong.

  1. Role. Who is the model right now?
  2. Context. What material is it working with?
  3. Task. What exactly should it do?
  4. Format. What shape should the answer take?

A minimal example

Prompt# Role
You are a senior proposal writer for a design agency that specializes
in accessible government websites.

# Context
Below is an excerpt from a California city RFP for a new tourism website.
<RFP>
{paste RFP text here}
</RFP>

# Task
Extract every stated requirement. Ignore boilerplate. Distinguish "must"
from "should" or "may."

# Format
Return a Markdown table with columns: Requirement, Priority (Must/Should/May),
Section reference.
Why this works

The model has an identity (senior proposal writer), a scope (this RFP only), an unambiguous task (extract requirements), and a shape (table with three columns). Nothing is left to interpretation.

Five patterns worth memorizing

1. Few-shot examples

Show 2–3 input/output pairs before the real task. The model matches the pattern. Best for classification, extraction, tone.

2. Chain of thought

Ask the model to "think step by step" or "list your reasoning first." Slower, more accurate on multi-step problems.

3. Structured output

Say "return valid JSON matching this schema." Modern models support this natively. Never parse free text if you can avoid it.

4. Constraints as guardrails

"If you don't know, say 'I don't know'." "Refuse if the input isn't an RFP." Constraints reduce hallucination.

5. Role + audience

"You are X writing for Y." Two axes control voice better than adjectives ever will.

6. Delimiters

Wrap user content in XML-ish tags like <rfp>...</rfp>. Prevents prompt injection and clarifies where your instructions end and their data begins.

Few-shot in practice

PromptClassify each inbound email as: NEW_LEAD, EXISTING_CLIENT, RECRUITMENT, SPAM.

# Examples
Email: "Hi, saw your work for the City of Fremont, we're looking for a redesign."
Class: NEW_LEAD

Email: "Hi — invoice #4293 for August still open, can you resend?"
Class: EXISTING_CLIENT

Email: "Growth Marketing Intern here, want to help scale your firm."
Class: SPAM

# Now classify:
Email: "{email_body}"
Class:

Structured output

When the answer needs to be consumed by code, force JSON:

PromptExtract the client, budget range, and deadline from the message below.

Return ONLY a JSON object matching this schema:
{
  "client_name": string,
  "budget_usd": { "min": number|null, "max": number|null },
  "deadline_iso": string|null,   // ISO 8601 date, or null if unspecified
  "confidence": "high" | "medium" | "low"
}

If a field is unclear, use null. Do not invent values.

Message:
<email>
{email_body}
</email>

Both OpenAI and Anthropic support "structured outputs" natively — you can pass a JSON schema and the model is guaranteed to return valid JSON. Use it whenever a downstream script consumes the result.

Anti-patterns to unlearn

  • "Be creative" — meaningless. Give constraints instead: "3 headlines, each under 8 words, no puns."
  • "Please make it better" — better how? Specify: "shorter, more concrete, remove passive voice."
  • Dumping 20 tasks at once — split into steps. The model will half-do all of them.
  • Trusting one shot — for anything important, sample twice, compare, or use evaluator-optimizer (Module 4).
Exercise · 10 min

Turn a real task from your business into a great prompt

Pick something you do weekly. A few examples by industry:

  • Agencies / consultancies — kickoff notes → SOW draft
  • Real estate — property notes → listing description
  • Retail / e-commerce — customer review → response draft
  • Local services — inbound inquiry → qualified-lead summary
  • Professional services — client email → billable-time entry
  1. Write the prompt using the four-part anatomy (Role · Context · Task · Format).
  2. Add one few-shot example.
  3. Add one constraint ("If the budget isn't stated, say 'unspecified' — don't guess.")
  4. Test on 3 real inputs. Fix the prompt where it fails.

Save the winner. That's your first reusable prompt asset.

Meta-tip

When a prompt isn't working, ask the model itself: "Given this prompt and this bad output, what's ambiguous?" It's remarkably good at critiquing its own instructions.

Or pass the quiz above.