A developer tested Copilot, ChatGPT, and Claude to regenerate a table of contents from a long document. All three confidently returned the old, incorrect TOC instead of reading the actual document. The root cause: AI models pattern-match on salient existing structures (like a formatted TOC at the top of a file) rather than sequentially parsing content, and they have no reliable concept of page numbers when text is pasted. The post outlines workarounds (removing the existing TOC before pasting, asking for headings first) and concludes that page-aware document navigation remains unreliable in current AI tools — and the tools don't disclose this limitation.

4m read timeFrom code.likeagirl.io
Post cover image
Table of contents
The first page trapConfident wrongness is the real problemWhat AI is actually doing with your documentsWhat actually worksThe broader lesson

Sort: