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

# Ask AI

> Generate, refine, and fix queries in the lake editor with the AI assistant.

The lake editor has two AI actions. Both see only the tables you have access to.

## Ask AI

Click **Ask AI** in the editor toolbar and describe what you want. On a SQL tab it writes a query for the tab's engine, or standard SQL on **Auto**. On a Python tab it writes a [Polars script](/platform/compute/polars#python-script).

The assistant reads the code already in the editor, so you can ask it to refine the current query, for example *add a date filter for the last 7 days*. If a SQL tab already holds a query, the result opens in a new tab.

## Fix with AI

When a SQL run fails, click **Fix with AI** next to the error. The assistant rewrites the query for the engine that ran it. Review the change before you run it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.