Communicability Under Transduction

tl;dr: I wanted to test whether formatting like numbered steps, tabs, and callouts helps docs keep their meaning on the way to an AI tool, compared with saying the same things in plain prose. My experiment was flawed, but I learned some interesting things along the way.

The advice I wanted to test

In documentation, it's common advice to mark things explicitly:

There are many good reasons to do this. A big one is that the source file is usually transformed into some other output. In many cases, it's transformed into HTML, flattened to text, cut into chunks, and handed to an AI agent. (Chunking cuts a long document into short pieces so a search system can pass the AI only the pieces that look relevant, instead of the whole page.) Theoretically, explicit document structure survives that transformation better than less-structured content.

I wanted to see if that held up for coding agents. If structure and meaning shift each time the content is transformed, the agent at the end of the line might not get what the docs actually say.

Meaning is remade every time it moves

The question comes out of semiotics, the study of how signs carry meaning. Gunther Kress calls it transduction: when meaning moves from one mode to another, like from a diagram to speech or from a layout to a sentence. Kress's point is that the meaning doesn't just travel. It gets remade, and something is always gained or lost in the remaking.

The kind of meaning I cared about is what I'll call a relation: how two pieces of content connect. This step comes before that one. These commands are alternatives. This warning applies to that command. Formatting often carries relations without saying them in words. A numbered list says "in this order" just by being numbered. Whether a page's relations still come across at the end of the pipeline is what the title means by communicability.

A documentation pipeline is a chain of transductions. Here's an example from Astro's docs, the set of pages (the corpus) I used for the experiment.[1] Many of its pages show package manager commands in tabs: one each for npm, pnpm, and yarn. The tabs encode a relation: these are alternatives, run exactly one.

Strip the tabs during plain-text extraction and you can end up with three commands in a row, which reads like a sequence: run all three, in order.

Figure 1Tabs flattened into plain text

npm

npx astro add react

pnpm

pnpm astro add react

Yarn

yarn astro add react

No words are lost, but the relation is swapped for a different, wrong one. (In my own pipeline it was never quite that clean: the tab labels survived as stray text above each command.) That kind of failure, meaning that's wrong but won't break any linters, is what I wanted to test.

How the experiment worked

I took 12 pages of Astro's documentation and made a second version of each. The second version is exactly the same, but its relations are in prose instead of markup. For example, a steps component became a paragraph ("First, … Second, … Finally, …") and tabs became "If you are using npm: …", etc.

Then I pushed both versions through the same four-stage pipeline:

  1. Compiled HTML: the rendered page
  2. The accessibility tree: the browser's simplified outline of the page, which is what a screen reader or an AI agent driving a browser sees
  3. Plain text: the page with all markup stripped
  4. A chunk: a 1,500-character slice of that plain text, cut at fixed points regardless of where sentences or sections end, the way a simple retrieval system would cut it

At every stage, an AI model (the reader) got the output of that stage and answered multiple-choice questions about 229 specific relations: sequence, alternatives, warnings, preconditions, references like "the key", and pointers like "this step". Each question had one right answer, two plausible wrong answers, and "the text does not say". Along with each answer, the reader said whether the text stated it outright or only implied it, and quoted the line it relied on. Each answer was scored on a four-point scale:

Score Meaning
3 Correct and backed by a quote from the text
2 Correct but only by inference
1 "The text does not say": the loss is visible
0 A wrong relation: the loss is invisible

I also pre-registered the experiment. Pre-registration means writing down your predictions and exactly how you'll measure them before you collect anything, so you can't quietly move the goalposts once you see the results. My predictions, the scoring, and the analysis were committed to Git before any data existed, and the repository was on GitHub before the first answer was recorded.[2] Every change after that is logged with what I had already seen when I made it. And I made a lot of changes along the way.

The plan changed: AI readers instead of me

The original design had me answering every question by hand. I really wanted a human in the loop. Unfortunately, I didn't have the time. In the interest of ever completing the experiment, I amended the design to use two AI models as readers instead: GLM-5.3-Flash, a lightweight model from Z.ai, and Anthropic's Claude Sonnet 5.5. Each model answered the same 1,832 questions (229 relations × 2 versions × 4 stages). Every question ran in a fresh session, so no answer could leak into the next one. Five answers per model came back malformed or not at all, leaving 1,827 each.

This changed the nature of the experiment, but it also turned out to be quite informative.

Result 1: markup didn't help

I predicted that prose would fall further behind markup at each stage down the pipeline because it was losing more structure and relation along the way. It didn't. The prose version scored as well as or better than the marked-up version at every stage, with both AI readers. The gaps were small: the prose version's average score was 0.02 to 0.15 points higher on the 0–3 scale.

