liveBook · Manning

Delimiter

As explained in Prompt Engineering in Practice

A marker that separates or bounds distinct regions of content in a prompt.

A delimiter is a boundary marker around embedded content in a prompt. It helps distinguish text to analyze from instructions to follow, especially when a template receives variable input at runtime. section 2.7

Choose and place delimiters deliberately:

  • Use triple-backtick fences for ordinary contextual content; XML-style tags are another option. section 2.7
  • Choose markers unlikely to occur in the content. If an input already contains triple backticks, use a different boundary. section 2.7.1
  • Keep the style consistent within a prompt and make the boundaries between instructions and inputs explicit. section 2.7.3

Incident-report template

# Instructions Summarize the incident report. Cover impact, root cause, mitigation, and next steps. Use a neutral, operational tone. # Incident Report ```text {{incident_report}} ``` # Output Format Impact; Root Cause; Mitigation; Next Steps. The fenced placeholder marks the changing report as content to summarize. The instructions and output format remain outside it. section 2.7.1 section 6.1.2

For several inputs, label and delimit each one separately. A production-bug prompt can fence an error log, a change summary, and relevant code before asking for a likely root cause. Separate blocks make the template easier to populate, maintain, and debug. section 4.3.1

Delimiters reduce instruction-mixing risk, but they do not secure a prompt on their own. For external text, pair them with explicit instructions that treat the enclosed content as data, plus basic input hygiene. Add delimiters when they help solve the task rather than forcing them into every prompt. section 2.7.3 section 2.8

How Prompt Engineering in Practice covers it

How deep it goes
Defines boundary markers, compares common notations, and gives placement guidance; cautions that delimiters alone do not prevent instruction mixing.
Examples
Demonstrates fenced incident reports and production-bug prompts with separately bounded logs, change summaries, and code.
What it assumes
Introduces delimiters alongside instructions, context, input parameters, and output formats without relying on model-internal knowledge.
What you can do after
Build it from scratch: choose suitable markers and place them around variable context in a reusable prompt template.
How it connects
Connects delimiters to instructions, context, input parameters, output formats, and the division between system and user prompts.

Also explained in

Compare how 11 books explain delimiter →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Prompt Engineering in Practice. The section links point to the parts of the book it draws on.