SaaStr AI 2026 recap
All Articles
Customer Support
//21 min read

How to Write Documentation for Humans and AI

BO
Bildad Oyugi
Head of Content

Key Takeaways

  • AI does not read your help center top to bottom. It splits each article into chunks and retrieves a few in isolation, so any section that leans on context from elsewhere breaks.
  • The highest-impact fix is making each section stand on its own: restate the product, the location, and the prerequisite inside the section instead of relying on the intro.
  • Writing documentation for humans and AI is not a tradeoff. Descriptive headings, short sentences, consistent terms, and question-style FAQs help both readers at once.
  • Depth now beats brevity, because chatbots field the follow-up questions a human skimmer never asked.
  • The 2026 layer most teams miss is delivery and testing: serve clean Markdown, be realistic about llms.txt, write for agents that take actions, and prompt your own docs before you trust them.

A customer opens your help center, types a question into the chat widget, and gets an answer in two seconds. The answer is confident, well-formatted, and wrong.

They follow it anyway, hit a dead end, and then open a support ticket, now annoyed that they wasted ten minutes. Your team pays twice: once for the AI reply, and again for the human who has to clean it up.

Support teams have a name for the root cause. They call it knowledge base rot. The docs were written years ago for a product that has since changed, or they were written for a human who could fill in the gaps, and now an AI is reading them literally and filling those gaps with guesses.

On the dashboard, the chatbot looks fine. It responded fast. It sounded sure of itself. No one flagged it. The only signal something broke is a customer who loses trust in self-service and escalates. That erosion is invisible until churn shows up a quarter later.

For a decade, documentation was something humans read. Now it is also something AI reads on a customer's behalf, through chatbots, search assistants, copilots, and now agents that take actions. These systems do not read the way people do, so docs built only for people fail them.

You will get the specific writing habits that improve AI accuracy, the 2026 delivery details most teams miss, and a way to test whether your docs work before you ship them. None of it makes your docs worse for the humans still reading.

How AI Actually Reads Your Documentation

An AI system processes your content nothing like a person does.

When an AI answers a question from your docs, it does not open your help center and browse. It uses a method called retrieval, usually through a pattern known as RAG (Retrieval-Augmented Generation).

Your knowledge base gets split into small pieces called chunks, each a few paragraphs long. When a customer asks something, the system compares the question against every chunk. It pulls the few that look most relevant and writes an answer from those alone.

This retrieval process has three consequences.

It Reads Sections in Isolation

The AI might grab paragraph four from one article and paragraph two from another. It does not hold the full article in view, and it does not preserve the original order. If paragraph four only makes sense because paragraph three set it up, the model is working with half the picture.

As the team at kapa.ai explains in its writing guide, sections are retrieved by relevance, not by document order. Each one has to make sense on its own.

It Cannot Infer What You Did Not Write

A person fills small gaps on their own. Tell a reader to "complete the setup, then move to the next step," and they will reason out what the next step probably is. AI takes the words literally.

If the next step is not named, the model does not know it exists. Write the step out, even when it seems obvious.

Your Writing Quality Becomes Your Answer Quality

Vague docs produce vague answers. Ambiguous docs produce confident wrong ones. Specific, well-structured docs produce accurate ones. No prompt is clever enough to rescue a chunk that never contained the answer.

How Do Humans and AI Read Documentation Differently?

Humans skim non-linearly, jump between sections, infer meaning from experience, and tolerate a fair amount of ambiguity. AI ingests isolated chunks, cannot infer anything you left unwritten, and needs each chunk to carry its own context.

That difference is the whole reason writing for AI and writing for humans turn out to be the same project.

DimensionHuman readerAI system
How it readsSkims and jumps aroundRetrieves isolated chunks by similarity
Missing contextFills gaps from experienceCannot infer what is not written
AmbiguityUsually tolerates itProduces wrong or vague answers
What it needsClarity and flowExplicit, self-contained sections

Each fix on the AI side also helps humans. Clear, self-contained sections are easier for a rushed reader to scan.

Write Descriptive, Question-Style Headings

Headings do double duty. For humans they are navigation. For AI they are labels that tell the model what each section contains.

