Why I Use Delimiters in AI Prompts (and Why You Probably Should Too)
One of the first things I learned in AI prompt engineering?
Structure matters. A lot. Thank you Jeff J Hunter
Especially when working with large language models like ChatGPT, Claude, or Gemini.
The more clearly you organize your instructions, the better your results. And one of the easiest ways to do that is with delimiters.
Think of delimiters as visual dividers that help the AI separate different parts of your prompt.
Just like headers and bullet points help humans navigate a document, delimiters help language models make sense of complex inputs.
What Are Delimiters in AI Prompting?
Delimiters are symbols, phrases, or formatting techniques that act like visual road signs for AI. They tell the model, "This part of the text is separate, different, or should be treated in a specific way."
They're especially useful when:
Mixing instructions and content
Including examples
Adding long-form text or pasted research
Sharing code or structured data
Used well, they dramatically improve the quality, clarity, and relevance of AI-generated outputs.
Why Prompt Structure Matters in Generative AI
LLMs don't "understand" in a human way. They predict the next word based on the patterns they see in your prompt.
That means your formatting, word choice, and structure matter.
Using delimiters helps:
Prevent confusion between instructions and content
Reduce hallucinations or mixed outputs
Improve formatting, especially with code
Train your custom GPTs more effectively
Create reusable prompt templates for consistent outputs
Which Delimiter Should You Use? A Quick Guide
Here's a breakdown of common delimiters I use, what they signal to the model, and when to use them:
--- (Triple Hyphen) This is the delimiter I use the most. It breaks up big content blocks, like switching from instructions to examples or segmenting different sections of a multi-step prompt. I'll often label them too, like:
--- Instructions ---
--- Context ---
This helps the model navigate longer prompts with ease.
""" (Triple Quotes) Triple quotes are the 'handle with care' label. They tell the AI, "This section is precious. Don't touch it, just take it in as-is." It's especially useful when the original text needs to stay clean while giving separate instructions. Think: summarizing something, rewriting it in a new tone, or ensuring the model knows what's content versus what's a command.
" " (Quotes) Simpler than triple quotes, but still helpful. Great for short snippets or phrases that the model needs to keep intact. Think of product names, slogans, or single sentences that must stay unchanged.
### (Triple Hash) Ideal for breaking down instructions into logical steps. This delimiter shines in chain-of-thought prompts where the AI has to work through a sequence.
``` (Triple Backticks) This one's all about code. Wrapping text in triple backticks tells the AI, “Hey, treat everything in here like code." It preserves indentation, syntax, and formatting, essential for anything technical.
<XML></XML> (XML tags): These are great when you want to label different sections of your prompt clearly. I use them when I need the AI to treat two blocks separately—like comparing two drafts, summarizing multiple points, or labeling input versus instructions.
Text Labels (Plain Language) This is what I use when I’m moving fast and keeping it simple. It might look like this: Request: Summarize this. Example: Here’s how it’s been done before. Source: Pasted content below. It’s not as bulletproof as the others, but it works well for casual prompts or exploratory sessions.
Practical Scenarios Where Delimiters Help
Here’s when I typically use them:
Pasting content from different sources
Sharing examples for tone of voice or formatting
Combining text, code, and data in a single instruction
Structuring a “task + context + source” layout
Separating instructions from long-form content
Training a custom GPT or assistant to learn your workflow
Final Thoughts: Get Strategic With Structure
Whether you're structuring inputs for content creation, training internal AI tools, or just trying to get fewer hallucinated answers. Delimiters help.
AI is smart. But it's not magic. You still need to guide it clearly.
Structured prompts deliver better results. And delimiters are one of the simplest ways to get there.
Want to see how this works in real training scenarios? Or need help creating a GPT that understands your brand, workflows, and voice?
Let’s connect.
Or drop your favorite delimiter style in the comments. Always down to nerd out with fellow AI enthusiasts.