Figure 2Markup minus prose: the gap in mean score at each stage
Markup minus prose: the gap in mean score at each stage
Stage Reader Gap 95% low 95% high
Compiled HTML GLM-5.3-Flash -0.149 -0.190 -0.104
Compiled HTML Claude Sonnet 5.5 -0.053 -0.144 0.022
Accessibility tree GLM-5.3-Flash -0.101 -0.202 -0.014
Accessibility tree Claude Sonnet 5.5 -0.057 -0.167 0.049
Plain text GLM-5.3-Flash -0.071 -0.152 0.009
Plain text Claude Sonnet 5.5 -0.083 -0.188 0.005
Chunk GLM-5.3-Flash -0.044 -0.153 0.068
Chunk Claude Sonnet 5.5 -0.022 -0.115 0.074

When I looked at where the gap came from, it wasn't about getting relations right. Both versions were answered correctly at nearly the same rate, within 2 percentage points at every stage. Almost all of the difference was between scores 3 and 2: whether the right answer could be backed by a quote.

Prose states a relation in a sentence: "These are alternatives; use exactly one." There's something to quote. Markup carries the same relation in structure, such as a tab, a number, or a callout's color, and structure isn't quotable. So my scoring rule, which rewarded quoted support, probably favored prose.

Figure 3Answers by score at each stage
Answers by score at each stage
Reader Stage Version 3 quoted 2 inferred 1 doesn't say 0 wrong
GLM-5.3-Flash Compiled HTML Markup 96 132 0 1
GLM-5.3-Flash Compiled HTML Prose 129 98 0 1
GLM-5.3-Flash Accessibility tree Markup 109 113 3 3
GLM-5.3-Flash Accessibility tree Prose 127 99 2 1
GLM-5.3-Flash Plain text Markup 176 50 0 1
GLM-5.3-Flash Plain text Prose 193 34 0 1
GLM-5.3-Flash Chunk Markup 161 46 20 2
GLM-5.3-Flash Chunk Prose 177 26 22 4
Claude Sonnet 5.5 Compiled HTML Markup 190 38 0 0
Claude Sonnet 5.5 Compiled HTML Prose 203 23 0 1
Claude Sonnet 5.5 Accessibility tree Markup 143 81 4 1
Claude Sonnet 5.5 Accessibility tree Prose 155 70 3 1
Claude Sonnet 5.5 Plain text Markup 196 32 0 1
Claude Sonnet 5.5 Plain text Prose 215 13 0 0
Claude Sonnet 5.5 Chunk Markup 170 34 21 3
Claude Sonnet 5.5 Chunk Prose 175 30 22 2

That's flaw #1 in the experiment.

Result 2: the readers already knew the answers

A human reader who'd never used Astro would need the docs to answer these questions. An AI model might not, because it may have read Astro's docs during training. So I asked the same questions with no documentation attached at all.

GLM got 82% of them right. Claude got 86%. For the package-manager tabs, the textbook example of "structure carries the meaning", they got 97–98% right without even seeing the page. Astro's docs are almost certainly in the models' training data. They knew the answers before they read anything.

So "both versions were answered correctly" mostly measured memory, not whether the relations survived the pipeline. A reader who already knows the relation can't show you whether the text preserved it.