Most docs use headings like "Overview," "Getting Started," or "Additional Information." Those tell the AI almost nothing. When a customer asks "How do I connect my Slack integration?", the model scans headings for a match, and "Additional Information" will never match that query. "How to Connect the Slack Integration" will.

The test is simple: if someone typed your heading into a search bar, would it match what they are looking for? Strong headings read like the questions customers ask.

  • Weak: Setup, Configuration, Advanced Settings
  • Strong: How to Install the Chrome Extension, How to Configure SSO for Your Team, How to Set Custom Notification Rules

Hierarchy matters as well. The H1 is the article topic, H2s are the main sections, and H3s are sub-steps under each H2. Clean hierarchy helps the model keep a heading attached to its explanation when it chunks the page.

Two traps catch a lot of teams. First, avoid time-relative words like "new," "recently added," or "latest," because retrieval systems are not time-aware and cannot tell what "latest" means.

Write "What Changed in Version 4.2 (March 2025)" instead of "What's New in Our Latest Release." Second, avoid duplicate titles across articles.

Two guides both called "How to Set Up the Integration" give the model no way to tell them apart. Name one for Slack and the other for Zapier.

Keep One Topic per Section

Teams try to be efficient by packing related tasks into one section. The result is an "Account Settings" heading that covers passwords, billing, team permissions, and two-factor authentication all at once. Four topics, one section.

For a human skimming, that is mildly annoying. For AI, it is a real problem. When the model chunks that section and a customer asks about two-factor authentication, the retrieved chunk drags along billing details that have nothing to do with the question. The answer either blends in the noise or comes back vague because the signal got diluted.

The fix is to split one bloated section into four clean ones, each with its own heading, each answering a single question. This does not mean your articles get shorter. A 2,000-word article with ten tight sections is far more useful to both readers than a 500-word article with two crammed ones.

If you want the AI reading your docs to also draft new ones cleanly, this is the structure Helply's AI knowledge base is built around: one topic, one answer, per article.

Make Every Section Stand on Its Own

This is the single highest-impact change you can make, and most docs get it wrong.

An article opens with context in the intro: "This guide assumes you have already installed the Chrome extension and connected your account." Three sections down, it says "Click the icon in your toolbar to begin recording."

A human who read from the top knows which icon. But the AI may retrieve only that one section, with no intro attached. Asked "How do I start recording?", it returns "Click the icon in your toolbar" with no mention of which icon, which toolbar, or what to install first. The answer is technically correct and useless in practice.

The fix is to restate just enough context at the start of each section. Not the whole article, only what the section needs to make sense alone.

  • Before: "Click the icon in your toolbar to begin recording."
  • After: "Once the browser extension is installed, click the recorder icon in your toolbar to begin recording."

One extra clause turns a confusing fragment into a complete answer. The human barely notices the repetition, and the AI now has everything it needs.

Keep a constraint next to the thing it constrains. If tokens expire after 24 hours, write that fact in the same paragraph as the login-flow instructions, not three paragraphs earlier.

Chunk boundaries are unpredictable, so the closer two related facts sit, the more likely they stay together after the split. This also rescues humans who land mid-article from a Google result or a deep link, since they did not start at the top either.

Write Short, Direct Sentences

Long sentences hurt both readers, in different ways. For humans, a 40-word sentence increases cognitive load, and by the end they have forgotten the start. For AI, a sentence stuffed with clauses and conditions raises the odds the model grabs the wrong part.

  • Before: "If you're an admin on the Business plan or higher and you've enabled SSO through your identity provider, you can manage team member access by navigating to Settings, then Security, then clicking Manage SSO, where you'll find options to add or remove users and set role-based permissions."
  • After: "This feature is available to admins on the Business plan or higher. First, make sure SSO is enabled through your identity provider. Then go to Settings > Security > Manage SSO. From there, add or remove users. You can also set role-based permissions for each user."

Same information, five sentences instead of one, each carrying a single idea. Both readers move faster.

Write More Content, Not Less

Short sentences and more content are not opposites. Short sentences keep each idea clear. Detailed content covers more of what customers ask.

Chatbots are conversational, and B2B customers are knowledgeable, so they rarely stop at the first question. Someone setting up SSO will follow up with

"Which identity providers do you support?", "Does it work with SAML and OIDC?", "What happens when a session expires?", and "Can I enforce SSO for some teams but not others?"

