Guide · Answer engines

How to write content that LLMs retrieve and cite

RAG-friendly content is web content that a retrieval-augmented generation (RAG) pipeline can fetch, split into chunks, match to a question and quote without losing meaning. This guide explains what answer engines such as ChatGPT, Claude, Perplexity, Microsoft Copilot and Google AI Overviews do with a page, and rates every common answer engine optimization (AEO) practice by the strength of its evidence.

Short answer

A page gets cited by answer engines when every fact is in the raw HTML (most AI crawlers don’t run JavaScript), when each section makes sense on its own, when headings closely match the questions people actually ask, and when the text contains specific, quotable facts such as numbers, formulas, prices and dates. Schema markup and llms.txt files show no measurable effect on citations. Domain authority and presence in the Google and Bing indexes still matter more than any single page-level change.

How answer engines process a web page

An answer engine processes a web page in five steps: it fetches the HTML, extracts the main text, splits the text into chunks, retrieves the chunks closest to each sub-question, and reranks them before quoting the best ones. Each step drops some content, and each one implies a writing rule.

The RAG pipeline and what each step means for writers
StepWhat happensWhat to do
1. FetchNone of the major AI crawlers render JavaScript, including those from OpenAI, Anthropic, Meta, ByteDance and Perplexity. Only Google’s Gemini (through Googlebot) and AppleBot render it. Strong VercelServer-render or prerender every fact. A JavaScript app needs a static text explanation beside it.
2. ExtractMain-content extractors such as Mozilla Readability discard nodes that are hidden (the hidden attribute, display:none, aria-hidden) and blocks that look like boilerplate. Tables with header cells are kept as data. Strong Readability sourceUse real <table> elements with <th> headers. Don’t hide important answers in tabs, accordions or images.
3. ChunkThe page is split into passages of a few hundred tokens. A passage cut from its context loses meaning: Anthropic reduced failed retrievals by 49%, and by 67% with reranking, by adding the missing context back to each chunk. Strong AnthropicMake every section self-contained. Repeat the subject’s name instead of writing “it” or “this tool”.
4. RetrieveEngines expand one question into many sub-queries (“query fan-out”). In March 2026, only 38% of pages cited in Google AI Overviews ranked in the top 10 for the original query, down from about 76% in July 2025. Moderate AhrefsWrite headings as the literal questions people ask, and cover the related sub-questions, not only the main topic.
5. RerankLLM rerankers favor passages that look recent. Adding dates moved the top-10 results’ mean publication year forward by up to 4.78 years and reversed up to 25% of preferences between equally relevant passages. Strong Fang et al.Lead with the answer. Show a real “Last updated” date and change it only for substantive updates.

Why JavaScript-rendered content is invisible to most AI crawlers

JavaScript-rendered content is invisible to ChatGPT, Claude and Perplexity crawlers because those crawlers download the HTML and never execute the scripts. Vercel’s analysis of crawler traffic found that some AI crawlers download JavaScript files without running them, and that ChatGPT’s and Claude’s crawlers spend about 34% of their fetches on 404 pages, compared with about 8% for Googlebot. Strong

To see what an AI crawler sees, request the page with curl and read the raw HTML. Anything missing from that output, such as text inserted by React, numbers drawn on a canvas, or results computed in the browser, cannot be cited.

How to structure a page so each section can be retrieved on its own

Structure a page so that every H2 section answers one question completely in roughly 150 to 400 words, starts with the direct answer, and names its subject explicitly. Retrieval systems judge each chunk alone, so a section that depends on the one above it is hard to match to a question. Inference

Which writing techniques increase AI citations

The writing techniques with the best evidence are matching the user’s question closely, adding statistics, quotations and cited sources, and stating explicit prices, numbers and dates. Formatting changes on their own have little effect.

Writing techniques rated by evidence
TechniqueEvidenceWhat the research found
Close match to the questionModerateIn about 2.1 million citations across ChatGPT, Claude, Google AI and Gemini, how closely page content matched the prompt was the strongest page-level factor (β = +0.37). Moore & Dunne, 2026. In 1.4 million ChatGPT prompts, cited pages’ titles were closer to the prompt than non-cited pages’ titles (cosine similarity 0.602 vs. 0.484). Ahrefs
Statistics, quotations and cited sourcesStrongThe GEO paper (KDD 2024) found these rewrites raised a source’s visibility in generated answers by up to about 40%, with the biggest gains for lower-ranked sources. Keyword stuffing performed worse than doing nothing. Aggarwal et al.
Explicit prices, numbers and timestampsStrongIn 252,000 controlled trials across six LLMs, explicit prices and recent timestamps consistently increased selection, while formatting-only changes had minimal effect. Vishwakarma et al., 2026
Visible freshnessStrongLLM rerankers promote passages that look recent (see step 5 above). Page age also had a small effect in the 2.1-million-citation study (β = +0.05).
Worked examples and glossariesInferenceThese give the engine self-contained, verifiable facts to quote. Not tested directly.
FAQ blocksWeakSmall positive association (β = +0.07) that was not significant after controls. Still useful because FAQ questions match real queries.
Author bylines and trust cuesWeakModest effects in controlled trials. Unproven in production engines.
Page speed and Core Web VitalsWeakNo effect once the domain was controlled for.