Figure 4Relations each reader answered without the docs
Relations each reader answered without the docs
Relation GLM-5.3-Flash Claude Sonnet 5.5
S01-O1-at-005129 yes no
S01-O1-at-008267 yes yes
S01-O1-at-016972 yes no
S01-O1-at-018228 yes yes
S01-O2-at-003064 yes yes
S01-O2-at-011443 yes yes
S01-O2-at-011756 yes yes
S01-O2-at-013900 yes yes
S01-O2-at-014362 yes yes
S01-O2-at-015015 no no
S01-R1-001 yes yes
S01-R1-002 yes yes
S01-R1-003 yes yes
S01-R2-001 yes yes
S01-R2-002 yes yes
S01-R2-003 yes yes
S01-R2-004 yes yes
S01-R2-005 yes yes
S01-R2-006 yes yes
S01-R2-007 yes yes
S01-R2-008 yes yes
S01-R2-009 yes yes
S01-R3-001 yes yes
S01-R3-002 yes yes
S01-R3-003 yes yes
S01-R3-004 yes yes
S01-R3-005 yes yes
S01-R3-006 yes yes
S01-R3-007 no yes
S01-R4-001 yes yes
S02-O1-at-000623 yes yes
S02-O1-at-001369 yes yes
S02-O1-at-003004 yes yes
S02-O1-at-004985 yes yes
S02-O1-at-005549 yes yes
S02-O1-at-010581 yes yes
S02-O1-at-014061 yes yes
S02-O1-at-014616 yes yes
S02-O1-at-014715 yes yes
S02-O1-at-016574 yes yes
S02-O2-at-002099 yes yes
S02-O2-at-003591 yes yes
S02-O2-at-006250 yes yes
S02-O2-at-007892 yes no
S02-O2-at-009228 no yes
S02-O2-at-009777 yes yes
S02-O2-at-012079 yes yes
S02-R1-001 no yes
S02-R1-002 yes no
S02-R1-003 yes yes
S02-R1-004 no yes
S02-R1-005 yes yes
S02-R2-001 yes yes
S02-R3-001 no no
S02-R3-002 yes yes
S03-O2-at-002497 yes yes
S03-R2-001 yes yes
S03-R2-002 yes yes
S03-R2-003 yes yes
S03-R2-004 yes yes
S03-R2-005 yes yes
S03-R2-006 yes yes
S03-R2-007 yes yes
S03-R3-001 yes yes
S03-R3-002 yes yes
S03-R3-003 yes yes
S03-R3-004 yes yes
S04-O1-at-010234 yes yes
S04-O1-at-013841 yes yes
S04-O1-at-013916 yes yes
S04-O1-at-015086 no no
S04-O1-at-015217 yes yes
S04-O1-at-022795 yes yes
S04-O2-at-001521 no yes
S04-O2-at-002999 yes yes
S04-O2-at-003677 yes yes
S04-O2-at-004267 yes yes
S04-O2-at-006275 no yes
S04-O2-at-018741 yes yes
S04-O2-at-019092 no yes
S04-O2-at-023742 yes no
S04-O2-at-023879 no yes
S04-O2-at-027723 no no
S04-R2-001 yes yes
S04-R3-001 yes yes
S04-R3-002 yes yes
S04-R3-003 no no
S04-R3-004 no no
S04-R3-005 yes yes
S04-R3-006 yes yes
S04-R3-007 yes yes
S04-R3-008 yes no
S04-R3-009 yes yes
S04-R4-001 yes yes
S04-R4-002 no yes
S04-R4-003 yes yes
S05-O1-at-001327 yes yes
S05-O1-at-002434 yes yes
S05-O1-at-003482 no yes
S05-O1-at-005788 yes yes
S05-O1-at-006014 yes yes
S05-O2-at-000915 yes yes
S05-O2-at-005512 yes yes
S05-O2-at-005825 no no
S05-R1-001 yes yes
S05-R3-001 yes yes
S05-R3-002 yes yes
S05-R4-001 no no
S06-O1-at-001889 yes yes
S06-O1-at-002202 yes yes
S06-O1-at-004727 yes yes
S06-O1-at-004982 yes yes
S06-O1-at-007427 yes no
S06-O2-at-004006 yes yes
S06-R1-001 yes yes
S06-R1-002 yes yes
S06-R1-003 no yes
S06-R1-004 yes yes
S06-R2-001 yes yes
S06-R2-002 yes yes
S06-R2-003 yes yes
S06-R2-004 yes yes
S06-R2-005 yes yes
S06-R2-006 yes yes
S06-R2-007 yes yes
S06-R2-008 yes yes
S06-R2-009 yes yes
S06-R2-010 yes yes
S06-R4-001 yes yes
S07-O1-at-001725 yes yes
S07-O1-at-001809 yes yes
S07-R3-001 yes yes
S07-R3-002 yes no
S07-R3-003 yes yes
S07-R3-004 yes yes
S07-R3-005 yes yes
S08-O1-at-001784 yes yes
S08-O2-at-001512 yes yes
S08-R3-001 yes yes
S09-O1-at-006726 yes yes
S09-O1-at-010713 yes yes
S09-O1-at-011641 yes yes
S09-O2-at-024636 yes yes
S09-R1-001 yes yes
S09-R1-002 yes yes
S09-R1-003 yes no
S09-R1-004 no no
S09-R2-001 yes yes
S09-R2-002 yes yes
S09-R3-001 yes yes
S09-R3-002 yes yes
S10-O1-at-003659 no no
S10-O1-at-006809 yes yes
S10-O1-at-007949 yes yes
S10-O1-at-010471 yes yes
S10-O1-at-011603 no no
S10-O1-at-013172 yes yes
S10-O1-at-014050 yes yes
S10-O2-at-002069 yes yes
S10-O2-at-004106 no yes
S10-O2-at-005434 yes yes
S10-O2-at-007685 no yes
S10-O2-at-008421 yes yes
S10-O2-at-009444 no yes
S10-O2-at-009560 yes yes
S10-O2-at-010111 yes yes
S10-O2-at-012008 yes yes
S10-O2-at-013229 yes yes
S10-O2-at-013799 no no
S10-R1-001 yes yes
S10-R1-002 yes yes
S10-R1-003 yes yes
S10-R1-004 yes yes
S10-R1-005 yes yes
S10-R1-006 yes yes
S10-R2-001 yes yes
S10-R2-002 yes yes
S10-R2-003 yes yes
S10-R3-001 yes yes
S10-R3-002 yes no
S10-R3-003 yes yes
S10-R3-004 yes yes
S10-R3-005 yes yes
S10-R3-006 yes yes
S11-O1-at-003079 yes yes
S11-O1-at-004712 no yes
S11-O1-at-005084 no yes
S11-O1-at-005719 yes yes
S11-O1-at-012558 yes yes
S11-O1-at-012838 yes yes
S11-O2-at-001435 no no
S11-O2-at-002947 no no
S11-O2-at-004129 yes yes
S11-O2-at-006710 yes no
S11-O2-at-007282 yes yes
S11-O2-at-009762 no yes
S11-R1-001 no yes
S11-R1-002 no yes
S11-R1-003 no no
S11-R1-004 yes yes
S11-R1-005 yes yes
S11-R1-006 yes yes
S11-R3-001 yes yes
S11-R3-002 no no
S11-R3-003 yes no
S11-R3-004 no yes
S11-R3-005 yes yes
S11-R3-006 yes yes
S11-R3-007 yes yes
S11-R3-008 yes yes
S11-R4-001 yes yes
S12-O1-at-006887 yes yes
S12-O1-at-007643 yes yes
S12-O1-at-009885 yes no
S12-O1-at-018840 yes yes
S12-O1-at-019154 yes yes
S12-O2-at-001248 yes yes
S12-O2-at-001848 yes yes
S12-O2-at-002838 yes yes
S12-O2-at-006738 no no
S12-O2-at-006974 yes yes
S12-R1-001 yes yes
S12-R1-002 yes yes
S12-R2-001 yes yes
S12-R3-001 yes yes
S12-R3-002 yes yes
S12-R3-003 yes yes
S12-R4-001 yes yes
S12-R4-002 yes yes