If your article only covers the basic setup, the bot answers the first question and then stalls. It either invents an answer or admits it does not know. Either way, confidence in self-service drops.

The old instinct was to keep docs short, which made sense when the only reader was a human skimming for one answer.

AI needs substance to work with. Every edge case, every "what if," and every reason behind a design decision is a follow-up question waiting to be asked. Write them down. Those details let AI answer the follow-ups, which is where a thin article gives up.

Once the docs support it, AI can carry most of that conversation.

Request access to see how far.

Use Consistent Terminology

This causes more AI failures than teams expect. Say your product has a feature called "Workspaces." The getting-started guide calls it "Workspaces," the API docs call it "Projects," and the FAQ calls it "Environments." A human infers that these are the same thing. AI does not.

When a customer asks "How do I create a new Workspace?", the model searches for content matching "Workspace." It finds the getting-started guide and misses the API docs and the FAQ, because those chunks never contain the word.

There is a deeper version of this: if a feature name does not literally appear in a chunk, that chunk may not be retrieved for questions that use the name, even when it holds the exact answer.

The fix is a naming decision. Agree on one name for each feature, concept, and action, then use it everywhere: every article, every tooltip, every UI label. A shared glossary of 20 to 30 core terms is enough. A plain list works, as long as the team sticks to it.

Remove Ambiguity From Your Writing

Pronouns and vague references feel natural in conversation. In a chunk pulled out of context, they fall apart. Take "After configuring the integration, test it to make sure it's working."

What does "it" refer to? The integration, the configuration, or the connection? A human guesses right. The AI might not.

The problem gets worse when the referent lives in another section.

  • Section A: "Go to Integrations and click Add New. Select Slack from the list."
  • Section B: "Once it's connected, you can customize the notification settings."

If retrieval returns only Section B, "it" has no referent. The model does not know what is connected. Rewrite Section B to stand alone: "Once the Slack integration is connected, you can customize the notification settings in the Integrations panel."

The rule: if replacing a pronoun with a specific noun makes the sentence clearer on its own, make the swap.

Add FAQs to the End of Each Article

FAQs are an underrated way to improve chatbot accuracy, and a lot of writers resist them because they feel like duplicate content. The FAQs that matter here are not duplicates. They cover the edge cases and follow-up questions the article body does not.

They work because of how retrieval matches. A customer's prompt is almost always a question: "Can I use SSO with Google Workspace?" or "What happens if I delete a team member?" A question-and-answer pair scores higher on semantic similarity to that prompt than the same answer buried inside a paragraph. The chatbot is more likely to find it and quote it cleanly.

Source these from the people who hear the real questions. Your support team fields the same edge cases every week. Sales knows the objections that come up in demos. Customer success knows the "gotcha" moments that trip up new users. Two rules keep it effective:

  • Keep FAQs attached to their specific article. One giant FAQ page with 200 pairs across 50 topics chunks badly and pulls irrelevant answers. Aim for three to eight per article, all on that article's topic.
  • Refresh them monthly. Pull new questions from your support inbox and chatbot logs. The questions customers ask evolve, and finding those gaps is exactly what Helply's Article Creation and KB gap detection are built to surface.

Add Metadata to Every Page

Metadata is invisible to humans and decisive for AI. It is the layer that tells a system what a page is about before it reads a word of the body.

At minimum, every documentation page needs a few things:

  • A descriptive title. Not "Getting Started" but "Getting Started with Team Onboarding." Include the feature and the action.
  • A meta description. One or two sentences summarizing the page. AI uses it to judge relevance before pulling content.
  • Tags or categories. These cluster related content, so the model can pull from the right group when a customer asks an integrations question.
  • A last-updated date. Recency gets weighed by both AI systems and humans deciding whether to trust the page.
  • Version or plan tags. Labeling content "Business plan" or "v2.0" helps the model serve the right answer to the right customer.

The common mechanism for this is YAML frontmatter at the top of each file.

Without metadata, AI is picking a book off a shelf with no title, no table of contents, and no chapter headings. It can still read the words. It just cannot tell if they are relevant.

Fix Your Tables, or Replace Them

Tables cause a surprising number of chatbot failures, for three reasons.

First, symbols. Many teams use checkmarks and crosses in comparison tables. Humans read them instantly, but when AI preprocesses the table into text, those symbols get stripped or misread, and a cross can flip into a positive.

