How to Use Delimiters to Separate Instructions in Copilot Prompts
🔍 WiseChecker

How to Use Delimiters to Separate Instructions in Copilot Prompts

When you ask Copilot to write a long document or analyze a complex dataset, the AI can confuse your main request with the example data you provide. Delimiters are special characters that tell Copilot exactly where your instruction ends and where your sample text or code begins. Without delimiters, Copilot may treat part of your example as a new command or ignore the structure you intended. This article explains how to use brackets, quotes, and other delimiters to keep your prompts organized and get accurate results every time.

Key Takeaways: Delimiter Techniques for Copilot Prompts

  • Triple quotes (“””): Enclose long passages of sample text or data so Copilot does not interpret them as commands.
  • Square brackets [ ]: Mark optional parameters or variables that Copilot should replace with real values.
  • XML-like tags : Define separate sections for the main task, the context, and the output format in one prompt.

What Delimiters Do in Copilot Prompts

A delimiter is a character or a sequence of characters that marks the boundary between different parts of a prompt. In Copilot, delimiters serve three main purposes: they separate the instruction from the input data, they group related items together, and they prevent the AI from misreading example text as a new instruction. When you use delimiters correctly, Copilot can parse your request more reliably, especially in complex prompts that contain code, structured data, or multiple steps.

The most common delimiters are triple quotation marks, square brackets, and XML-style tags. Each has a specific use case. Triple quotes work best for isolating large blocks of text or data. Square brackets are ideal for marking placeholders that Copilot should fill in. XML tags let you define named sections such as , , and . You can also use backticks for inline code or file paths. The key is consistency: always open and close the same delimiter around the same type of content.

There are no special prerequisites for using delimiters. Any version of Copilot in Microsoft 365, including Copilot Pro and Copilot for Microsoft 365, supports plain text delimiters. You do not need to enable any setting. Delimiters work in the Copilot pane in Word, Excel, PowerPoint, Outlook, and Teams, as well as in the standalone Copilot chat interface.

Steps to Write Delimited Prompts in Copilot

Follow these steps to structure a prompt with delimiters. The example uses triple quotes to separate a writing instruction from the sample text that Copilot should rewrite.

  1. Write the core instruction first
    Start with a clear sentence that tells Copilot what to do. For example: “Rewrite the following paragraph in a professional tone.” Do not include any example text in this sentence.
  2. Open a delimiter block
    Type three double quotation marks on a new line. This signals the start of the content that Copilot should treat as data, not as a command.
  3. Paste your sample text inside the block
    Place the paragraph or data you want Copilot to process. Make sure it is between the opening and closing triple quotes. If the sample contains its own quotation marks, they will be treated as part of the text.
  4. Close the delimiter block
    Type another set of three double quotation marks on a new line after the sample text. The complete prompt looks like this:

    “””
    Our team is looking for a way to improve the onboarding process. We have a lot of manual steps that take too long.
    “””

  5. Add any additional instructions after the block
    If you want to specify an output format or length, add that after the closing delimiter. For example: “Keep the rewritten version under 100 words.”

For prompts that include multiple sections, use XML-style tags. Write before the main instruction, before background information, and before the desired format. Close each tag with the corresponding end tag, such as . This method works well when you need Copilot to follow a multi-step process.

When you use placeholders, enclose them in square brackets. For example: “Write an email to [customer name] about the upcoming [event name].” Copilot will recognize the brackets as markers and replace them with the actual values you provide later or with inferred data from your Microsoft 365 context.

Common Mistakes When Using Delimiters

Copilot ignores the delimiter and treats the sample text as a command

This happens most often when you use a single delimiter instead of a pair. For example, typing one double quote instead of three. Copilot sees the single quote as a grammatical quotation mark and does not create a boundary. Always use the same opening and closing sequence. For long blocks, triple quotes are the safest choice. A single backtick works for inline code but fails for multi-line content.

Copilot returns the delimiter characters in the output

If Copilot includes the triple quotes or XML tags in its answer, it means the delimiter was not recognized as a structural marker. This can occur when the delimiter appears inside a code block that Copilot interprets as part of the output. To fix this, move the delimiter outside any code fences. In the Copilot pane, avoid nesting delimiters of the same type. Use a different delimiter for the inner content, such as backticks inside a triple-quoted block.

Copilot mixes up the order of sections when using XML tags

This issue arises when you forget to close a tag or when the tag names are too similar. For example, using and in the same prompt. Copilot may treat them as separate tags and reorder the content. Use distinct, descriptive names such as , , and . Always close every tag in the correct order. Verify that the number of opening tags matches the number of closing tags before you send the prompt.

Delimiter Type Best Use Case Common Pitfall
Triple quotes “”” Long sample text, paragraphs, or code blocks Using single quotes or double quotes instead of triple
Square brackets [ ] Placeholders for variables or names Leaving brackets empty or unmatched
XML tags Multi-section prompts with distinct roles Mismatched opening and closing tag names
Backticks ` ` Inline code, file paths, or short commands Using backticks for content that spans multiple lines

If Copilot still misinterprets your prompt after applying delimiters, simplify the request. Remove any redundant text and ensure the instruction is the first line of the prompt. Delimiters work best when the instruction itself is short and unambiguous. You can also test the same prompt without delimiters to see if the problem is with the delimiter syntax or with the wording of the task.

Now you can write Copilot prompts that keep your instructions separate from your data. Start by using triple quotes for any block of text you want Copilot to process. Try adding XML tags when your prompt has more than three sections. For placeholders, always use square brackets and verify that each one has a matching close bracket. With consistent delimiter use, you will get more predictable and accurate responses from Copilot.