The Sidecar
When boxes are requested, where are they carried?
✅ NormativeSettled. The requirement holds as written.📚 Document ruleNeeds other pages of the same document; decided once and applied on every page.Read §3.4 in the RFC ↗
When boxes are requested, the output MUST include a sidecar: a structured file that lists, page by page, every element with its class, its Markdown and its box. The sidecar is the source the Markdown is rendered from; the Markdown MUST be exactly the concatenation of the sidecar's element Markdown in reading order, each element preceded by its inline box anchor, with pages joined as Markdown Rendering (§3.2) requires.
When it applies
The sidecar is secondary to the rest of this protocol: the rules that matter are how the document is interpreted and rendered, and what a box covers. This note fixes only what a sidecar must carry. Its encoding is the page-and-items structure LlamaParse already returns, normalised.
Reading the examples. Each one pairs a source page with the output the rule expects. ✅ Sample: the rule applies. ❌ Counter-sample: it looks like it applies and does not, or a rendering got it wrong. A non-conforming output, in red, is shown only for contrast. … marks content left out of an excerpt.
The point, in a small example
Compare the Markdown anchors with the separate sidecar: same page, same item order, identical element boxes and character ranges into each item’s own Markdown. These pages are made up to isolate the rule.
The same service page at line granularity
This interior page has a level-2 section heading, one two-line paragraph and a footer. Line boxes were requested. The Markdown and sidecar below are separate deliverables; the footer is not part of the paragraph. Coordinates use the original 720×420 image, not its on-screen display size.
Source page

Expected output
<!-- el p=1 x=48 y=54 w=179 h=22 -->
## Service note
<!-- el p=1 x=48 y=131 w=159 h=62 -->
Check valve A.
Record 12 psi.
<!-- el p=1 x=48 y=369 w=74 h=17 -->
Rev B | 7Expected output · Sidecar JSON
{
"pages": [
{
"page": 1,
"width": 720,
"height": 420,
"items": [
{
"type": "Section-header",
"md": "## Service note",
"bBox": {
"x": 48,
"y": 54,
"w": 179,
"h": 22
},
"layoutAwareBbox": [
{
"x": 48,
"y": 54,
"w": 179,
"h": 22,
"startIndex": 3,
"endIndex": 15
}
]
},
{
"type": "Text",
"md": "Check valve A.\nRecord 12 psi.",
"bBox": {
"x": 48,
"y": 131,
"w": 159,
"h": 62
},
"layoutAwareBbox": [
{
"x": 48,
"y": 131,
"w": 159,
"h": 17,
"startIndex": 0,
"endIndex": 14
},
{
"x": 48,
"y": 171,
"w": 153,
"h": 22,
"startIndex": 15,
"endIndex": 29
}
]
},
{
"type": "Page-footer",
"md": "Rev B | 7",
"bBox": {
"x": 48,
"y": 369,
"w": 74,
"h": 17
},
"layoutAwareBbox": [
{
"x": 48,
"y": 369,
"w": 74,
"h": 17,
"startIndex": 0,
"endIndex": 9
}
]
}
]
}
]
}The same service page at word granularity
This interior page has a level-2 section heading, one two-line paragraph and a footer. Word boxes were requested. The Markdown and sidecar below are separate deliverables; the footer is not part of the paragraph. Coordinates use the original 720×420 image, not its on-screen display size.
Source page

