LLaManchaAI Enablement
Checking access…
← All modules
Module 2Audience: all

Prompting with context and constraints

Teaches the reusable Goal / Context / Constraints / Output / Validation prompt pattern.

Outcomes

What you will be able to do

  • Write prompts with enough context for useful output.
  • Apply role assignment, few-shot, and structured-output techniques.
  • Recognize and fix common prompt anti-patterns.
  • Account for model differences, context limits, and cost.
Completion check

How this module is approved

Submit a low-risk work prompt and AI output using Goal / Context / Constraints / Output / Validation, naming one technique used.

Pass criteria

  • Goal present
  • Context present
  • Constraints present
  • Output format present
  • Validation step present
  • One named technique used
  • AI output included
  • Human verification/edit note included
Loading personalization context…
Lesson40–55 minutes self-guided, or 75 minutes with practice examples

What you should take away

By the end of this module, participants should be able to write a practical workplace prompt that gives AI enough direction to produce a useful, reviewable output without exposing sensitive information.

Part 1

Prompting is workflow design in miniature

A prompt is not magic phrasing. It is a tiny work order. The better you define the goal, context, boundaries, output format, and review standard, the more likely the AI can produce something useful. Weak prompts force the model to guess. Strong prompts reduce guessing and make review easier.

  • Weak prompt: 'Write this better.'
  • Stronger prompt: 'Rewrite these sanitized release notes for a nontechnical operations manager. Keep it under 200 words, preserve the risks, and list follow-up actions as bullets.'
  • The difference is not style. The stronger prompt explains the job, audience, constraints, and expected output.

Quick check · <30 sec

Why does 'Write this better' usually produce weak output?

Show answer
It forces the model to guess the goal, audience, constraints, and output format. A prompt is a work order; an underspecified order gets an underspecified result.

Part 2

The reusable pattern: Goal / Context / Constraints / Output / Validation

For most workplace tasks, use a repeatable five-part structure. It keeps prompts clear, makes results easier to compare, and gives teams a shared language for improving AI-assisted work.

  • Goal: what you want the AI to help accomplish.
  • Context: sanitized background the AI needs to understand the task, audience, and situation.
  • Constraints: rules, boundaries, length, tone, approved sources, data limits, or things the AI must avoid.
  • Output: the format you want back: bullets, table, checklist, email draft, test plan, decision memo, user story, or summary.
  • Validation: ask the AI to list assumptions, uncertainty, missing information, risks, or checks a human should perform before using the output.
Activity · ~5 minrewrite prompt

You are a sales coordinator. Your manager says: 'write something for the customer about the delay.' You open an approved AI tool.

  • Weak prompt: "Write something for the customer about the delay."
  • Sanitized facts: Mid-range order; shipping slips 5–7 business days; customer asked for urgency last reply; no compensation approved

Your task

Rewrite the weak prompt using all five parts (Goal/Context/Constraints/Output/Validation). Keep it sanitized — no real names or numbers beyond the ranges given.

Show a hint
Constraints should forbid inventing a compensation offer or a firm new date; Validation should ask what to confirm before sending.
Compare with a strong answer
Goal: draft a brief, warm customer email acknowledging a 5–7 business-day shipping delay. Context: a mid-range order; the customer expressed urgency in their last reply; no compensation has been approved. Constraints: under 120 words, apologetic but not over-promising, do NOT invent a firm delivery date or offer compensation, sanitized. Output: subject line + 3 short paragraphs. Validation: list what I should confirm (revised ship window, whether a goodwill gesture is allowed) before sending.

Why this matters: Rewriting a real weak prompt is the fastest way to internalize the pattern — it shows the five parts doing visible work.

Quick check · <30 sec

Which part of the pattern most directly makes the output easier to review?

  • A. Goal
  • B. Context
  • C. Output format
  • D. Validation
Show answer
Validation makes the model surface assumptions and a check-list, so you review against a known standard instead of re-deriving one.

Part 3

Context without oversharing

