0Pricing
Prompt Engineering & LLM Optimization for Developers · Lesson

Delimiters and Structured Prompts

Learn how to use delimiters and clear sections to separate instructions from data, reduce prompt injection risk, and make outputs more reliable.

Why Structure Helps

When instructions and user data blur together, the model can misread which part is the command. Delimiters draw clear boundaries so the model knows what is an instruction and what is content to process.

What Is a Delimiter?

A delimiter is any consistent marker that wraps a block of text: triple quotes, XML-style tags, or fenced sections. The model treats the wrapped text as a unit.

Summarize the text between the tags.
<text>
The quarterly report shows growth...
</text>

All lessons in this course

  1. Role-Playing & Persona Prompts
  2. Instruction Following & Constraints
  3. Iterative Prompt Refinement
  4. Delimiters and Structured Prompts
← Back to Prompt Engineering & LLM Optimization for Developers