# Configuring the use of AI features

On a self-hosted Structural instance, before you can use AI features, you must [connect to an LLM](https://docs.tonic.ai/app/admin/structural-ai-use/connecting-a-self-hosted-instance-to-an-llm).

## Excluding sample data from LLM-based sensitivity detection <a href="#llm-detection-exclude-sample-data" id="llm-detection-exclude-sample-data"></a>

By default, LLM-based sensitivity detection sends both the database schema and sample source data values to the LLM.

To exclude the contextual source data, and only send the schema, set the [environment setting](https://docs.tonic.ai/app/admin/environment-variables-setting) `TONIC_LLM_ENABLE_ENHANCED_RECOMMENDATIONS_SAMPLE_DATA` to false.

* For a self-hosted instance, you can set this from the **Environment Settings** tab on **Structural Settings**.
* For a Cloud organization, you set this from the **Organization Settings** tab on **Structural Settings**.

## Setting whether a workspace uses LLM-based sensitivity detection

On Structural Cloud, and on self-hosted instances that [set up a connection to an LLM](https://docs.tonic.ai/app/admin/structural-ai-use/connecting-a-self-hosted-instance-to-an-llm), LLM-based sensitivity detection is enabled by default.

You can disable LLM-based sensitivity detection within individual workspaces.

To do this, in the [advanced workspace overrides](https://docs.tonic.ai/app/workspace/managing-workspaces/workspace-configuration-settings/advanced-overrides), set `TONIC_LLM_ENABLE_ENHANCED_RECOMMENDATIONS` to `false`.