The fix is plain text: "Yes" and "No," or "Available" and "Not available." If you must use symbols, add a legend right below the table so it chunks alongside the data.

Second, empty cells. A blank cell is ambiguous. The model cannot tell whether the feature is unavailable, not applicable, or just never filled in. Fill every cell: "No," "Not applicable," or "Coming soon." Never leave one empty.

Third, size. A 30-row, 8-column table looks thorough on a web page, but the relationships between headers and values break down once it is chunked into text. Break big tables into smaller ones grouped by category, each with its own heading.

AWS's prescriptive guidance on writing for RAG goes further: avoid tables where you can, and format the same information as flat bulleted lists instead. Because most documents are read left to right, a flat list keeps each item's context intact after chunking. A table forces the model to track a second dimension it often loses. For complex comparisons, a per-item list is the safer default.

Format for Both Audiences

A few formatting choices look fine to humans but break AI processing. Fix these:

  • Add alt text to every image. AI cannot see a screenshot. "Screenshot of the Settings page with the SSO toggle highlighted" gives the model the context the picture was carrying. (The images in this article follow the same rule.)
  • Write descriptive link text. "Click here" tells AI nothing about the destination. "Learn how to set up SSO for your team" tells both readers exactly what to expect.
  • Keep tables simple. No merged cells or nested headers. They lose their structure when processed as text.
  • Do not hide content behind toggles or accordions. Some systems cannot reach content inside collapsible elements. If it matters, put it in the page body.
  • Put code in fenced code blocks. AI sometimes confuses code for prose. Fencing signals where an example starts and ends so the model preserves it correctly.

Make Your Docs Easy for AI to Fetch

Getting the text in front of the AI is a separate problem, and the one most teams skip. By GitBook's 2025 platform data, AI systems went from under 10% of documentation readers in early 2025 to more than 40% by year end.

Start with format. Clean HTML or Markdown is far easier to parse than a PDF, whose visual layout scrambles machine reading. Avoid pages that only render through JavaScript, since some crawlers get an empty shell.

Use meaningful URLs, like /docs/setup-webhooks rather than /docs/page12345, because the URL itself is a context signal.

Then there is llms.txt. It is a Markdown file placed at the root of your domain that maps your most important docs for AI tools. Answer.AI's Jeremy Howard proposed it in September 2024, and GitBook's overview of llms.txt explains it in plain terms. Some IDE and agent tools do look for it. It is worth generating if your docs platform produces it automatically.

Be realistic, though. Adoption is still uneven, AI crawlers do not all treat the file the same way, and it does not replace clean content, good structure, or a real sitemap.

GitBook, which generates the file automatically for its users, is candid that llms.txt will not fix weak documentation on its own. Treat it as a low-cost addition, not a cure. Get the writing right first. llms.txt is a bonus on top of that.

Documentation for Agentic AI, Not Just Answers

The next reader acts on your docs. Agentic systems reset configurations, call APIs, and complete multi-step workflows on a customer's behalf. Gartner predicts that by 2029, agentic AI will autonomously resolve 80% of common customer service issues without human intervention, which it ties to a 30% reduction in operational costs. Docs are the instructions those agents follow.

Agents need more than clean prose. They need the things a human could otherwise infer:

  • Explicit prerequisites. State what must be true before a task starts, inside the task, not in a separate setup page.
  • Clear constraints and limits. Rate limits, plan restrictions, and expiry windows should be written where the action is described.
  • Exact error messages with solutions. Customers and agents search using the literal error text, so quote it verbatim next to the fix.
  • Precise API and tool descriptions. If an agent can call a tool, the parameters and behavior have to be documented exactly, or it will call it wrong.

Broad context helps too. Protocols like MCP (Model Context Protocol) let agents pull from many sources at once, but that only works when each source is explicit and unambiguous on its own.

How to Test Whether Your Docs Work for AI

