Documentation is a good fit for these tools in one respect and a dangerous one in another. The structural work is repetitive and mechanical, which suits generation. The content has to be exactly right, and a plausible instruction that does not work costs a reader more than no instruction at all.
What is the specific risk?
Invented parameters, outdated syntax and steps that describe how a tool used to behave. A model trained on years of documentation for a library will produce confident instructions for a version that has since changed, with no indication that anything is wrong.
Readers trust documentation more than other writing, which makes the failure worse.
What is safe to generate?
- Structure. The sections a document of this type should contain.
- Rewriting for clarity. Where the content is supplied and correct.
- Consistency passes. Terminology and formatting across many pages.
- First drafts from real source. Generated from the actual code or interface.
- Finding gaps. What a reader would still need to know.
What unites the safe categories is that the correct answer is either supplied or verifiable. Structure can be judged by looking at it, clarity by reading it, and gaps by asking somebody unfamiliar.
Anything where the correctness depends on a fact the model supplied belongs in the other category.
What should never be generated from memory?
Anything with a value in it. Parameter names, defaults, limits, error codes, versions and endpoints all need to come from the source, and the source means the code or the interface rather than the model's recollection of it.
Write the reference page for this function using only the code below. Do not add parameters, defaults or return values that are not present. Where behaviour is unclear from the code, write unclear rather than describing what it probably does.
Examples are also where readers judge the whole page, since a broken one implies that nothing else has been checked either.
How do you handle examples?
Run them. A generated code example that has not been executed is a guess, and examples are the part readers copy without reading the surrounding prose.
Documentation examples that are tested automatically are the standard worth aiming at, and it is achievable for most reference material.
What is it best at?
The gap analysis. Asking what a reader who has never used this would still not know, after reading the page, produces a genuinely useful list, because the curse of expertise is exactly what makes documentation hard to write and easy to critique.
What about tone?
Less important than most guides suggest, and the one instruction worth giving is to stop hedging. Documentation that says a setting may sometimes affect behaviour is useless; readers need to know what it does.
Ruling out approximate language forces the writing back to what is actually known, which frequently reveals that nobody knows.
How do you keep it current?
By generating from source rather than editing prose. Documentation that is derived from the code can be regenerated when the code changes; documentation that was written once and then hand-edited drifts, and the drift is invisible until somebody follows an instruction that no longer works.
What about writing for developers specifically?
The audience least tolerant of padding and most likely to notice invention. Documentation aimed at people who will paste the example and run it has a shorter path to being caught out than almost any other writing.
What that audience wants is the working example first, the explanation second, and no introduction at all. Generated documentation reliably produces the reverse order, with a paragraph explaining what the feature is for before anything usable appears. Ruling that out explicitly, and putting the code at the top, is the single change that most improves technical pages.
What is the rule worth holding?
Prose from the model, facts from the source, examples from a test run. Any documentation process that keeps those three separate will be accurate, and any that blurs them will eventually publish something confident and wrong.