AI Smart Assistance
Overview
Team Edition offers the ability to construct SQL queries using natural language with AI smart completion and AI Chat. This capability is powered by integrations with the following AI services:
- OpenAI (GPT language model)
- Azure OpenAI (Azure OpenAI Service)
- Google Gemini (Gemini)
- Ollama (Ollama)
Team Edition is not affiliated with OpenAI, Microsoft Azure, Google, or Ollama. Integration with AI assistance is achieved through the public APIs. To use AI assistance, register with the respective service provider and get a secret key.
Ai assistant setup
To activate the AI features in Team Edition, configure the API token:
- Navigate to Settings -> Administration -> Server Configuration
- Ensure the AI option is activated.
- Navigate to AI Settings tab -> Choose an engine
- Insert credentials.
- Save the changes.
AI assistant features
AI smart completion.
Type plain-language queries, and AI converts them into SQL.
AI command.
Use AI command directly in the SQL Editor. Type commands like
@ai show films in which Grace Mostel starred
, and AI wll generate the SQL for you.
Best practices for prompt formulation:
- Language: While AI supports multiple languages, it's recommended to use English for best results.
- Database knowledge: Familiarity with your database structure enhances the accuracy of generated queries.
- Iterative refinement: Start with a general request and refine iteratively. As you provide more specific details, the AI's output will become more relevant.
- Explicit details: If you know certain tables or columns that should be part of the query, include them in your request for better accuracy.
Data privacy
We prioritize data safety and user privacy. In this section, we outline how data is managed and the measures taken to protect user privacy when using the AI features.
To enable AI features capabilities, metadata such as table and column names from the current database schema are transmitted to third-party AI services. This step is crucial for accurately translating user requests into SQL queries.
- No table data: Only metadata like table and column names are shared with OpenAI. Actual table data is not transmitted.
- Log transparency: The entire request can be logged for your review. To enable this, navigate to AI Settings tab and check the Write GPT queries to debug log option.
- Azure OpenAI privacy: If you use Azure OpenAI, be aware that it operates under its own privacy policy. It's recommended to review their terms before using.
Google Gemini privacy: When using Google Gemini, it is important to understand the specific data privacy measures.
Disable AI assistance
Learn more about disabling AI assistance.