Home / Companies / Fern / Blog / Post Details
Content Deep Dive

How to write LLM-friendly documentation in March 2026

Blog post from Fern

Post Details
Company
Date Published
Author
Nathan Lian @ Maintouch
Word Count
1,974
Company Posts That Month
10
Language
English
Hacker News Points
-
Post removed?
No
Summary

Documentation optimized for AI agents significantly enhances the efficiency and accuracy of AI coding assistants like GitHub Copilot and Cursor by serving markdown directly, rather than HTML, which reduces token consumption by over 90%. This approach not only supports AI agents by maintaining structured, machine-readable formats but also retains the full HTML browsing experience for human users. The use of llms.txt files provides a structured index for AI tools, facilitating the automatic retrieval of documentation content, while techniques like content negotiation ensure markdown is served to AI agents without any configuration changes. Implementing controlled visibility with tags like <llms-only> and <llms-ignore>, along with maintaining consistent heading hierarchies, helps AI agents accurately parse and retrieve necessary information, thereby preventing errors like "hallucinations" in generated code. Additionally, the use of machine-readable API specifications ensures type safety and accuracy, with version control systems like Git maintaining synchronization between documentation and API changes, eliminating the risk of AI agents generating outdated or incorrect code.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
AI Agents 37 4,545 963 231 +27%
LLM 32 6,078 960 218 +18%
AI Coding Assistant 9 1,255 319 126 +24%
RAG 2 1,806 326 91 +5%
Developer Experience 1 482 254 106 +18%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.