> ## Documentation Index
> Fetch the complete documentation index at: https://lightdash-mintlify-ca973f84.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Self-improvement (Beta)

> Enable AI agents to improve your semantic layer automatically

<Warning>
  This feature is currently in Beta. Enable it in your agent settings to start
  testing with your team.
</Warning>

AI agents can now improve your semantic layer by proposing changes to your data models. When enabled, agents can update field descriptions, create new metrics, and refine your data documentation based on conversations and user feedback. All changes are tracked in changesets and can be reviewed or reverted at any time.

## How it works

When self-improvement is enabled, your AI agent can:

1. **Propose changes** to your semantic layer during conversations
2. **Apply changes immediately** to a changeset (batch of changes)
3. **Track all modifications** with full history and attribution
4. **Allow review and rejection** of changes by authorized users

Changes are visible in the chat interface and can be managed through the Project Settings > Changesets page.

<Accordion title="View self-improvement changes in chat">
  <Frame caption="Updating a description of a dimension">
    <img src="https://mintcdn.com/lightdash-mintlify-ca973f84/cHghj5I2wtqMZ-ik/images/guides/ai-agents/self-improvement-chat-1.png?fit=max&auto=format&n=cHghj5I2wtqMZ-ik&q=85&s=bbb1fb8327698f610d4114b14e804ce9" alt="Self-improvement changes in chat updating a description of a dimension" width="2048" height="1172" data-path="images/guides/ai-agents/self-improvement-chat-1.png" />
  </Frame>

  <Frame caption="Creating a custom metric">
    <img src="https://mintcdn.com/lightdash-mintlify-ca973f84/cHghj5I2wtqMZ-ik/images/guides/ai-agents/self-improvement-chat-2.png?fit=max&auto=format&n=cHghj5I2wtqMZ-ik&q=85&s=b747bd449472e751c21f706463cad3e2" alt="Self-improvement changes in chat custom metric" width="1304" height="836" data-path="images/guides/ai-agents/self-improvement-chat-2.png" />
  </Frame>
</Accordion>

## What agents can improve

**Update descriptions** for better documentation:

* Explore descriptions to clarify data sources and use cases
* Metric descriptions to explain calculations and business logic
* Dimension descriptions to provide field context

**Create new metrics** based on conversations:

* Custom aggregations derived from existing dimensions

**Suggest AI hints** for improved context:

* Ask your agent to recommend AI hints for dimensions, metrics, or tables
* AI hints take precedence over descriptions and aren't visible to end users

## Enabling self-improvement

Only admins and developers can enable and use self-improvement. To enable self-improvement for an agent:

1. Go to your agent settings
2. Toggle the "Enable Self-Improvement" switch
3. Save your changes

<Frame>
  <img src="https://mintcdn.com/lightdash-mintlify-ca973f84/cHghj5I2wtqMZ-ik/images/guides/ai-agents/enable-self-improvement.png?fit=max&auto=format&n=cHghj5I2wtqMZ-ik&q=85&s=63faf4b3d8e4646f867aab5d23fb6ba0" alt="Enable self-improvement toggle" width="2776" height="1230" data-path="images/guides/ai-agents/enable-self-improvement.png" />
</Frame>

## Managing changes

All proposed changes are tracked in changesets, which you can access from Project Settings:

**View all changes:**

* Navigate to Project Settings > Changesets
* See a complete list of proposed changes with details about what was modified
* View who proposed each change and when

  <Frame>
    <img src="https://mintcdn.com/lightdash-mintlify-ca973f84/cHghj5I2wtqMZ-ik/images/guides/ai-agents/changeset-view.png?fit=max&auto=format&n=cHghj5I2wtqMZ-ik&q=85&s=bd74f611acb0c47ed1316a3981716f08" alt="Self-improvement changes in changeset view from project settings" width="2746" height="972" data-path="images/guides/ai-agents/changeset-view.png" />
  </Frame>

**Review changes in chat:**

* Each proposed change appears as a card in the conversation
* Click "View Changeset" to see the full details
* Use the "Reject" button to revert changes you don't want

**Revert changes:**

* Individual changes can be rejected directly from the chat interface
* Use "Revert" in the changesets page to undo specific changes
* Use "Revert All" to undo multiple changes at once
* If a project is re-deployed, the changeset will be applied if possible

<Warning>
  Once a change is reverted, the action cannot be undone. The semantic layer
  will return to its previous state for that field or metric.
</Warning>
