Skip to content

AI chat

To use the AI Chat:

  1. Activate the AI assistant.
  2. Select AI Chat from the top toolbar.

    • Alternatively, click on the AI assistant icon located in the left toolbar of the SQL Editor.
  3. In the chat window that opens, select a connection and, optionally, an access scope.

  4. Enter your request in natural language.
  5. Press the Send icon () to get the SQL translation. You can then choose from the following options:

    Option Icon Description
    Execute Run the generated SQL query
    Insert Open the query in the SQL Editor and continue working with it directly
    Copy query Copy the query to your clipboard
    Copy Copy the entire AI Chat response to your clipboard

Tip

To stop response generation, select the Stop button next to the input field.

Clarifying questions

When your request can be read in more than one way, AI asks you to clarify it right in the chat instead of guessing. The question appears as a card with the options to pick from.

Info

For more details, see User interaction.

Attach images

You can attach PNG, JPEG, GIF, and WebP images.

Paste the images from the clipboard into the prompt.

You can attach up to 10 images with a combined size of 20 MiB per message. Select an attached image to preview it.

AI Chat configuration

Connection field

To use a specific connection in AI Chat, select the connection from the toolbar at the top of the chat panel. The selected connection defines which database the AI will use when generating SQL queries.

Multiple conversations

You can create multiple chats for different connections.

The first chat is created automatically when you open AI Chat. Each chat is named based on your first prompt. Messages related to the same query or object in the same connection are kept together in one conversation.

Action Icon How to do it
New conversation Click the icon to start a new conversation
Conversation history Use the dropdown menu to switch between existing chats
Delete a chat Select the chat from the Conversation history dropdown, then click the delete icon

Important

Deleted conversations can’t be restored.

Resetting query context

The AI Chat logs your query history, enabling you to reference and expand on prior inputs. Each new or edited entry prompts the AI to generate a revised SQL query. To change the query context in AI Chat or clear history up to a specific message, click the Delete message icon () next to the desired message. Deleting a message also removes it and all messages below it.

Defining the scope

The access scope defines which database objects AI can access and use as context.

  1. In the AI Chat toolbar, click the Configure AI context icon to open the context menu.
  2. Choose the desired access scope:

    Access scope option Description
    Connection AI considers all schemas within the current database connection
    Current Database AI is limited to the currently selected database
    Current Schema AI focuses only on the schema you’re currently using
    Custom Lets you define a more specific scope, such as a particular table or set of objects

Info

Users with permission to edit a connection can limit which database objects are available under Custom. For information on configuring this scope, see Connection access scope.

Active configuration

tag-outline Available since 26.2

AI Chat starts with the default AI profile unless you select another profile. Your selection is saved and applies to the current chat and new chats. To select a profile:

  1. In the AI Chat toolbar, click the Configure AI context icon to open the context menu.
  2. Under Active configuration, pick a profile from the list.

Info

For information on configuring credentials in User Profile -> AI profiles, see Manage credentials for a user profile.

Token usage

tag-outline Available since 26.0

When enabled, AI Chat shows the total input and output token count for the current conversation.

  1. In the AI Chat toolbar, click the Chat settings button () to open the dropdown menu.
  2. Click Enable metrics

Token usage appears as 0↑/0↓ Tokens (input↑/output↓) below the chat header, and updates after each response.