> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

# ai_prune_characters - Topics

> Sets the character budget for this topic's AI field context before Omni prunes it to fit.

Sets the number of characters of field metadata (names, descriptions, sample values, synonyms, SQL) the Omni Agent receives for this topic before Omni prunes field details to fit.

If a model-level budget isn't defined with [`ai_settings.topic_prune_characters`](https://docs.omni.co/modeling/models/parameters/ai-settings/topic-prune-characters), the system default of 75,000 characters (roughly 19,000 tokens) is used instead.

## Syntax

```yaml theme={null}
ai_prune_characters: <integer>
```

## Properties

**ai\_prune\_characters** `integer`

The character budget for this topic's AI field context. Must be between 10,000 and 200,000. A value outside this range is a validator error.

## Behavior

Omni warns in the model validator (`topic_ai_context_too_large`) when a topic's estimated AI field context exceeds its effective budget, or when the topic has more than 2,000 fields. Because the context size is an estimate rather than an exact measurement, the warning message describes it as "estimated".

This warning only appears for topics that show AI is actually in use:

* The topic sets `ai_prune_characters`
* [`ai_chat_topics`](https://docs.omni.co/modeling/models/ai-chat-topics) names the topic
* The model sets [`ai_settings.topic_prune_characters`](https://docs.omni.co/modeling/models/parameters/ai-settings/topic-prune-characters), and `ai_chat_topics` doesn't exclude the topic

The autofix option for `topic_ai_context_too_large` won't display if:

* The topic is over the 2,000-field limit, since only [`ai_fields`](https://docs.omni.co/modeling/topics/parameters/ai-fields) reduces the field count
* Raising `ai_prune_characters` to clear the estimate would exceed 200,000

## Examples

```yaml title="Raise the character budget for this topic's AI context" theme={null}
ai_prune_characters: 100000
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.