Context EngineeringLesson 36 of 87

Module 4 · Position, order and what the model actually reads

Marking where one thing ends

In this lesson

  • 8 min read
  • 7 reading sections
  • Knowledge check
  • Lesson 6 of 9 in this chapter

This chapter’s goalPredict and measure how position changes whether material in the window gets used: run a position probe on your own model and corpus, place instructions, examples and evidence deliberately, mark boundaries the model cannot confuse, and choose an evidence order that matches the task rather than the retriever’s ranking.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available
Two ways to mark where a passage endsMarkdown headings and rulesRetrieved documents contain markdown of theirownA passage carrying its own heading isindistinguishable from your structureThe end of a region is inferred from the startof the next oneThere is nothing to escape, because nothing ispairedPaired tags built from a per-request nonceOpen and close are explicit, so a region has astated endModels are trained heavily on markup and readit as structureAttributes carry the id, title and date acitation needsA nonce nobody could have written into astored document cannot close your blockJSON is the other defensible choice, because escaping is defined, at the cost of long prose livinginside a quoted string. Whichever you pick, apply it identically to every block of every request: themodel learns the pattern from within the request, and an inconsistent pattern is worse than a plainone.
JSON is the other defensible choice, because escaping is defined, at the cost of long prose living inside a quoted string. Whichever you pick, apply it identically to every block of every request: the model learns the pattern from within the request, and an inconsistent pattern is worse than a plain one.

Figure

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 8Free · no account needed
Lesson steps

The model has to be able to tell your text from theirs

Everything in the window arrives as one flat token sequence. The boundaries between your instructions, a retrieved passage, a user’s message and a tool’s output exist only because you drew them. Draw them badly and three things go wrong: the model attributes a claim to the wrong source, it follows an instruction that was inside a document, and your citation handles stop lining up with anything.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Data, SQL and Getting to the Answer exam.

Stuck on something?Ask Sayali, your AI tutor

How to cite: Addaly (2026) ‘Marking where one thing ends’, in Context Engineering. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/context-engineering/delimiters-and-boundaries (Accessed: 29 November 2026).