Published · 8 min read
How to create an llms.txt file for your docs
Learn how to create llms.txt for your documentation: what goes in it, how to write or generate one, and how to keep it accurate after each release.
Published · 7 min read
Learn how to measure documentation accuracy by checking which pages go wrong after each merged pull request, and what evidence proves it.
Can you say, right now, which of your pages are wrong? Most teams can't. They can tell you how many docs tickets are open, or when a page was last edited, and neither is the same thing. If you want to know how to measure documentation accuracy, start with a narrower question: after each merged pull request, which pages changed status from right to wrong, and what proves it?
This guide walks through a method built on that question. It works for docs, marketing pages, and help-center articles, and needs no new vocabulary, just a ledger and some discipline.
Accuracy is not readability, completeness, or findability. Those matter, and DORA measures documentation quality with "a set of eight metrics that assess documentation attributes like clarity, findability, and reliability". But a clear, easy-to-find page that describes a flag you removed last sprint is still wrong.
So define accuracy narrowly: a page is accurate when every checkable claim on it matches the behavior of the code that is merged and shipped. A checkable claim is anything a reader could test, such as:
Opinion, positioning, and conceptual explanation are out of scope for this metric. That narrows the job to comparing claims against code.
The drift is well documented. A study in Empirical Software Engineering covering more than 3,000 GitHub projects found that "28.9% of the most popular projects on GitHub currently contain at least one outdated reference," and that 82.3% of the projects were outdated at least once in their history. At the reference level the share looks small: in the top-1000 dataset, 3.9% (7910/201852) of the detected code element references are currently outdated. Even among Google projects, 9.7% (287/2947) of documents are currently outdated.
Two caveats apply. That study looks at open-source repository docs, not help centers or marketing sites. And DORA's research covers internal documentation only. Your public surfaces are probably less studied and less watched than your README, which is a reason to measure them yourself.
Ticket counts tell you how many readers bothered to complain. They lag the error by days or months, and they skew toward your highest-traffic pages. A wrong default on a quiet reference page can sit for a year without a ticket.
The merge is the better signal. Every inaccuracy starts with a specific change to the code, so that is where measurement should start too. One DORA survey item puts the standard plainly: "Technical documentation is updated as changes are made".
For each merged pull request, run the same four steps:
From that ledger you get three numbers worth reporting:
The hard part is the tracing. Researchers describe the status quo this way: "developers often have to manually check whether the documentation needs to be updated whenever changes are made to the source code". That paper presents a GitHub Actions tool that scans docs for outdated code references whenever a pull request is submitted. A check like this catches literal references. It will not catch a help-center article that describes the old behavior in plain prose, so plan to trace behavior as well as identifiers.
If you want a baseline before building anything, Thally Track runs this kind of impact analysis on your last five merged PRs. Whatever you use, test it against your own changes. A tool that covers many repositories has not thereby shown it is accurate.
A proposed doc fix without evidence is just another claim, and now you have two things to verify instead of one. This matters more as drafting gets automated. In Postman's 2025 State of the API survey, 41% of respondents use AI to generate API documentation. Meanwhile, Stack Overflow reports that "46% of developers said they don't trust the accuracy of the output from AI tools, a significant increase from 31% last year".
Evidence resolves that tension. A reviewer does not need to trust the author, human or machine, if the proof is attached. Each proposed change should carry:
This gives you a fourth metric, evidence coverage: the share of proposed updates that arrive with a traceable link to code. If a reviewer has to open the repo and hunt for the reason behind a change, count that update as uncovered. Low coverage means your approvals rest on trust rather than verification, and your drift rate is less reliable than it looks.
A draft doesn't fix a page. Neither does a detected problem. For measurement purposes, a page moves back to "accurate" only when a person who knows the product has reviewed the evidence and approved the change. Track four states for every affected page:
Only the last state counts toward accuracy. Rejections count too. If reviewers keep rejecting drafts for one product area, either the tracing is wrong there or the evidence is thin. Record the rejection rate and the reason.
Teams often ask how to publish machine-consumable docs without forcing writers into a complicated workflow, and how to keep governance intact while doing it. The same approval gate handles both. Keep one source that writers edit in a format they already know, generate the machine-readable outputs from it, and put review in front of everything. If the site, the Markdown, the JSON, and the llms.txt all come from one approved source, you measure accuracy once instead of four times.
That is the model Thally uses: updates arrive as evidence-backed pull requests, content stays in Git, and nothing publishes without human approval. When comparing platforms, weigh authoring workflow, maintenance, versioning, API support, and AI readiness together. The real question is whether the platform keeps documentation accurate after launch, not just whether it makes the first draft look polished.
Accuracy also matters more for machine readers. An assistant that reads a stale page will repeat the error with confidence to someone who never visits your site.
Accuracy is a status that expires. A page you fixed on Monday can be wrong again by Friday, because the same feature shipped another change. And stale claims left alone tend to stay. According to the preprint of the study above (arxiv.org/html/2212.01479v1), an outdated reference has around a 55% chance of surviving after a month in top-1000 projects and 45% in Google projects.
So keep the ledger running and look at it over time:
Review these on a regular cadence with whoever owns the pages: docs, engineering, and support.
The stakes are practical. Technical documentation remains a top resource for learning to code, cited by 68% of developers in Stack Overflow's 2025 survey, and 55% of Postman's respondents report struggling with inconsistent documentation. Readers rely on your pages and notice when they're wrong.
To start, pick your last handful of merged PRs, trace them to pages by hand, and write down what you find. That gives you a first drift rate and a baseline for every merge after it.
Published under the Thally editorial policy. Technical conformance is defined in the agent-readiness methodology.
Create a managed site, or use the open-source engine to run Thally yourself.