Apply to my task
arXiv:2610.30026 ★ 83 Oct 21, 2026

Silent Cue Loss: Document Converters Drop Color and Highlighting, and the Agent Gets It Confidently Wrong

Key result

The pipeline isn't broken, there are no errors in the logs, yet answer quality drops from 0.69 to 0.08–0.15. That's what formatting loss looks like when Word and PDF get converted to text. The method lets the agent see the red mandatory requirement, the yellow exception, and the struck-through repealed rule, even though the converter (docling, "plain text") throws them away. Color and highlighting are put back into the text as labels like `[COLOR:#FF0000]` and `[HIGHLIGHT:YELLOW]`. Then the prompt spells out the role of each label: critical, warning, deprecated. Without labels, the agent doesn't say "I see no marks." It guesses confidently.

01

TL;DR

When you hand an agent a Word file or PDF, the converter (docling, "plain text," and the like) keeps the words but throws away text color and highlighting. To the agent, a red requirement, a yellow exception, and an ordinary paragraph all look the same. The paper's method: serialize the document to text so that color and highlighting stay visible, e.g., [COLOR:#FF0000] and [HIGHLIGHT:YELLOW]. Then you need to tell the agent what those labels mean (critical, warning, deprecated).

The painful part is that the pipeline doesn't break. The text is all there, there are no errors, and the agent answers briskly. On the task "list the requirements the author highlighted," quality drops from 0.69 to 0.08–0.15. The agent doesn't say "I can't see any markings"; it guesses. With docling, the false-positive rate on non-highlighted requirements is roughly four times higher than with the labeling method. Other models do the opposite and go almost completely silent. Neither failure is visible without reference answers.

The method has three moves. First: preserve color and highlighting as labels in the text. Second: type the labels, i.e., give each one a role (critical / warning / deprecated). Third: don't label things that appear everywhere (bold, italics, headings). Of all formatting types, only color and highlighting work. Bold, italics, monospace, and strikethrough gave no gain.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

02

Method Blueprint

STEP 1: Read the .docx/PDF while preserving formatting → text blocks where every run has color/highlight/strikethrough
        (code, not an LLM)