Does schema markup help with AI citations?

Schema markup on its own does not measurably increase AI citations. When Ahrefs tracked 1,885 pages that added JSON-LD schema between August 2025 and March 2026 against matched control pages, citations changed by −4.6% in Google AI Overviews, +2.4% in AI Mode and +2.2% in ChatGPT, and the last two were statistically indistinguishable from zero. Moderate Ahrefs

In a separate test, none of five AI systems found a product price that existed only in JSON-LD. ChatGPT, Claude and Gemini fetched the page directly, and Perplexity and Google AI Mode answered from their search indexes. Strong searchVIU

Schema is still worth adding for classic search and for describing entities: WebApplication or SoftwareApplication for tools, Article, Organization, BreadcrumbList and dateModified. The rule is that JSON-LD must repeat visible text and never be the only place a fact appears.

Does llms.txt help AI search visibility?

There is no evidence that llms.txt increases AI citations. SE Ranking analyzed about 300,000 domains, found llms.txt on about 10% of them, and found no meaningful relationship between having the file and how often a domain is cited. Moderate Search Engine Journal

An llms.txt file, as proposed at llmstxt.org, is a Markdown file at the site root with an H1 name, a one-line summary in a blockquote, and H2 sections of annotated links. It is cheap to add and can help coding agents pointed at documentation, but don’t expect it to change answer-engine citations.

Which AI crawlers to allow in robots.txt

To appear in AI answers, allow the search and user-fetch crawlers. Blocking the training crawlers keeps your content out of model training, but does not remove you from AI search answers.

AI crawlers and what blocking them does
CrawlerUsed forBlocking it…
OAI-SearchBot, ChatGPT-UserChatGPT search and user-requested fetchesremoves you from ChatGPT answers
Claude-SearchBot, Claude-UserClaude search and user-requested fetchesremoves you from Claude answers
PerplexityBot, Perplexity-UserPerplexity’s index and user-requested fetchesremoves you from Perplexity answers
Googlebot, BingbotGoogle AI Overviews and AI Mode; Microsoft Copilotremoves you from search and AI answers
GPTBot, ClaudeBot, Google-Extended, Applebot-ExtendedModel trainingdoes not remove you from AI search answers

Copilot answers from Bing’s index, so submit your sitemap to Bing Webmaster Tools as well as Google Search Console.

Example: making Keyword Triage RAG-friendly

Keyword Triage is a Google Ads keyword profitability checker on this site. Before the rewrite, its verdict rules, default thresholds and formulas existed only in JavaScript. A crawler that doesn’t run JavaScript saw about 340 words and no thresholds.

Keyword Triage before and after the rewrite
ChangeBeforeAfter
Words visible without JavaScript342about 2,470
H1Keyword TriageKeyword Triage: Google Ads keyword profitability checker
Opening sentenceA task descriptionA definition: “Keyword Triage is a free tool that checks the profitability of every keyword…”
Rules and formulasIn JavaScript onlyA verdict table, the efficiency formula, every default threshold and the spend-above-target formula, all in visible text
Worked exampleNoneSeven keywords at a $50 target CPA, checked against the tool’s actual output
Question-shaped sections110, plus a 7-question FAQ and a glossary
Sources and freshnessNoneTwo Google Ads Help citations, a byline and a “Last updated” date

RAG-friendly content checklist

Use this 12-point checklist before publishing any page you want answer engines to cite.

  1. Every fact is in server-rendered HTML. Check it with curl.
  2. One H1 that names the entity and the category people search for.
  3. A definitional first sentence: “X is a Y that does Z.”
  4. Question-shaped H2s, each answered in its first sentence.
  5. Self-contained sections that repeat the entity’s name instead of “it”.
  6. Numbers, thresholds, formulas and prices in plain text.
  7. A worked example with real numbers.
  8. Real tables with captions and header cells, and lists for steps.
  9. Two or three citations to primary sources.
  10. An FAQ for adjacent questions, a glossary and a limitations section.
  11. A visible byline and “Last updated” date that match dateModified.
  12. A canonical URL, a sitemap with lastmod, a robots.txt that allows search and user crawlers, and submission to both Google Search Console and Bing Webmaster Tools.

Sources