AI Query Assistant
AI Query Assistant
The AI Query Assistant lets you describe what data you need in plain English, and it generates the SQL query for you.
Getting Started
- Click Data Bridge → New Query → AI Assistant
- Select your database connection
- Type your question in natural language
- Review the generated SQL
- Click Run Query
Example Prompts
| You Say | AI Generates |
|---|---|
| "Show all customers in California" | SELECT * FROM customers WHERE state = 'CA' |
| "Orders over $1000 from last month" | SELECT * FROM orders WHERE total > 1000 AND order_date >= DATEADD(month, -1, GETDATE()) |
| "Top 10 products by sales" | SELECT TOP 10 product_name, SUM(quantity) as total_sold FROM order_items GROUP BY product_name ORDER BY total_sold DESC |
Supported AI Providers
- Anthropic: The default provider
- OpenAI
- Azure OpenAI: For enterprise environments with Azure requirements
Configuring AI
- Click Data Bridge → Settings → AI Configuration
- Select your preferred AI provider
- Enter the API key for your own account with that provider. It is encrypted with Windows DPAPI for your Windows account and stored in your user profile.
- Click Test Connection
What gets sent: your question, the database type and name, and the table and column names with their data types, key and nullable flags. Explain, optimize and filter requests also send the current SQL query. The rows in your tables are never sent. Requests go from your computer straight to the provider you chose, not through BridgeStack.
Tips for Better Results
- Be specific: "orders from January 2024" vs "recent orders"
- Use column names when you know them
- Specify output format: "show customer name and total spend"