DEV Community

Cover image for Where does the answer end and the interface begin?
NAN
NAN

Posted on

Where does the answer end and the interface begin?

Paste a Microsoft Copilot answer into a document and read it back:

The endpoint returns JSON2 and supports cursor pagination3. Rate limits apply per key1.

Those digits are citation markers. On screen they are small superscript chips you click to see a source. In your document they are noise welded to the last word of each clause, and you get to pick them out by hand.

The obvious reading is "the clipboard mangled it". The more useful reading is that nobody ever decided what counts as the message.

A chat reply is not one thing

Open devtools on any assistant reply. The container holding "the answer" also holds:

  • the prose
  • inline citation references, inside the sentence flow
  • a sources list, usually collapsed
  • copy / thumbs-up / regenerate buttons
  • suggested follow-up chips
  • sometimes a model badge or timestamp

All of it lives in one subtree. There is no attribute that says this part is the answer and that part is furniture. The distinction exists in your head and in the CSS, nowhere else.

So when anything walks that subtree — the clipboard, an extension, a screen reader — it has to guess. And the guesses differ, which is why the same answer comes out differently depending on how you took it.

Why citation markers are the hard case

Most interface elements sit around the text. Buttons come after. Chips come below. A naive "take the paragraph" rule handles them fine.

Citation markers sit inside it:

<p>
  The endpoint returns JSON<sup class="citation"><a href="…">2</a></sup>
  and supports cursor pagination<sup class="citation"><a href="…">3</a></sup>.
</p>
Enter fullscreen mode Exit fullscreen mode

That is one paragraph. The reference is a child of the sentence. Take the paragraph's text content and the digits come with it, because as far as the DOM is concerned they are the sentence.

This is also why they survive a paste that drops everything else. They are not decoration attached to the message; they are inline content inside a text node's neighbourhood.

Perplexity has the mirror-image problem, incidentally. There, the same structure means references get flattened to bare numbers and the links are lost — you keep the marker and lose the source. With Copilot in a document you tend to keep the marker and not want it at all. Same markup, opposite complaint, depending on whether you are archiving research or drafting prose.

There is no correct answer, only a choice

Three defensible positions, and which is right depends entirely on what the document is for:

Strip them. You are writing prose. The references were never going to be clickable in a printed doc anyway, and clean text matters more. This is what most people want most of the time.

Keep them as real footnotes. You are writing something that gets reviewed or cited. Convert each marker into a proper footnote and append the sources. More faithful, more work, and the output format has to support footnotes.

Keep them inline as links. You are pasting into Notion or a wiki where a numbered link still functions. Least transformation, but only works where links are live.

A tool that only does one of these will be wrong for somebody. Worth knowing which one yours picked.

The rest of the furniture

Once you start looking, the boundary question shows up everywhere in a chat export.

Follow-up chips are the sneakiest, because they read like content. "Would you like me to compare these?" is a sentence, sits in the message container, and lands in your document as though the assistant said it. It did not — the interface offered it.

Copy and feedback buttons usually contribute nothing to text content, so they vanish quietly. Usually.

Collapsed sources are absent unless expanded, which is a different failure again: the boundary was drawn correctly, but the content had not mounted.

Disclosure

I build an export tool, so read on accordingly.

Chat Exporter for Copilot takes the first position above: citation markers are stripped from the body so the exported text reads as prose. It writes to Word, PDF, Google Docs, Notion, Markdown or JSON, converts Copilot's KaTeX maths into a real equation object rather than an image, and keeps Markdown tables as tables. It works on both consumer Copilot and Microsoft 365 Copilot. Free tier, paid for unlimited.

Two things it does not hide. Follow-up chips are part of the message container, so if you export everything they come too — there is an answers-only mode precisely because that boundary is a preference, not a fact. And exporting mid-stream catches the pre-render state, so maths that has not been typeset yet exports as source.

The takeaway

Copy operations do not know what a message is. They know what a DOM subtree is. Everything you think of as "the answer" is a convention layered on top of markup that was designed for display, not extraction.

When an export brings along something you did not want, it is rarely a parsing failure. It is usually a boundary drawn in a different place than the one in your head.


If you export chats regularly: strip citations, footnote them, or keep them inline? I lean strip, but I suspect that says more about what I write than about what is right.

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.