Skip to content

AI Chat

To use the AI Chat:

  1. Activate the AI assistant.
  2. Select Tools -> 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, a 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

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

To improve accuracy, especially in databases with large schemas, you can use the Scope field to limit the context to specific database objects.

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

    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