That's flaw #2.

The real test is on the relations the readers didn't already know. Without the docs, each relation's question was asked 8 times, once for each version and stage, and I counted the relation as known if the model got it right at least 5 times. That left 37 of the 229 relations unknown for GLM and 30 for Claude. On those:

Result 3: chunking breaks things

Call an answer a loss if it scored 0 or 1: the reader didn't get the relation from the text. About four in five losses happened at the chunk stage (see the Chunk rows in Figure 3), and almost always for the same reason: the chunk boundary cut the passage in half. I sorted a sample of 40 "the text does not say" answers by cause, with AI help and my review. In 39 of them, the chunk simply didn't contain the text needed to answer.

Figure 5A chunk boundary cutting through a passage

First, create an API key in your dashboard. Copy it now: the dashboard shows it only once.

Next, add the key to your project's .env file as PUBLIC_API_KEY.


Then restart the dev server so it picks up the new variable.

Finally, load any page that calls the API to check that the key works.

The failure I set out to find, a wrong relation with nothing to signal it, was rare. At the chunk stage, a lost relation became "the text does not say" seven to nine times as often as it became a wrong answer (42 to 6 for one reader, 43 to 5 for the other). Some of those wrong answers trace back to one badly worded question of mine. Without it, the wrong answers drop to 4 and 3.

There was one place where markup made things worse, in two cases I found. In the accessibility tree, a tab group exposes only the tab that's open. The other tabs are hidden until someone clicks them, so their text isn't there. A reader working from that tree can't recover alternatives it can't see. The prose version, which writes every option out, doesn't have that problem.

So... what?

These are small-sample, single-corpus, AI-read results, so take them as directions rather than rules. But maybe they'll help point someone in the right direction.

Summary

This all basically boils down to: on a well-known corpus, AI readers can't tell you whether your formatting survives, because they don't need your formatting to answer. A good test needs content the reader doesn't already know, or a human reader.

I've already got some follow up experiments in mind, with doc sets that aren't in models' training data.

The design, every amendment, and the data behind these numbers are in the study repository. Its README section Where things stand is the best place to start.

References

  1. Astro documentation, Astro

    Source ↩

  2. Communicability Under Transduction: study repository, Kyle Rollins

    Source ↩