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

# Set up Auto-Explain in Java

> How to add the Auto-Explain Spring Boot starter to an Atoti Java project, verify it in the Atoti UI, and configure it in `application.yaml`.

<Info>
  ### Atoti Intelligence Essentials

  This is part of the Atoti Intelligence Essentials offer.
</Info>

This guide explains how to add Auto-Explain to an Atoti Java project.

<Note>
  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 after completing this setup. See [Set up an LLM](../configure-and-start/set-up-an-llm) for instructions.
</Note>

## Prerequisites

Before setting up Auto-Explain, ensure the following requirements are met:

* A Java project
* A license with the AI flag enabled
* Maven or Gradle build system

## Add the dependency

Add the Auto-Explain Spring Boot starter to the project.

Add the following to `pom.xml`:

<SnippetRanchPomStarterAiAutoexplain />

## Verify the setup

After adding the dependency, verify that Auto-Explain is available:

1. Build the project.
2. Start the Atoti application.
3. Open the Atoti UI.
4. Right-click two cells in a pivot table.
5. Check that the Auto-Explain option appears in the context menu.

## Configure Auto-Explain

Add Auto-Explain configuration to the application configuration file. The configuration block is
per-cube and can be repeated to configure multiple cubes.

The following example shows all available configuration options in `application.yaml`:

<SnippetRanchApplicationAutoexplainConfig />

The following table describes the top-level `application.yaml` keys:

| Parameter name                                     | Description                                                                                                                                                                            |
| -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cube-name`                                        | Name of the cube to configure Auto-Explain for.                                                                                                                                        |
| `auto-explain-configuration`                       | Configuration of the parameters of Auto-Explain.                                                                                                                                       |
| `auto-explain-configuration.measure-naming-config` | Lists the measures computed by Auto-Explain and their default names. Default names are shown in the configuration example above. Specify only the measures whose names need to change. |

The `excluded-hierarchies`, `included-hierarchies`, and their per-measure variants control which
hierarchies Auto-Explain analyzes; these apply to both SDKs and are documented in
[Hierarchy inclusion and exclusion](./configuration#hierarchy-inclusion-and-exclusion). The
`constants-config` block controls how the algorithm explores the cube; see
[Configure Auto-Explain](./configuration#how-to-tune-the-constants) for the constants and tuning guidance.

## Related reading

After setting up Auto-Explain, proceed to:

* [How Auto-Explain works](./how-it-works)
* [Configure Auto-Explain](./configuration) to tune the analysis
* [Learn how to use Auto-Explain](../../../user-guide/auto-explain) in the Atoti UI
