Select the content types worth stripping from retrieved chunks before injection
Strip scraper chrome (nav, license boilerplate, captions a text model cannot use) but keep titles, code, and cross-references because the model needs them to ground the chunk.
Imagine clipping an article from a magazine for a friend. You cut out the article body, the headline, and any diagrams that matter. You do not also clip the magazine's table of contents, the legal disclaimer at the back, or the page-number footer. Those are part of the physical magazine, not part of the story. Retrieved chunks come with the same problem. The scraper grabs the article body plus a lot of magazine furniture: site navigation, copyright lines, image captions the model cannot see anyway. Strip that furniture before you hand the clipping to the model. But keep the headline and the section heading, those tell your friend what the article is actually about.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Every retrieved chunk arrives with extra text. The scraper that fetched the page or document grabbed body content and also grabbed whatever sat next to the body in the source HTML or PDF. Some of that extra text is signal; most of it is noise. Stripping is the assembly-stage decision about what goes into the context block and what gets dropped.
This card walks through the rule, applies it to the six listed options, and discusses where the boundary moves with the downstream model and the corpus shape.
The rule, strip chrome, keep content
Chrome is text that appears on a page because of the site template, not because it answers the user's question. Navigation breadcrumbs, site headers, footer license notices, cookie banners, and copyright lines are chrome. They show up on every chunk from the same site, they consume tokens, and they crowd out attention that should land on body text.
Content is text that grounds the chunk. The parent-document title and section heading tell the model which document and which section the chunk came from. Code blocks are often the answer itself for technical queries. Cross-references like 'see Section 4.2' let an agent issue a follow-up retrieval or reason about the document's structure.
Why the line matters
A five-chunk context block at 500 tokens per chunk is 2,500 tokens. If 20 percent of every chunk is repeated boilerplate license text, you are spending 500 tokens per turn on nothing, and worse, the model's attention is split across that chrome and the body. Stripping reclaims that budget for actual content.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- LlamaIndex 2026 ships ingestion transformers (e.g. HTMLNodeParser) that remove nav and footer blocks before chunking.
- Anthropic's 2026 RAG cookbook for Claude Opus 4.7 explicitly recommends keeping section headings inside each retrieved chunk for citation linkage.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you decide whether image captions are chrome or content for your specific stack?
Check whether the downstream model receives the corresponding images. Vision-capable stacks keep captions; text-only stacks strip them.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Stripping the section heading along with the navigation. The heading tells the model what topic the chunk is about; nav chrome does not.
60 second bullets to scan on the way to the call.
Define chrome versus content in one sentence each
Name three things that are almost always chrome
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.