TubeAcademy
Home/Technology/Prompting AI/Structured Prompting
Module 02

Structured Prompting

Intermediate 1 hr practice Reliable, repeatable results

Move beyond 'just asking' to structured prompts that produce consistent, high-quality results every time. XML tags, chain-of-thought reasoning, and multi-step prompts turn AI from a toy into a tool.

More resources
Pro tips
ยท

Use XML tags to separate sections of your prompt: <context>, <task>, <format>, <examples>. This helps the AI parse complex instructions.

ยท

Chain-of-thought: ask the AI to 'think step by step' before giving its final answer. This dramatically improves accuracy on complex problems.

ยท

For repeatable tasks (weekly reports, email templates), save your best prompt as a template. Swap in the variable details each time.

ยท

If the AI gets something wrong, don't rewrite the whole prompt. Add a specific instruction addressing the error: 'Do NOT include X' or 'Make sure to Y'.

Step by step
01

TEMPLATE STRUCTURE: Role โ†’ Context โ†’ Task โ†’ Format โ†’ Constraints โ†’ Examples

02

Wrap distinct sections in XML tags for clarity

03

Use <thinking> tags to request step-by-step reasoning before the final output

04

For complex tasks, break them into numbered sub-tasks

05

Provide POSITIVE examples (what to do) AND NEGATIVE examples (what to avoid)

06

Test your prompt with different inputs to check it generalises well

07

Build a personal prompt library โ€” save templates for recurring tasks

08

Use system prompts (in the API) to set persistent behaviour across a conversation