Check my levelCoursesProgramsFor teamsPricing
UKSign inSign up
Check my levelCoursesProgramsFor teamsPricingClaude quizPromptsBlogFAQSearchSign upUK
AcademlCoursesAdvanced Prompt EngineeringStructuring prompts: XML, markdown, roles
A tree of thoughts: weak branches are cut, one leads to the answerThe agent loop: reason, act, observeOne MCP connector linking files, Git and memory
Course

Advanced Prompt Engineering

Module 1 · Foundations of Systematic Prompting
01LLM as a text completion engine02Structuring prompts: XML, markdown, roles03Zero-shot vs few-shot: when and how
Module 2 · Reasoning Techniques
04Chain-of-thought and self-consistency05Tree-of-Thoughts06ReAct: reasoning + acting
Module 3 · Instruction Design Patterns
07Roles, personas, and system-prompt hardening08Output constraints: format, length, negative09Meta-prompts and self-improving
Module 4 · Reliability & Evaluation
10Self-consistency in production11Adversarial: injections, jailbreak, red-teaming12Prompt evaluation: LLM-as-judge and test harnesses
Module 5 · Optimization & Scale
13Automated optimization: DSPy14Prompts in production: versions, A/B, cost, drift
Advanced Prompt Engineering · Lesson 2

Structuring prompts: XML, markdown, roles

XML tags and Markdown as delimiters for Claude, GPT and Gemini, system/developer/user/assistant roles, replacing prefill with structured outputs, and defending against delimiter injection.

25 min readUpdated Nov 9, 20264 questions in quizReady prompt included

Why structure

An LLM follows a prompt better when block boundaries (instruction, data, examples, format) are explicitly marked. Without markup the model mixes up data and instructions, and prompt injection feeds on exactly that confusion.

The rest of this lesson opens after a free sign-up

Sign up with email or Google: the first two lessons of every course stay open for good, and the whole catalog is open for 7 days. No card needed.

Sign up freeOr a trial lesson, no sign-up →
In this lesson
Why structureXML tags in ClaudeMarkdown and XML in GPT and GeminiRoles: system, developer, user, assistantDelimiter injection and defensePracticeReady promptQuiz
CoursesLLM coursesFor teamsPricingFAQBlogAboutPrivacy
© 2026 AcademlDevelopment & promotion —MMIX — Marketing Mix
Get started free