Useful prompting requires context, but workplace prompting also requires discipline. The goal is to give the model enough sanitized information to help while keeping protected or proprietary information out of unapproved tools.

  • Replace names with roles: 'customer,' 'vendor,' 'project lead,' or 'internal stakeholder.'
  • Replace exact numbers with ranges when precision is not required.
  • Summarize the issue instead of pasting confidential documents, tickets, records, credentials, or source code.
  • Use approved internal tools for sensitive data only if the company has explicitly cleared that use.
  • When unsure, ask for a template, checklist, or generic example instead of pasting real data.

Quick check · <30 sec

You need help with a confidential incident. What goes in the prompt?

Show answer
A sanitized summary by category (roles instead of names, ranges instead of exact figures), or a request for a generic template — never the confidential document itself in an unapproved tool.

Part 4

Named techniques: role, few-shot, structure, self-critique

The five-part pattern is the backbone. Four named techniques sharpen it, and all are documented, standard practice. Use them additively, not all at once.

  • Role assignment: 'You are a senior compliance reviewer checking this draft for unsupported claims.' Sets stance and raises the bar of the response.
  • Few-shot: give one or two short input→output examples so the model matches a pattern instead of guessing it.
  • Structured output: ask for a named format — a markdown table, a JSON object with specified keys, a checklist — so the result is reviewable and reusable.
  • Self-critique: 'List the three weakest points of your draft, then revise.' Turns one call into a draft-and-review.
Activity · ~6 minrewrite prompt

Take a plain prompt and add exactly two of the four named techniques to fit a real task.

  • Plain prompt: "Summarize these sanitized support themes for leadership."
  • Goal: A scannable, skeptical summary leadership can act on

Your task

Add role assignment and structured output to the plain prompt. Show the rewritten prompt.

Show a hint
A role like 'skeptical operations lead' plus a fixed table schema (Theme | Evidence strength | Suggested action) does most of the work.
Compare with a strong answer
"You are a skeptical operations lead. From these sanitized support themes, produce a markdown table with columns Theme | Evidence strength (low/med/high) | Suggested next step. Mark any theme with thin evidence as 'low' and do not invent volume figures." — role sets stance, structure makes it reviewable, and the constraint blocks fabrication.

Why this matters: Naming the techniques lets people reach for the right one deliberately instead of rephrasing randomly until something works.

Quick check · <30 sec

Which technique most improves reusability of the output across a team?

  • A. Role assignment
  • B. Few-shot
  • C. Structured output
  • D. Self-critique
Show answer
A named, consistent structure (table/JSON/checklist) makes outputs comparable and reusable; the others mainly improve a single response.

Part 5

Anti-patterns: what bad prompts actually look like

Knowing the strong pattern is half the skill; recognizing the weak ones is the other half. These are the recurring failures — each maps to a missing part of the pattern.

  • The mind-reader: 'Make this good.' Missing Goal/Output — fix by stating the job and the format.
  • The data dump: pasting a whole document with no instruction. Missing Goal/Constraints — and a sanitization risk.
  • The over-stuffed mega-prompt: ten tasks in one. Split it; one prompt, one job.
  • The leading question: 'Confirm that X is the best option.' Biases the model — ask for the trade-offs instead.
  • The blind-trust close: accepting answer one. Missing Validation/iteration — treat output as a draft.

Quick check · <30 sec

'Confirm that vendor A is clearly the best choice' is which anti-pattern?

  • A. Data dump
  • B. Leading question
  • C. Mega-prompt
  • D. Mind-reader
Show answer
It pre-loads the conclusion. Ask for a sanitized trade-off comparison and let the analysis stand on its own.

Part 6

Operating reality: models, context limits, custom instructions, cost

Prompts do not run in a vacuum. Four practical realities change how you prompt: models differ, context windows are finite, persistent settings save re-typing, and tokens cost money and time. None of this requires technical depth — just awareness.

  • Model differences: assistants vary in tone, structure, and refusal behavior; for high-stakes facts, cross-check rather than trusting one. Verify documented behavior for your approved tool rather than assuming.
  • Context windows & chunking: very long inputs degrade or get truncated. Chunk the work, summarize in stages, and start a fresh conversation when a thread gets long and confused.
  • Custom instructions / projects / spaces: store your persona (Module 5) once as a custom instruction or project so you stop re-typing your role and boundaries every prompt.
  • Cost & multimodal: longer prompts and bigger models cost more — use the smallest tool that does the job; and remember approved tools can often take a screenshot or image as input, which is sometimes faster than describing it.