You do not have to guess whether your docs are AI-ready. Run this loop:

  1. Prompt your own content. Paste real support questions into your chatbot or AI agent and compare each answer against the source article. Wrong or vague answers point straight at the weak sections.
  2. Read a chunk in isolation. Copy one section, strip the surrounding article, and see if it still makes sense. If it does not, it needs more context.
  3. Run a readability tool. Hemingway or Grammarly will catch the long, passive, multi-clause sentences that trip up both readers.
  4. Mine your logs. Chatbot transcripts and coverage gaps show the exact questions that get "I don't know" or a wrong answer. Those are your priority fixes.
  5. Fix, then retest. Rewrite the weak section, re-run the same question, and confirm the answer improved.

The log-mining step is where tooling earns its keep. Instead of reading every transcript by hand, Helply's Support Intelligence lets you query your whole support history in plain language to find where customers get stuck.

Why This Matters for Your B2B Knowledge Base

In B2B support, volume is lower, but every ticket is tied to a named account, and the customers are technical enough to notice a wrong answer. A bad answer here dents the trust of an account worth six or seven figures in ARR.

That makes documentation quality the input that decides whether AI helps or hurts. Clean, self-contained docs let the AI resolve tickets on its ow, draft accurate replies with full account context, and answer the follow-ups a knowledgeable customer will always ask. Messy docs send the customer to a dead end, then to a human, and you pay for both.

The teams getting the most out of AI support have the cleanest docs.

Tamas Deak, founder of Kameleo

"Keeping our docs accurate used to be a constant struggle, with no way to measure impact. Helply changed all of that overnight."

The bot is only as good as the content it pulls from. Clean documentation turns support into a revenue engine instead of a cost center.

How Helply Turns Clean Docs Into Resolved Tickets

Applying all of this across hundreds of articles is real work, and most teams do not have a technical writer who also understands retrieval. That gap is what the Helply knowledge base is built to close.

  • Article Creation and the AI Recorder. When five customers ask the same question, Helply flags it and drafts the article from your team's previous replies. It arrives already structured into clean, self-contained sections. Record a screen walkthrough once and it becomes a captioned, searchable guide. Articles run $2.99 each, and you review before anything publishes.
  • KB gap detection. Helply surfaces exactly where docs are missing, with a ticket count and the revenue at risk, at $0.50 per gap identified. Those gaps are precisely where AI is most likely to hallucinate, because there is nothing to pull from. You stop guessing what to write next.
  • The payoff. Every published article feeds the AI that resolves tickets, drafts replies, and answers questions across your support history. Better docs mean more outcomes, and Helply charges only when an outcome lands, on a free support platform with unlimited seats. You can see the full model on the outcome pricing page.

If your docs are not ready for both readers yet, the fastest path is to fix your highest-traffic articles first, then let the system catch the rest.

Write Once, for Both Readers

The habits that make AI accurate are the same ones that make docs better for people: self-contained sections, descriptive headings, one topic at a time, consistent terms, and clean delivery.

Write that way, and one page serves the customer skimming for an answer and the AI answering on their behalf. Soon agents will act on those docs, and clean writing will decide whether they act correctly.

You do not have to fix every article by hand. Helply drafts structured, self-contained articles from your team's existing replies and flags the gaps where AI has nothing to pull from.

It then resolves tickets from those docs at $0.50 each, on a support platform that stays free.

FAQ

Why does my AI chatbot give wrong answers from my own documentation?

Usually because it retrieved an isolated chunk that was vague, ambiguous, or missing context, which is a content problem you fix with cleaner, self-contained docs rather than a better bot.

What is RAG and how does it use my docs?

RAG (Retrieval-Augmented Generation) splits your knowledge base into chunks, retrieves the ones most similar to a user's question, and generates an answer from only those chunks.

What is llms.txt and do I need it?

It is a Markdown file that maps your key docs for AI tools; it is worth adding if your platform generates it automatically, but adoption is still limited, so it is a nice-to-have, not a fix for messy content.

How long should AI-friendly documentation be?

Long enough to answer the follow-up questions customers ask a chatbot, so favor covering edge cases and "what ifs" over keeping articles short.

Does writing for AI make my docs worse for humans?

No, because descriptive headings, short sentences, consistent terms, and self-contained sections improve the experience for human readers and AI at the same time.

How do I test whether my documentation works for AI?

Prompt your own content with real support questions, read chunks in isolation, run a readability tool, and mine your chatbot logs for wrong or "I don't know" answers.

SHARE THIS ARTICLE

Turn AI support into a
revenue engine.

Learn more about a Helply demo