Prompt Engineering Context Documents

Package Long Documents for AI — Delimiters and § Labels

Pasting a document raw mixes material with instructions. Package it: explicit delimiters, citable [§N] section labels, and grounding rules — the source travels verbatim.

Overview

A long document pasted raw forces the model to guess where your words end and the document begins — and it guesses wrong in both directions. The packaged source ends the guessing: the material sits verbatim between explicit SOURCE START/END delimiters, sections carry [§N — title] labels so answers can cite them, and grounding instructions sit outside the delimiters where they belong. The packaging even neutralizes instruction-looking text inside the document. This setup loads a multi-section policy document in standard mode — six labeled sections, ready for support-team Q&A.

Workflow

  1. Wrap, don't just paste

    Delimiters bound the material; everything outside them is instructions about it.

  2. Label the sections

    [§N — title] lines make every part of the document addressable in answers.

  3. Ground the answers

    Answer-from-source-first rules, with outside knowledge labeled when it appears.

Why This Works

  • Structural separation ends the source-versus-instruction guessing
  • Citable sections turn vague answers into checkable ones
  • Verbatim carriage means packaging never distorts the document

Best for

  • Policies, handbooks, and reference documents
  • Documents queried more than once
  • Anyone whose pasted documents got treated as instructions

Not for

  • Documents that exceed the window — split first with the Long Prompt Splitter
  • Restructuring your instruction text — that's the Prompt Formatter

Use cases

  • Preparing a policy for repeated Q&A sessions
  • Making document sections citable by marker
  • Separating source text from instructions structurally

Tip: Save time by exploring related resources and tools that integrate with this workflow.

Explore all resources