STEP 2: Turn formatting into inline labels → **bold** in Markdown, [COLOR:#FF0000], [HIGHLIGHT:YELLOW]
STEP 3: Add a role to the rare labels → red/red highlight = CRITICAL_WARNING,
        any other highlight = WARNING, strikethrough = DEPRECATED
STEP 4: Give the agent the labeled text + a legend of what the roles mean → in one prompt
STEP 5 (check): A test document with known markings → verify the agent saw them

Steps 1–2 are done by a script before the agent. Steps 3–5 are written in words in the system prompt.

03

Example

Task: A bank lawyer maintains an anti-money-laundering policy (along the lines of the Bank Secrecy Act) in Word. In it, mandatory requirements are marked in red, exceptions in yellow highlight, and repealed rules are struck through. A no-code automation agent (n8n, Dify) needs to answer tellers' questions: "What must be checked on a $15,000 transfer?" If the policy goes through an ordinary converter, the colors vanish, and the agent can't tell what's mandatory from what's just reference.

Prompt (system instruction for the agent):

You are an assistant to bank tellers. Answer only based on the policy below.

<MarkupLegend>
The policy text preserves the author's formatting marks:
- [COLOR:#FF0000]...[/COLOR] or red highlight = CRITICAL_WARNING:
  the author marked a mandatory requirement. It takes priority over ordinary text.
- [HIGHLIGHT:any color]...[/HIGHLIGHT] = WARNING: an exception or special condition
  the author wants you to pay attention to.
- ~~text~~ = DEPRECATED: the rule has been repealed; don't apply it or call it current.
- **bold** is just structure or a term. Do NOT treat it as a sign of importance.
- If there are no marks next to an item, it's an ordinary item. Don't call it
  highlighted by the author if you don't see a label.
</MarkupLegend>

<Rules>
1. When asked "what's mandatory," list the CRITICAL_WARNING items first.
2. For each item, give a verbatim quote from the policy.
3. If the policy has no marks at all, say so directly.
</Rules>

<Regulation>
2.4. Transactions over $10,000 [COLOR:#FF0000]are subject to mandatory review
with the basis recorded in the log[/COLOR].
2.5. The customer may confirm the source of funds with a bank statement. [HIGHLIGHT:YELLOW]Exception:
transfers between accounts of the same customer within the bank[/HIGHLIGHT].
2.6. ~~Verbal confirmation of the source of funds is permitted.~~
2.7. The teller maintains the **Review Log** electronically.
</Regulation>

Question: what must be done for a $15,000 transfer by a customer who brought a bank statement?

Result: The model will flag item 2.4 as mandatory in its answer and quote it. It will name exception 2.5 as a separate condition. It won't offer verbal confirmation (2.6) as a valid option. It won't move item 2.7 about the log into "mandatory" just because a word is in bold. Remove the labels and the legend, and the model will very likely start listing everything or miss the key point.

04

Why It Works

The weakness. An LLM reads tokens, not a page. Everything the author encoded with formatting (red = "don't violate," highlight = "look here") disappears when the converter keeps only the words. The task is nearly unsolvable from words alone: even a classifier trained on the markup achieves results only slightly better than chance from text (AUC 0.66). Without cues, the model is left guessing.

The strength. If the signal is visible in the text, the model uses it. It reads [COLOR:…] and [HIGHLIGHT:…] labels without any training. Its second strength: it follows a legend well. When it's written right there that "red = mandatory," the model uses the label as a priority signal. Typing added another +0.085 on top of bare labels.

How the method connects the two. First the signal is put back into the text. Then it's narrowed down to rare, meaningful features. That's the lever: - What to label. Color and highlighting, because they're rare and deliberate. Every heading is in bold, so bold doesn't "highlight" anything. In the ablation (removing one formatting type at a time), bold, italics, monospace, and strikethrough contributed zero. - How many roles to give. A short set (critical / warning / deprecated). In the full set, about 62% of roles described structure (heading, emphasis). The model took any role as a flag and started marking everything as highlighted. - What not to label. Anything ambiguous, such as green text. The authors excluded such rules: a wrong hint does more harm than no hint. - Highlight by presence, not by shade. The rule "yellow = warning" missed blue and gray highlights. Switching to "any highlight except white" raised paragraph coverage from 79% to 98%.

05

Prompt Template

<Role>
You are an assistant who answers strictly based on the document below.
</Role>

<MarkupLegend>
The document preserves the author's formatting marks. Read them as priority signals:
- {critical_label} = CRITICAL_WARNING: {what it means in my document}
- {warning_label} = WARNING: {what it means in my document}
- {deprecated_label} = DEPRECATED: {what it means and how to handle it}
- **bold**, *italics*, headings — structure only. They are NOT a sign of importance.
- If an item has no mark, it's an ordinary item. Don't call it highlighted by the author.
</MarkupLegend>

<Rules>
1. For questions like "what's important / mandatory / critical," first list the items
   with CRITICAL_WARNING, then those with WARNING.
2. For each item, give a verbatim quote from the document.
3. Do not apply DEPRECATED items as if they were current.
4. If the document has no marks at all, say so — don't guess.
</Rules>

<Document>
{document_text_with_labels}
</Document>

Question: {question}

What to fill in: - {..._label}: exactly the labels that appear in your text. For example, [COLOR:#FF0000] or "red highlight." - {what it means...}: the meaning from your practice. The paper stresses that the same formatting means different things in different departments. Don't guess — ask the document's author. - {document_text_with_labels}: the document after conversion with labels. How to get them is shown in the "Quick start" below.

🚀 Quick start — paste into the chat:

Here's a prompt template for reading documents with formatting marks. Adapt it to my task: [what documents I have and what's marked in them with color, highlight, strikethrough].
Ask me questions to fill in the fields.

[paste the template above]

Also write a short Python script (python-docx) that reads my .docx and outputs the text with [COLOR:#RRGGBB], [HIGHLIGHT:COLOR], and ~~strikethrough~~ labels around the corresponding runs.

The LLM will ask what each color and each highlight means in your documents, who applies them and how, and what questions people will ask the agent. That's because the method rests on the legend: without it, labels remain a bare signal, and typing provided an extra gain. It'll take the pattern from the template and plug in your meanings.

06

Limitations

⚠️ Only color and highlighting: Bold, italics, monospace, and strikethrough gave no gain in testing. There's nothing to be won by labeling them "just in case." Worse, extra labels clutter the text.

⚠️ Typing gives a modest gain: Preserving labels delivers most of the effect. The legend adds +0.085, and its significance is borderline (p = 0.049), with a wide confidence interval. On two of the six models, the legend didn't help.

⚠️ Models fail in different ways: Without labels, some models list too much, while others nearly refuse to answer (one gave very precise but rare answers, with recall around 0.09). Neither failure is visible without reference answers.

⚠️ You need code or a script: The labels won't appear on their own. Ordinary converters (docling, plain text, some upload tools in chat interfaces) lose color. You need to build a small .docx parser — an LLM can do it — but without this step the method doesn't work.

⚠️ Only one task was tested: Finding requirements the author highlighted. Other document questions, such as exact quoting or comparison, weren't tested.

⚠️ Color meaning isn't universal: The same formatting means different things in different departments. You can't hard-code "red = danger" in advance: you have to ask the author. The authors deliberately excluded ambiguous rules, such as green text.

⚠️ PDFs and scans are harder: PDFs have no "text properties"; color and highlighting are reconstructed from glyph geometry. Results on PDF roughly match the best existing converters, and scans need OCR, with its own errors.

⚠️ It's not just formatting that gets lost: Headers and footers, footnotes, document properties, and accepted tracked changes (the text that's actually in force) aren't reached by an ordinary walk through the document body. The authors discovered this themselves during the work — their first version missed it too.

07

How They Tested It

The researchers scanned 6,462 real .docx documents from public policies. 32.8% have deliberate red text or highlighting, and in 10.3% it's applied to a sentence containing an obligation. This isn't exotic — it's the normal state of corporate documents. From these, they built a task of 84 documents (332 highlighted requirements and 4,192 non-highlighted ones). The model had to name the requirements the author "marked for special attention." The ground truth came from the file's own properties, not from anyone's opinion. Scoring used no LLM judge: a requirement counts as found if the answer contains four consecutive meaningful words from its beginning.

They compared six ways of preparing the text with the same question. Plain text scored 0.075, docling 0.150, docx2python (which preserves formatting as HTML) 0.586, and the authors' method 0.690. The cleanest conclusion came from the layer-by-layer experiment: one formatting type at a time was removed from the text, and the entire effect came from highlighting (+0.302) and color (+0.262). Bold, italics, monospace, and strikethrough stayed within ±0.003 of zero. Surprisingly, a single document can contain more than a thousand bold marks. They're uninformative precisely because they're too common: an author who bolded every heading hasn't highlighted anything.

The question "is a legend needed on top of preservation" was tested in a pre-registered test: hypotheses and the analysis method were fixed before the run. It was confirmed, but with p = 0.049, right on the edge. The authors honestly showed that after fixing a bug in their own parser (it inserted spurious black labels), the significance got worse while the effect stayed the same. They also tested on Microsoft's external benchmark (326 questions, 59 documents) and on six models from two developers. Plain text failed on all of them (0.007–0.075), meaning the issue is how the document is presented, not the model. The full pipeline with retrieval and package assembly confirmed the gap: 0.503 versus 0.258 (docx2python) and 0.084 (docling).

08

Adaptations and Extrapolations

🔧 Technique: add "what not to treat as a signal" to the legend → fewer false positives

The paper typed only rare features. The rule "bold is structure" is easy to write straight into the prompt:

- **bold**, headings, italics — just structure. Not a reason to treat an item as important.
- If there's no label nearby, write "not highlighted by the author," not "seems important."

It's the same idea as in the original (a narrow set of roles), but expressed as an explicit prohibition for models that tend to treat any mark as a flag.

Extrapolation: audit the pipeline before launching the agent. The paper doesn't describe this; it's my transfer of the principle "check against ground truth taken from the file itself."

Take one document where you know for sure what's highlighted, and ask the agent:

In this document, the author marked some items with color or highlighting.
List exactly the items that are marked, and for each one state
which mark told you so. If you can't see any marks in the text, write "I don't see any marks."

If the model answers with a confident list while there are no marks in its input, it's guessing. If it honestly says "I don't see any," the pipeline is losing the signal and it's time to fix the conversion. It's a cheap test for "silent loss." It catches what no monitor ever will.

09

Resources

  • Paper: What the Author Wrote, What the Agent Reads: Silent Cue Loss in Enterprise Document Ingestion. Yikai Zhao, Saurabh Pandey, Pradeep Kumar Misra, Amazon.
  • Mentioned in the paper: Microsoft Office Comprehension Benchmark (File-Fidelity, Word), ParseBench, OmniDocBench; converters docling, docx2python, python-docx, Unstructured, pymupdf4llm, mammoth.
  • Related: PASTA (steering attention by text style), Dillitzer et al. (attention ≠ accuracy), TexTAR (recognizing bold, italics, underline, and strikethrough in images), Yang et al. (USENIX Security, visual tricks for evading moderation).

Research digest

Key result

The pipeline isn't broken, there are no errors in the logs, yet answer quality drops from 0.69 to 0.08–0.15. That's what formatting loss looks like when Word and PDF get converted to text. The method lets the agent see the red mandatory requirement, the yellow exception, and the struck-through repealed rule, even though the converter (docling, "plain text") throws them away. Color and highlighting are put back into the text as labels like `[COLOR:#FF0000]` and `[HIGHLIGHT:YELLOW]`. Then the prompt spells out the role of each label: critical, warning, deprecated. Without labels, the agent doesn't say "I see no marks." It guesses confidently.

Principle

A three-move process. First, a script reads the .docx and turns color, highlighting, and strikethrough into labels inside the text. Then the rare labels get a role: red = CRITICAL_WARNING, any highlight = WARNING, strikethrough = DEPRECATED. Finally, the agent receives the text and the legend in one prompt. The golden rule: label only what's rare and deliberate. Every heading is in bold, so bold highlights nothing. It's like underlining every line in a textbook: afterward you can't find what was important. In testing, one formatting type was removed at a time. Bold, italics, monospace, and strikethrough added zero gain. Only color and highlighting work.

Why it works

An LLM reads tokens, not a page. Everything the author said with color vanishes in the converter. The task is nearly unsolvable from words alone: even a trained classifier gets AUC 0.66, just a bit better than a coin flip. Without labels, some models start flagging everything (docling has roughly 4 times more false positives than the labeling method). Others go almost silent: recall around 0.09. Neither failure is visible without reference answers. If the signal is in the text, the model reads the labels without training and dutifully follows the legend. Typing the roles added another +0.085 on top. Keep the roles few. In the full set, about 62% of roles described structure, and the model took any of them as a flag. Catch highlights by presence, not by shade. The rule "yellow = warning" missed blue and gray highlights. Switching to "any highlight except white" raised paragraph coverage from 79% to 98%.

When to apply

Policies, contracts, procedures, and instructions where the author uses color to mark what's mandatory, exceptions, and what's repealed → questions like "what must be checked" or "what exceptions are there," especially when the agent is built in n8n or Dify and reads files on its own. Color meaning isn't universal. In one department red means "forbidden," in another "urgent." Ask the document's author; don't guess. NOT a fit if the formatting in your documents is chaotic or carries little meaning. The method was tested on one task: finding requirements the author highlighted. Exact quoting and document comparison weren't tested. PDFs and scans are harder: color is reconstructed from glyph geometry, and scans need OCR with its own errors. Headers and footers, footnotes, and accepted tracked changes also aren't reached by an ordinary walk through the document.

Mini recipe

1. Ask the author what the colors mean: red, highlights, strikethrough. Write down one line for each. 2. Have an LLM write a Python script (python-docx): it reads the .docx and wraps `[COLOR:#RRGGBB]`, `[HIGHLIGHT:COLOR]`, and `~~strikethrough~~` around the relevant runs. 3. Don't label extras: leave bold, italics, and headings as they are. Drop ambiguous colors, like green. 4. Boil the roles down to three: critical, warning, deprecated. For highlights, use the rule "any except white." 5. Write the legend in the system prompt: what each label means in your specific document. Add the lines "bold is not a sign of importance" and "no label means an ordinary item." 6. Add rules: CRITICAL_WARNING items first, a verbatim quote for each, don't apply repealed items. If there are no labels at all, the agent says so directly. 7. Test on a sample document: make a file with known marks and check that the agent saw them. Otherwise the failure stays invisible.

Examples

[BAD]: `Here's the anti-money-laundering policy (text without formatting). What must be checked on a $15,000 transfer?` [GOOD]: `You are an assistant to bank tellers. Answer only from the policy. Legend: [COLOR:#FF0000]...[/COLOR] = CRITICAL_WARNING, a mandatory requirement. [HIGHLIGHT:any color] = WARNING, an exception. ~~text~~ = DEPRECATED, the rule is repealed, don't apply it. Don't treat bold as a sign of importance. If an item has no label, it's an ordinary item. List CRITICAL_WARNING items first, with a verbatim quote for each. Policy: 2.4. Transactions over $10,000 [COLOR:#FF0000]are subject to mandatory review with the basis recorded in the log[/COLOR]. 2.5. [HIGHLIGHT:YELLOW]Exception: transfers between accounts of the same customer[/HIGHLIGHT]. 2.6. ~~Verbal confirmation of the source of funds is permitted.~~ 2.7. The teller maintains the Review Log. Question: what must be done for a $15,000 transfer?` Result: item 2.4 lands in "mandatory" with a quote. Exception 2.5 becomes a separate condition. The agent won't offer verbal confirmation 2.6 as valid. The log in 2.7 won't be filed as mandatory just because of the bold font. [BAD]: `Pick out everything the author highlighted in the document` (document after an ordinary converter) [GOOD]: `If the document contains no [COLOR] or [HIGHLIGHT] labels, say so directly and don't guess what the author considered important.`

In plain words

LLMs don't see a document through your eyes — they gobble up raw tokens. When a standard parser converts Word or PDF to text, it completely scrubs out font color, highlighting, and strikethrough. To the model, a hard prohibition, a rare exception, and background filler all become exactly the same mush. A human encoded half the meaning visually, and the converter just flushed it down the drain.

It's like driving through a city where every traffic light and road sign has been reprinted in black ink on white paper. To a parser like that, a green signal and a red light sound exactly the same. Technically the words were read, but without color you'll plow into a crash at full speed — plain text kills critical context.

Trying to make a model guess importance from the words alone is a total flop: language models score a pitiful AUC 0.66 on this, barely better than a coin toss. The only thing that actually works is explicit text serialization. The converter has to translate visuals into tags like [COLOR:#FF0000] or [HIGHLIGHT:YELLOW], and the prompt needs to include the legend: red is law, yellow is an exception.

The article walks through bank anti-money-laundering policies, but the principle is universal. Contracts with lawyers' edits, medical records, corporate knowledge bases for agents in n8n and Dify — everywhere, people highlight what matters with color. Throw out the formatting, and the agent will miss a critical condition. Visual markup is data, not just decoration.

Bottom line: stop feeding LLMs gutted text and hoping for a miracle. Set up your pipeline so the parser keeps colors as text labels, and spell out their meaning right in the prompt. Otherwise your smart assistant will tell a customer nonsense simply because it didn't understand why a line was crossed out.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on Silent Cue Loss: Document Converters Drop Color and Highlighting, and the Agent Gets It Confidently Wrong arXiv:2610.30026

Sign in to apply this study New accounts get 50 free credits.