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

# Configure Visualize This

> How to configure Visualize This -  cube context, dynamic tool discovery, answer streaming and the `atoti.ai.chat.enabled` switch that turns chat off in the Atoti Java SDK, and the chat system prompt in the Atoti Python SDK.

> [!NOTE]
>
> ### Atoti Intelligence Essentials
>
> This is part of the Atoti Intelligence Essentials offer.

Providing context about your cubes improves Visualize This responses: the more the LLM knows about
the business meaning of cubes, dimensions, hierarchies, levels, and measures, the more relevant the
visualizations it produces. Configuration is optional but recommended.

> [!NOTE]
>
> ### Prerequisites
>
> Visualize This must be enabled before adding configuration.
> See [Set up Visualize This in Java](https://docs.activeviam.com/atoti-intelligence/6.2/developer-guide/enable-ai-tools/visualize-this/setup-java.md) or [Set up Visualize This in Python](https://docs.activeviam.com/atoti-intelligence/6.2/developer-guide/enable-ai-tools/visualize-this/setup-python.md)
> for setup instructions.

## Atoti Java SDK

Add Visualize This configuration to the application configuration file.

Add the following to `application.yaml`:

```yaml theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
atoti:
  ai:
    context:
      cubes:
        - name: "cubeName1"
          description: "Description of the cube 1"
          dimensions:
            - name: "dimensionName1"
              description: "description dimension1"
              hierarchies:
                - name: "hierarchyName1"
                  description: "description hierarchy1"
                  levels:
                    - name: "levelName1"
                      description: "description level1"
            - name: "dimensionName2"
              description: "description dimension2"
              hierarchies:
                - name: "hierarchyName2"
                  description: "description hierarchy2"
          measures:
            - name: "measure1"
              description: "description measure1"
            - name: "measure2"
              description: "description measure2"
          measure-folders:
            - name: "folderName1"
              description: "description folder1"
            - name: "folderName2"
              description: "description folder2"
        - name: "cubeName2"
          description: "Description of the cube 2"
          dimensions:
            - name: "dimensionName3"
              hierarchies:
                - name: "hierarchyName3"
                  levels:
                    - name: "levelName3"
                      description: "description level3"
                - name: "hierarchyName4"
                  description: "description hierarchy4"
                  levels:
                    - name: "levelName4"
                      description: "description level4"
            - name: "dimensionName5"
              description: "description dimension4"
          measures:
            - name: "measure3"
              description: "description measure3"
            - name: "measure4"
              description: "description measure4"
          measure-folders:
            - name: "folderName3"
              description: "description folder3"
            - name: "folderName4"
              description: "description folder4"
      system-prompt-paths:
          - "prompts/prompt1.md"
          - "prompts/prompt2.md"
```

### Configuration parameters

The following table describes each configuration parameter:

| Parameter name | Description |
| - | - |
| system-prompt-paths | Ordered list of paths to system prompt files. Files are concatenated in the declared order and appended to the LLM context. |
| name | Name of the cube to configure Visualize This for. |
| description | Description of the cube. |
| dimensions | List of dimensions to provide additional information to the LLM. |
|   name | Name of the dimension. |
|   description | Description of the dimension. |
|   hierarchies | List of hierarchies to provide additional information to the LLM. |
|     name | Name of the hierarchy. |
|     description | Description of the hierarchy. |
|     levels | List of levels to provide additional information to the LLM. |
|       name | Name of the level. |
|       description | Description of the level. |
| measures | List of measures to provide additional information to the LLM. |
|   name | Name of the measure. |
|   description | Description of the measure. |
| measure-folders | List of measure folders to provide additional information to the LLM. |
|   name | Name of the measure folder. |
|   description | Description of the measure folder. |

### Alternative: XMLA\_DESCRIPTION property

Descriptions for dimensions, hierarchies, and levels can also be sourced from the `XMLA_DESCRIPTION`
property set directly on the OLAP element schema definition. When this property is present on an
element, Visualize This reads it as the element's description.

This is useful when descriptions are already defined in the cube schema, and you want to avoid
duplicating them in the application configuration file.

If both `XMLA_DESCRIPTION` and the application configuration file provide a description for the
same element, the two values are concatenated.

> [!NOTE]
>
> The `XMLA_DESCRIPTION` property applies to dimensions, hierarchies, levels, and measures only.
> Cubes and measure folders must be described through the application configuration file.

### Partial configuration

Configuration does not require descriptions for all elements. Provide descriptions only for elements
that need additional context.

## How to turn Visualize This off

An application can serve Atoti Intelligence without serving chat. Setting `atoti.ai.chat.enabled` to
`false`, available from Atoti 6.2.1, registers no chat endpoint:

```yaml theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
atoti:
  ai:
    chat:
      enabled: false
```

The chat endpoints are then absent, and every call to them answers `404 Not Found`. The `/versions`
endpoint stops advertising the `activeviam/ai/chat` namespace, so service discovery no longer offers
chat. The Atoti UI reports chat as absent, and shows no chat panel. The `activeviam/ai` namespace
stays advertised as long as Auto-Explain is enabled. Every other Atoti Intelligence feature keeps
working, Auto-Explain and the MCP server included. The setting defaults to `true`.

> [!NOTE]
>
> Turning chat off differs from configuring no LLM. An application with no LLM keeps advertising the
> `activeviam/ai/chat` namespace, and refuses each call to it with `404 Not Found`. Chat stays
> discoverable there, and starts answering as soon as an LLM is configured.

In the Atoti Python SDK, set
[`AiConfig.chat_enabled`](https://docs.activeviam.com/engine/python-sdk/latest/api/atoti_ai.config.AiConfig)
to `False`:

```python theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
import atoti as tt
import os
from atoti_ai import AiConfig
from atoti_ai_amazon_bedrock import ConnectionConfig, ChatConfig
connection_config = ConnectionConfig(
    aws_access_key=os.environ["AWS_ACCESS_KEY_ID"],
    aws_secret_key=os.environ["AWS_SECRET_ACCESS_KEY"],
    aws_region="eu-west-3",
)
chat_config = ChatConfig(
    model="eu.anthropic.claude-sonnet-4-6",
)
ai_config = AiConfig(
    connection=connection_config,
    chat=chat_config,
    chat_enabled=False,
)
session_config = tt.SessionConfig(ai=ai_config)
```

A session started that way serves no chat, and
[`Session.chat`](https://docs.activeviam.com/engine/python-sdk/latest/api/atoti.Session.chat)
reports chat as absent.

## Dynamic tool discovery

Visualize This can send the LLM every available tool on each request. Alternatively, it can send only
the tools that match the current request. Dynamic tool discovery, available from Atoti 6.2.0, is the
second mode. The model calls a tool-search tool that queries a keyword index and receives only the
matching tools. This reduces prompt token usage and improves tool selection. Atoti enables dynamic
tool discovery by default under the Atoti Intelligence Essentials license. Without that license it
stays off.

> [!NOTE]
>
> Dynamic tool discovery applies to both SDKs, and both can turn it off. Beyond the opt-out, the
> settings described in this section can only be configured through the Atoti Java SDK.

### How to opt out

Turning dynamic tool discovery off sends the whole tool set to the model on every request instead.
This restores the behavior Atoti used before dynamic tool discovery existed. A small tool set, where
search adds no benefit, is one reason to turn it off. Debugging which tools the model can see is
another.

In the Atoti Java SDK, set `spring.ai.chat.client.tool-search-advisor.enabled` to `false`:

```yaml theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
spring:
  ai:
    chat:
      client:
        tool-search-advisor:
          enabled: false
```

In the Atoti Python SDK, set
[`AiConfig.dynamic_tool_discovery`](https://docs.activeviam.com/engine/python-sdk/latest/api/atoti_ai.config.AiConfig)
to `False`:

```python theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
import atoti as tt
import os
from atoti_ai import AiConfig
from atoti_ai_amazon_bedrock import ConnectionConfig, ChatConfig
connection_config = ConnectionConfig(
    aws_access_key=os.environ["AWS_ACCESS_KEY_ID"],
    aws_secret_key=os.environ["AWS_SECRET_ACCESS_KEY"],
    aws_region="eu-west-3",
)
chat_config = ChatConfig(
    model="eu.anthropic.claude-sonnet-4-6",
)
ai_config = AiConfig(
    connection=connection_config,
    chat=chat_config,
    dynamic_tool_discovery=False,
)
session_config = tt.SessionConfig(ai=ai_config)
```

### Atoti defaults

Dynamic tool discovery is Spring AI's tool search advisor, configured under the
`spring.ai.chat.client.tool-search-advisor` prefix. Atoti overrides three of its properties:

| Property | Atoti default |
| - | - |
| `enabled` | `true` under the Atoti Intelligence Essentials license, otherwise Spring AI's `false` |
| `tool-index-type` | `lucene`, whose scoring suits the natural-language queries the model produces |
| `reference-tool-name-accumulation` | `false`, so a follow-up search narrows the tool set rather than widening it |

Every other setting — result limits, session eviction, the tool-search instructions given to the
model — keeps its Spring AI default. See the
[Spring AI documentation](https://docs.spring.io/spring-ai/reference/guides/dynamic-tool-search.html)
for the full list of properties and their behavior.

> [!NOTE]
>
> Atoti does not ship `spring-ai-vector-store`. Add that dependency and a `VectorStore` bean to the
> application before setting `tool-index-type` to `vector`.

## Streaming the answer

Visualize This can send its answer in one piece, once the run ends, or stream it as the model writes
it. Streaming, available from Atoti Intelligence 6.2.3, is off by default: turn it on and the answer
appears in Atoti UI as it is produced, instead of after a pause.

The answer is delivered as AG-UI `TEXT_MESSAGE_CHUNK` events, one per delta, rather than the single
`TEXT_MESSAGE_CONTENT` event a non-streamed answer uses. Everything else about the run is unchanged:
the tool-call events, the run and step lifecycle, and the conversation memory are the same either
way.

In the Atoti Java SDK, set `atoti.ai.context.streaming-enabled` to `true`:

```yaml theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
atoti:
  ai:
    context:
      streaming-enabled: true
```

In the Atoti Python SDK, set
[`AiConfig.streaming`](https://docs.activeviam.com/engine/python-sdk/latest/api/atoti_ai.config.AiConfig#atoti_ai.AiConfig.streaming)
to `True`:

```python theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
import atoti as tt
import os
from atoti_ai import AiConfig
from atoti_ai_amazon_bedrock import ConnectionConfig, ChatConfig
connection_config = ConnectionConfig(
    aws_access_key=os.environ["AWS_ACCESS_KEY_ID"],
    aws_secret_key=os.environ["AWS_SECRET_ACCESS_KEY"],
    aws_region="eu-west-3",
)
chat_config = ChatConfig(
    model="eu.anthropic.claude-sonnet-4-6",
)
ai_config = AiConfig(
    connection=connection_config,
    chat=chat_config,
    streaming=True,
)
session_config = tt.SessionConfig(ai=ai_config)
```

A single request can override the configured default: an AG-UI run whose `forwardedProps` carry a
`streaming` boolean is answered that way regardless of the property.

> [!WARNING]
>
> ### Atoti UI support
>
> Displaying a streamed answer requires Atoti UI 5.2.29 or higher. Earlier versions of the Atoti UI AI
> extension do not accumulate the deltas of a streamed answer: they render each one in place of the
> last, so the answer bubble ends up holding only the final delta. Keep streaming off for applications
> served to an earlier Atoti UI.

### Reasoning traces

A streamed answer can also carry the model's reasoning, delivered as AG-UI `REASONING_*` events ahead
of the answer itself. This is off by default, and only honored while streaming is on. In the Atoti
Java SDK, set `atoti.ai.context.thinking-enabled` to `true`; in the Atoti Python SDK, set
[`AiConfig.thinking`](https://docs.activeviam.com/engine/python-sdk/latest/api/atoti_ai.config.AiConfig#atoti_ai.AiConfig.thinking)
to `True`.

Whether a reasoning trace exists at all is up to the LLM provider:

| Provider | Reasoning traces |
| - | - |
| OpenAI-family models | Streamed alongside the answer |
| Google models | Streamed once the request asks for thoughts, with `spring.ai.google.genai.chat.options.include-thoughts` |
| Amazon Bedrock Converse | Not reported; the setting has no effect and the answer streams as usual |

> [!NOTE]
>
> Reasoning traces are the model's own account of its work. Treat them as explanatory rather than
> authoritative, and consider whether they should be shown to end users at all before turning them on.

### Models that cannot stream

A model whose client has no streaming support answers in one piece instead of failing the run: Atoti
logs a warning the first time it happens and falls back to a single message. Turn
`atoti.ai.context.streaming-enabled` off to stop asking for it.

## Atoti Python SDK

The chat is available on the session through [`Session.chat`](https://docs.activeviam.com/engine/python-sdk/latest/api/atoti.Session.chat). Its [`system_prompt`](https://docs.activeviam.com/engine/python-sdk/latest/api/atoti_ai.Chat.system_prompt) is a custom addition to Atoti's built-in system prompt: it is empty by default, and any value you set is appended to the built-in prompt to give the LLM extra context about your cubes. Reading it queries the server; assigning it takes effect on the next chat run and requires the `ROLE_ADMIN` role.

```python theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
# Add extra context on top of the built-in system prompt
session.chat.system_prompt = "The Quantity measure is expressed in units, not currency."
```

> [!NOTE]
>
> The system prompt is **global**: it applies to every request rather than to a specific cube (the assistant infers which cube a request targets). Use it for overall guidance.
>
> To give the assistant more information about a specific cube, set descriptions on its **measures** and **hierarchies** — for example `cube.measures["Revenue.SUM"].description` and `cube.hierarchies["Product"].description`. The assistant reads these descriptions through its tools. The Java SDK additionally accepts cube, dimension, level, and measure-folder descriptions through `application.yaml`.

### How to stream the answer

[Streaming](#streaming-the-answer) is off by default. Set
[`AiConfig.streaming`](https://docs.activeviam.com/engine/python-sdk/latest/api/atoti_ai.config.AiConfig#atoti_ai.AiConfig.streaming)
to `True` to have the answer appear as the model writes it:

```python theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
import atoti as tt
import os
from atoti_ai import AiConfig
from atoti_ai_amazon_bedrock import ConnectionConfig, ChatConfig
connection_config = ConnectionConfig(
    aws_access_key=os.environ["AWS_ACCESS_KEY_ID"],
    aws_secret_key=os.environ["AWS_SECRET_ACCESS_KEY"],
    aws_region="eu-west-3",
)
chat_config = ChatConfig(
    model="eu.anthropic.claude-sonnet-4-6",
)
ai_config = AiConfig(
    connection=connection_config,
    chat=chat_config,
    streaming=True,
)
session_config = tt.SessionConfig(ai=ai_config)
```

[`AiConfig.thinking`](https://docs.activeviam.com/engine/python-sdk/latest/api/atoti_ai.config.AiConfig#atoti_ai.AiConfig.thinking)
adds the model's reasoning trace to a streamed answer.

### How to serve no chat

Set [`AiConfig.chat_enabled`](https://docs.activeviam.com/engine/python-sdk/latest/api/atoti_ai.config.AiConfig)
to `False` to register no chat endpoint, as described in
[How to turn Visualize This off](#how-to-turn-visualize-this-off).

### How to opt out of dynamic tool discovery

[Dynamic tool discovery](#dynamic-tool-discovery) is on by default. Set
[`AiConfig.dynamic_tool_discovery`](https://docs.activeviam.com/engine/python-sdk/latest/api/atoti_ai.config.AiConfig)
to `False` to send the whole tool set to the model on every request instead:

```python theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
import atoti as tt
import os
from atoti_ai import AiConfig
from atoti_ai_amazon_bedrock import ConnectionConfig, ChatConfig
connection_config = ConnectionConfig(
    aws_access_key=os.environ["AWS_ACCESS_KEY_ID"],
    aws_secret_key=os.environ["AWS_SECRET_ACCESS_KEY"],
    aws_region="eu-west-3",
)
chat_config = ChatConfig(
    model="eu.anthropic.claude-sonnet-4-6",
)
ai_config = AiConfig(
    connection=connection_config,
    chat=chat_config,
    dynamic_tool_discovery=False,
)
session_config = tt.SessionConfig(ai=ai_config)
```

The remaining dynamic tool discovery settings are not exposed in the Atoti Python SDK. Configure
them through the Atoti Java SDK, as described in [Atoti defaults](#atoti-defaults).

## Related reading

* [How Visualize This works](https://docs.activeviam.com/atoti-intelligence/6.2/developer-guide/enable-ai-tools/visualize-this/how-it-works.md)
* [Set up Visualize This in Java](https://docs.activeviam.com/atoti-intelligence/6.2/developer-guide/enable-ai-tools/visualize-this/setup-java.md)
* [Set up Visualize This in Python](https://docs.activeviam.com/atoti-intelligence/6.2/developer-guide/enable-ai-tools/visualize-this/setup-python.md)
* [How to use Visualize This](https://docs.activeviam.com/atoti-intelligence/6.2/user-guide/chat.md) in the Atoti UI
