breakfixlearn.com

AI-01AI & Prompt Engineering

Prompt anatomy (role, task, context, format)

Use this when: you want an AI assistant to give a useful, checkable answer on the first try.

AI-01 Prompt anatomy (role, task, context, format) cheat sheet. Every table on it is repeated as text below.
Tap the sheet for the full-size image. The text version below is screen-reader friendly.

Text version

Everything on the sheet, as plain HTML: handy for screen readers, copy-paste and search.

The 6 parts of a strong prompt

Use the parts you need; the order is flexible. Example prompt for a help desk:

PartExampleWhy it helps
RoleYou are a senior network engineer coaching a new help-desk tech.Sets expertise, tone and audience
TaskFind the likely reason this PC has no internet and give the next 3 checks.One clear goal with an action verb
ContextWi-Fi shows "connected". Output below: <ipconfig> IPv4 169.254.18.7 ... </ipconfig>Facts it can't guess; wrap pasted data in tags
LimitsPlain English. Read-only commands only. If unsure, say so.Limits scope, length, tone and what to avoid
Format1) likely cause, 2) three numbered checks with the command, 3) what each result means.List, table, JSON or steps: easy to check
Exampleping 192.0.2.1: a reply means the gateway is reachable.An example shows the pattern better than rules

Check before you send: one clear task, facts it can't guess, an output format, and no secrets pasted.

Before and after

VersionPrompt
Vague"Why is my Wi-Fi broken?"
Specific"Windows 11 laptop, Wi-Fi connected but no websites load since this morning's update. Other devices work. Give 3 checks, easiest first, with the command for each."

Power techniques

TechniqueHow
Few-shotGive 2 to 3 varied input and output examples
Think first"Reason step by step, then answer"
TagsSplit instructions from data: <logs>...</logs>
ChainBig job: small prompts, one step each
Ask me"Ask up to 3 questions before you start"
Success testSay what a good answer must include

Iterate like an engineer

Draft, test, review, refine.

  • Too generic? Add context: device, OS, error text
  • Wrong shape? Spell out the format or add an example
  • Too long? Set a limit: "under 120 words"
  • Made-up facts? Ask for sources and allow "I don't know"

Skeleton: Role: You are a ... Task: ... Context: <data> ... </data> Limits: ... Format: ...

Use AI safely

Aligned with the OWASP LLM Top 10 (2025).

Danger. Never paste passwords, API keys, customer data or real configs into a public AI tool. Mask them: <password>, 192.0.2.x.

Caution. AI can invent commands and flags. Check them in vendor docs and test in a lab before production.

Caution. Pasted emails, web pages or logs may hide instructions (prompt injection). Tag them as data and ignore orders inside.

Remember

  • Specific in, specific out: vague prompts get vague answers
  • Long pasted data first, your question last
  • Say what to do, not only what to avoid
  • New task? Start a fresh chat for clean context

Sources

Go deeper on the blog