Expected output
<!-- el p=1 x=48 y=54 w=179 h=22 -->
## Service note
<!-- el p=1 x=48 y=131 w=159 h=62 -->
Check valve A.
Record 12 psi.
<!-- el p=1 x=48 y=369 w=74 h=17 -->
Rev B | 7Expected output · Sidecar JSON
{
"pages": [
{
"page": 1,
"width": 720,
"height": 420,
"items": [
{
"type": "Section-header",
"md": "## Service note",
"bBox": {
"x": 48,
"y": 54,
"w": 179,
"h": 22
},
"layoutAwareBbox": [
{
"x": 48.0,
"y": 54,
"w": 108.0,
"h": 22,
"startIndex": 3,
"endIndex": 10
},
{
"x": 164.0,
"y": 55,
"w": 63.0,
"h": 21,
"startIndex": 11,
"endIndex": 15
}
]
},
{
"type": "Text",
"md": "Check valve A.\nRecord 12 psi.",
"bBox": {
"x": 48,
"y": 131,
"w": 159,
"h": 62
},
"layoutAwareBbox": [
{
"x": 48.0,
"y": 131,
"w": 67.0,
"h": 17,
"startIndex": 0,
"endIndex": 5
},
{
"x": 122.0,
"y": 131,
"w": 55.0,
"h": 17,
"startIndex": 6,
"endIndex": 11
},
{
"x": 183.0,
"y": 131,
"w": 24.0,
"h": 17,
"startIndex": 12,
"endIndex": 14
},
{
"x": 48.0,
"y": 171,
"w": 76.0,
"h": 17,
"startIndex": 15,
"endIndex": 21
},
{
"x": 131.0,
"y": 171,
"w": 26.0,
"h": 17,
"startIndex": 22,
"endIndex": 24
},
{
"x": 164.0,
"y": 171,
"w": 37.0,
"h": 22,
"startIndex": 25,
"endIndex": 29
}
]
},
{
"type": "Page-footer",
"md": "Rev B | 7",
"bBox": {
"x": 48,
"y": 369,
"w": 74,
"h": 17
},
"layoutAwareBbox": [
{
"x": 48.0,
"y": 369,
"w": 32.0,
"h": 13,
"startIndex": 0,
"endIndex": 3
},
{
"x": 85.0,
"y": 369,
"w": 12.0,
"h": 13,
"startIndex": 4,
"endIndex": 5
},
{
"x": 102.0,
"y": 369,
"w": 5.0,
"h": 17,
"startIndex": 6,
"endIndex": 7
},
{
"x": 112.0,
"y": 369,
"w": 10.0,
"h": 13,
"startIndex": 8,
"endIndex": 9
}
]
}
]
}
]
}Contents
| Level | Carries |
|---|---|
| Document | its pages, in order |
| Page | 1-based page number; page width and height; printed page number when requested — see Printed Page Numbers (§6.6); line_numbers when requested — see Pleading Line Numbers (§5.8) |
| Element | class — see Elements (§3.1); its Markdown; its box; finer boxes at the requested granularity |
| Box | x, y, w, h in the page's coordinate space, origin top-left |
| Table element | additionally continuesFromPreviousPage and continuesOnNextPage, booleans — see Cross-Page Tables (§4.3) |
| Finer box | as a box, plus the character range of the element's Markdown it covers (startIndex, endIndex, end exclusive, counted in the element's Markdown including its syntax) |
{"page": 3, "width": 612, "height": 792, "printedPageNumber": "iv",
"items": [{"type": "Section-header", "md": "## 9.2 Pressure",
"bBox": {"x": 72, "y": 80, "w": 200, "h": 18},
"layoutAwareBbox": [{"x": 72, "y": 80, "w": 200, "h": 18, "startIndex": 3, "endIndex": 15}]}]}
- Every element of the Markdown MUST correspond to one sidecar item, and every item to one element.
- Character ranges MUST point into the element's own Markdown, so any span of the Markdown resolves to a box.
Boxes in the Markdown itself
When boxes are requested, the Markdown MUST also carry each element's box inline, so that a single Markdown file is traceable on its own: each element is preceded by an HTML comment anchor holding the same box as the sidecar.
<!-- el p=3 x=72 y=80 w=200 h=18 -->
## 9.2 Pressure
The anchors are invisible when rendered and are stripped when the Markdown is given to a model that does not need them. When boxes are not requested, the Markdown carries no anchors.
Neighbouring rules, and how they differ
More
Rule id output-the-sidecar · output output-model boxes sidecar