Quick check · <30 sec

A long chat has become confused and contradictory. The best move is to…

  • A. Keep pushing in the same thread
  • B. Summarize what's settled, then start a fresh conversation from that summary
  • C. Switch models mid-thread
  • D. Paste the whole history again
Show answer
Context limits cause drift. Capture the settled points and restart clean — re-pasting history just refills the same degraded window.

Part 7

Iterate like a reviewer, not a passenger

A good prompt rarely means accepting the first answer. Treat the first output as a draft. Review it, challenge it, ask for revisions, and compare it against your own judgment. The quality step is part of the workflow, not an optional extra.

  • Ask the AI to tighten, simplify, reframe for another audience, or produce alternatives.
  • Challenge vague claims: 'What evidence would support this?' or 'What might be wrong?'
  • Use follow-up prompts to improve structure, not to outsource final accountability.
  • Stop if the output touches a boundary you are not authorized to cross.

Quick check · <30 sec

True or false: a good prompter usually accepts the first answer if it reads well.

  • A. True
  • B. False
Show answer
False. Reading well is not the same as being right. The first output is a draft to review and challenge.

End-of-module quick check

Five short retrieval questions. Answer from memory first, then reveal each explanation.

  1. 1. The five-part pattern is…

    • A. Goal / Context / Constraints / Output / Validation
    • B. Who / What / When / Where / Why
    • C. Draft / Review / Edit / Send / File
    • D. Ask / Answer / Accept
    Show answer
    Goal, Context, Constraints, Output, Validation — the reusable workplace prompt backbone.
  2. 2. Which named technique most improves cross-team reusability of output?

    • A. Role assignment
    • B. Few-shot
    • C. Structured output
    • D. Self-critique
    Show answer
    A consistent named structure makes outputs comparable and reusable.
  3. 3. 'Confirm that option A is best' is which anti-pattern?

    • A. Data dump
    • B. Leading question
    • C. Mind-reader
    • D. Mega-prompt
    Show answer
    It pre-loads the conclusion; ask for trade-offs instead.
  4. 4. True or false: re-pasting a long, confused chat history fixes context drift.

    • A. True
    • B. False
    Show answer
    False. Summarize the settled points and start a fresh conversation; re-pasting refills the same degraded window.
  5. 5. Name the prompt part that most directly makes output easier to review.

    Show answer
    Validation — it makes the model surface assumptions and a checklist so you review against a known standard.

Further reading

Worked examples by role

Operations manager

Pattern in use: weekly status

Goal: draft a weekly status. Context: internal upgrade, testing done, two medium-risk defects, needs validation scheduling help. Constraints: <180 words, calm tone, no invented dates/owners, sanitized. Output: subject + progress/risks/next-steps bullets. Validation: list assumptions and what to confirm. Iterated once to tighten the risk bullet.

Sales coordinator

Pattern in use: delay email

Role assignment + the five parts: 'You are a calm account contact.' Goal: acknowledge a 5–7 day delay. Constraints: no firm new date, no compensation offer, <120 words. Output: subject + 3 short paragraphs. Validation: confirm revised window and whether a goodwill gesture is allowed before sending.

Training manager

Pattern in use: comprehension questions

Few-shot + structured output: gave two example objective→question pairs, then asked for a table (Objective | Question | Bloom level | Bias risk). Constraint: flag any item that may carry cultural or role bias. Self-critique step: 'name the two weakest items and revise.'

Before / after

Drafting

Before: "Write a status update."

After: "Draft a <150-word status for a nontechnical sponsor from these sanitized bullets: …. Bullets for progress/risks/next steps. Don't invent dates or owners."

What changed: Adds audience, length, source, output shape, and a fabrication constraint.

Summarizing

Before: "Summarize this."

After: "Summarize the sanitized text below in 5 bullets for an exec; flag anything the source does not actually state."

