> ## 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.

# validate_analysis

> Controls whether the AI automatically validates its analysis for errors before returning results.

When enabled, the [Omni Agent](/ai/chat) and [Workbook Agent](/ai/queries) automatically validate their analysis before returning results to users. The AI checks for critical errors such as degenerate pivot results, incorrect date ranges, or hallucinated calculations, and self-corrects issues before the user sees them.

## Syntax

```yaml theme={null}
ai_settings:
  validate_analysis: <enabled | disabled | default>
```

## Properties

<ParamField path="ai_settings" type="object">
  An object that contains various AI settings. See [`ai_settings`](/modeling/models/parameters/ai-settings) for more information.

  <Expandable title="ai_settings properties" defaultOpen="true">
    <ParamField path="validate_analysis" type="string" default="default">
      Controls whether the [Omni Agent](/ai/chat) and [Workbook Agent](/ai/queries) automatically validate their analysis before returning results.

      Must be one of the following:

      * `default` - Uses the default behavior (`disabled`)
      * `disabled` - Validation is never performed
      * `enabled` - Validation is always performed after the AI completes analytical work. When enabled, the AI will:
        * Review its most recent queries and calculations for critical errors
        * Check for common issues such as:
          * Wrong topics selected
          * Incorrect date filters (e.g., period-over-period date ranges)
          * Degenerate calculation results (e.g., all zeros)
          * Hallucinated numbers not supported by the data
          * Malformed pivots or aggregations
        * Automatically fix issues if critical errors are detected
        * Display a validation indicator in the chat interface

      <Note>
        Validation runs automatically at the end of each analytical turn. To prevent infinite loops, validation is limited to a maximum of 2-3 attempts per turn.
      </Note>
    </ParamField>
  </Expandable>
</ParamField>

## Examples

```yaml title="Enable AI analysis validation" theme={null}
ai_settings:
  validate_analysis: enabled
```

```yaml title="Disable AI analysis validation" theme={null}
ai_settings:
  validate_analysis: disabled
```
