Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 69 additions & 1 deletion ai-ingestion.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "AI ingestion"
description: "Prepare your documentation for LLMs and AI tools"

Check warning on line 3 in ai-ingestion.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

ai-ingestion.mdx#L3

Did you really mean 'LLMs'?
icon: "bot-message-square"
---

Expand All @@ -12,7 +12,7 @@
)
}

Mintlify generates optimized formats and provides shortcuts that help users get faster, more accurate responses when using your documentation as context for LLMs and AI tools.
Generate optimized formats and provide shortcuts that help users get faster, more accurate responses when using your documentation as context for LLMs and AI tools.

Check warning on line 15 in ai-ingestion.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

ai-ingestion.mdx#L15

Did you really mean 'LLMs'?

## Contextual menu

Expand All @@ -22,6 +22,7 @@
* **View as Markdown**: Opens the current page as Markdown.
* **Open in ChatGPT**: Creates a ChatGPT conversation with the current page as context.
* **Open in Claude**: Creates a Claude conversation with the current page as context.
* [**Your custom options**](#adding-custom-options): Add your own options to the contextual menu.

<Frame>
<img
Expand All @@ -40,13 +41,80 @@
"options": [
"copy",
"view",
"chatgpt",

Check warning on line 44 in ai-ingestion.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

ai-ingestion.mdx#L44

Did you really mean 'chatgpt'?
"claude"

Check warning on line 45 in ai-ingestion.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

ai-ingestion.mdx#L45

Did you really mean 'claude'?
]
}
}
```

### Adding custom options

Create custom options in the contextual menu by adding an object to the `options` array. Each custom option requires these properties:

<ResponseField name="title" type="string" required>
The title of the option.
</ResponseField>

<ResponseField name="description" type="string" required>
The description of the option. Displayed beneath the title when the contextual menu is expanded.
</ResponseField>

<ResponseField name="icon" type="string" required>
The icon of the option. Accepts any icon from the [Icons](/components/icons) collection.
</ResponseField>

<ResponseField name="href" type="string | object" required>
The href of the option. Use a string for simple links or an object for dynamic links with query parameters.

<Expandable title="href object">
<ResponseField name="base" type="string" required>
The base URL for the option.
</ResponseField>

<ResponseField name="query" type="object" required>
The query parameters for the option.

<Expandable title="query object">
<ResponseField name="key" type="string" required>
The query parameter key.
</ResponseField>

<ResponseField name="value" type="string" required>
The query parameter value. Use `$page` to insert the current page content in Markdown or `$path` to insert the current page path.
</ResponseField>
</Expandable>
</ResponseField>
</Expandable>
</ResponseField>

Example custom option:

```json {7-20} Example with Perplexity icon="search"
"contextual": {
"options": [
"copy",
"view",
"chatgpt",
"claude",
{
"title": "Ask Perplexity",
"description": "Ask Perplexity about the current page",
"icon": "search",
"href": {
"base": "https://www.perplexity.ai/search",
"query": [
{
"key": "q",
"value": "Ask question about https://mintlify.com/docs$path.md"
}
]
}
}
]
}
```

## /llms.txt

The [/llms.txt file](https://llmstxt.org) is an industry standard that helps general-purpose LLMs index more efficiently, similar to how a sitemap helps search engines.
Expand Down