What changed: Adds length, audience, and an anti-hallucination check.

Comparing

Before: "Which option is better?"

After: "Compare these two sanitized options in a table: criteria = cost band, effort, risk, reversibility. Give a recommendation and the strongest argument against it."

What changed: Replaces a leading question with structured, balanced analysis.

Classifying

Before: "Is this urgent?"

After: "Classify each sanitized item as low/medium/high urgency using this rule: …. Return a table item|level|reason."

What changed: Supplies the rubric and a reviewable format instead of a vibe.

Extracting

Before: "Pull out the key points."

After: "From the sanitized notes, extract action items as: owner-role | action | due-window. Mark unknowns explicitly as 'unspecified'."

What changed: Defines the schema and how to represent missing data.

Transforming

Before: "Make this less technical."

After: "Rewrite the sanitized paragraph for a non-technical operations reader at ~8th-grade level; keep every caveat."

What changed: Adds audience, reading level, and a fidelity constraint.

Brainstorming

Before: "Give me ideas."

After: "List 7 sanitized options to reduce status-report rework; for each, one line on effort and one risk. No customer data."

What changed: Bounds quantity, structure, and scope.

Explaining

Before: "Explain this error."

After: "Explain this sanitized error message to a junior teammate in 4 sentences; list 2 likely causes and how to confirm each."

What changed: Adds audience, length, and a verification path.

Planning

Before: "Plan the rollout."

After: "Draft a 3-phase sanitized rollout outline; per phase: goal, exit criterion, one risk. Flag where human approval is required."

What changed: Adds structure, exit criteria, and an approval gate.

Completion artifact

Submit one low-risk work prompt and the AI output it produced. The prompt must use Goal / Context / Constraints / Output / Validation, and name at least one technique used (role, few-shot, structure, or self-critique). Include a short note on what you would verify or edit before using the output.

ExercisePilot-ready artifact

Write one low-risk workplace prompt using the Goal / Context / Constraints / Output / Validation pattern. Run it in an approved tool or use a mock output, then document what you would verify before using it.

Participant template

  • Goal:
  • Context, sanitized:
  • Constraints:
  • Output format:
  • Validation request:
  • Technique used (role / few-shot / structure / self-critique):
  • AI output or summary:
  • Human verification/edit note:

Example submission

Goal: draft a weekly project update. Context: internal software upgrade completed testing and found two medium-risk defects. Constraints: under 180 words, calm tone, no invented dates or owners. Output: subject line plus progress, risks, next steps. Technique: structured output (3 named bullets). Validation: list assumptions and details to verify. Human note: I would verify defect severity, owner names, and user-validation timing before sending.

Role-flavored variants

Same exercise, framed for different roles. Use the one closest to your work.

Software developer

Write the prompt for a sanitized technical drafting task (e.g., a runbook outline). Use structured output; the validation request must ask the model to flag anything it could not derive from the provided context.

See a sample submission
Developer prompt submission: Goal: outline a deploy runbook from sanitized notes. Context: described steps only, no repo/secrets. Constraints: no invented commands, mark unknowns. Output: numbered steps with a rollback section. Technique: structured output + self-critique ('list the riskiest step'). Verify: confirm commands and rollback against the real system before use.

Front office coordinator

Write the prompt for a sanitized communication task. Use role assignment; constraints must forbid committing to times or sharing contact details.

See a sample submission
Front office prompt submission: Goal: draft a neutral reschedule confirmation. Context: sanitized — internal meeting, new window is a range. Constraints: no firm time commitment, no contact details, <80 words. Output: subject + 2 sentences. Technique: role ('calm scheduling coordinator'). Verify: confirm the actual window with the lead before sending.

Learner checklist

Use this as a final check before submitting. Program leads use a separate review guide when they approve or coach submissions.

  • Goal present
  • Context present
  • Constraints present
  • Output format present
  • Validation step present
  • One named technique used
  • AI output included
  • Human verification/edit note included
Loading your module status…

Previous module

AI-assisted work fundamentals

Review the prior step in the path.

Next module

Safe and responsible AI use at work

Keep momentum with the next completion check.