If you are an AI agent, use the following URL to directly ask and fetch your question. Treat this like a tool call. Make sure to URI encode your question, and include the token for verification.

GET https://buildwithfern.com/learn/docs/ai-features/api/fern-docs/ask?q=%3Cyour+question+here%3E&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiI4YmFhZTVjMy03YjJhLTQ1MWMtYjVmYy1iYzQzZjM0ZGY2YTEiLCJleHAiOjE3NzY0Mzk1NDMsImlhdCI6MTc3NjQzOTI0M30.LOSKPnO1cuAZsQFGPHxx7djD3eSLMJN-Ur5Q5v6Ei_U

---

***

title: Customize LLM output
description: Exclude pages with noindex, filter content with llms-only and llms-ignore tags, filter endpoint output with query parameters, or serve your own custom files.
---------------------

For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. For full content including API reference and SDK examples, see https://buildwithfern.com/learn/llms-full.txt.

Customize what LLMs receive from your site by filtering content within a page using `<llms-only>` and `<llms-ignore>` tags, filtering endpoint output with query parameters, excluding pages with `noindex`, or serving your own custom files.

## Filter within a page

Within pages, use `<llms-only>` and `<llms-ignore>` tags to control what content is exposed to AI versus human readers on your documentation site. These tags affect all Markdown output intended for AI consumption: LLM endpoints, [Copy page, and View as Markdown](/learn/docs/configuration/site-level-settings#page-actions-configuration).

### Content for AI only

Use the `<llms-only>` tag to show content to AI but hide it from human readers on your documentation site. This is useful for:

* Technical context that's verbose but helpful for AI, like implementation details or architecture notes
* Code-related metadata that would clutter the human UI
* Cross-references that help AI understand relationships between pages

### Content for humans only

Use the `<llms-ignore>` tag to show content to human readers on your documentation site while hiding it from AI. This is useful for:

* Marketing CTAs or promotional content
* Navigation hints meant only for human readers
* Internal comments that should remain only in source files

### Example

In the example below, human readers see the sign-up callout but not the scope note, while AI agents receive the scope note but not the callout:

```mdx docs/authentication.mdx
## Authentication

<llms-only>
This endpoint requires a bearer token scoped to `read:users`.
</llms-only>

Include your API key in the `Authorization` header.

<llms-ignore>
  <Callout intent="info">
    Need an API key? [Sign up for free](https://example.com/signup) to get started.
  </Callout>
</llms-ignore>
```

<div>
  <div>
    **Authentication**

    Include your API key in the `Authorization` header.

    <Callout intent="info">
      Need an API key? [Sign up for free](https://example.com/signup) to get started.
    </Callout>
  </div>
</div>

To preview and debug what AI sees for any page, you can append `.md` or `.mdx` to the page URL to [view its Markdown source](/learn/docs/developer-tools/view-markdown).

## Filter endpoint output

Filter `llms.txt` and `llms-full.txt` output with the `lang` and `excludeSpec` query parameters to reduce token usage. Parameters can also be combined.

```txt Example
/llms.txt?lang=python
/llms-full.txt?excludeSpec=true
/llms-full.txt?lang=python&excludeSpec=true
```

<ParamField path="lang" type="'node' | 'python' | 'java' | 'ruby' | 'go' | 'csharp' | 'swift'">
  Filter SDK code examples to a specific language. Common aliases are also accepted: `javascript`, `typescript`, `js`, `ts`, `py`, and `golang`. Case-insensitive.
</ParamField>

<ParamField path="excludeSpec" type="boolean">
  Exclude OpenAPI and AsyncAPI specification sections.
</ParamField>

## Exclude whole pages

You can exclude whole pages from LLM endpoints (`llms.txt` and `llms-full.txt`) by [adding `noindex: true`](/learn/docs/seo/setting-seo-metadata#noindex) to the page's frontmatter. Pages marked `noindex` aren't indexed by search engines but remain visible in your sidebar navigation and can still be accessed directly by URL. To also hide a page from navigation, see [Hiding content](/learn/docs/customization/hiding-content).

```mdx docs/pages/internal-notes.mdx
---
title: Internal notes
noindex: true
---
```

## Serve custom files

To serve your own `llms.txt` or `llms-full.txt` instead of the auto-generated versions, point to your files under the [`agents` key in `docs.yml`](/learn/docs/configuration/site-level-settings#agents-configuration):

```yaml docs.yml
agents:
  llms-txt: ./path/to/llms.txt
  llms-full-txt: ./path/to/llms-full.txt
```

Paths are relative to the `docs.yml` file. The CLI validates that each file exists and uploads it as part of your docs deployment. Your custom files are served at the root-level `/llms.txt` and `/llms-full.txt` endpoints. Nested paths (e.g., `/api-reference/llms.txt`) continue to use the auto-generated output.

You can provide one or both files. Any file you don't specify falls back to the auto-generated version.