Skip to main content

Atoti Intelligence Essentials

This is part of the Atoti Intelligence Essentials offer.
This guide explains how to enable Auto-Explain in an Atoti Python project.
Auto-Explain does not require an LLM to function. The root-cause analysis, contribution percentages, and contribution tables are produced by a deterministic algorithm and are always available without any AI provider configured.An LLM is only required if the optional AI summary is needed. To enable AI summaries, configure an LLM provider. See Set up an LLM.

Prerequisites

Before setting up Auto-Explain, ensure the following requirements are met:
  • An Atoti Python project
  • A license with the AI flag enabled

Install the package

Install the Atoti AI package:
uv add "atoti[ai]"

Enable Auto-Explain

Pass an AiConfig to SessionConfig when starting the session. Auto-Explain works with an empty AiConfig(), so no LLM provider is required:
import atoti as tt
from atoti_ai import AiConfig

with tt.experimental({"ai"}):
    ai_config = AiConfig()

session = tt.Session.start(tt.SessionConfig(ai=ai_config))
Auto-Explain is then available on each cube through Cube.auto_explain.

Configure Auto-Explain

Auto-Explain constants are read and set as attributes of Cube.auto_explain. For the meaning, defaults, and tuning guidance of each constant, see Configure Auto-Explain.
cube = session.cubes["Example"]

cube.auto_explain.max_depth = 5
cube.auto_explain.max_entropy = 0.5

# Restrict analysis to specific hierarchies
h = cube.hierarchies
cube.auto_explain.excluded_hierarchies = {h["Time"]}
Per-measure overrides are also available through excluded_hierarchies_per_measure and included_hierarchies_per_measure, keyed by measure name — the Python equivalent of the Java excluded-measure-hierarchies / included-measure-hierarchies configuration.

Verify the setup

After enabling Auto-Explain, verify that it is available:
  1. Start the Atoti session.
  2. Open the Atoti UI.
  3. Right-click two cells in a pivot table.
  4. Check that the Auto-Explain option appears in the context menu.