Skip to main content

Overview

Quail combines cutting-edge AI technology with robust data visualization capabilities to create a comprehensive business intelligence platform. This page details all the features that make Quail a powerful tool for data analysis.

AI-Assisted SQL Querying

Natural Language to SQL

Quail’s core feature is its ability to understand natural language questions and convert them into optimized SQL queries.

Schema-Aware Generation

The AI analyzes your database schema to generate syntactically correct queries using actual table and column names.

Intelligent Query Optimization

Automatically generates queries with proper joins, indexes, and filtering for optimal performance.

Multi-Database Support

Works with PostgreSQL, MySQL, SQL Server, SQLite, and other SQL databases.

Query Explanation

Provides detailed explanations of what each query does and why it was structured that way.

How It Works

1

Question Analysis

The AI analyzes your natural language question to identify:
  • Required metrics and dimensions
  • Filtering conditions
  • Aggregation requirements
  • Time ranges and groupings
2

Schema Mapping

The system maps your question to your database schema:
  • Identifies relevant tables
  • Finds necessary columns
  • Determines required joins
  • Validates data types
3

Query Generation

Generates optimized SQL with:
  • Proper syntax for your database type
  • Efficient joins and subqueries
  • Appropriate aggregations
  • Performance optimizations
4

Validation and Execution

Before execution:
  • Validates query syntax
  • Ensures read-only operation
  • Estimates result size
  • Executes with timeout protection

Example Queries

Q: "What were the top 5 products by revenue last quarter?"

Generated SQL:
SELECT 
  p.product_name,
  SUM(o.total_amount) as revenue
FROM orders o
JOIN products p ON o.product_id = p.id
WHERE o.order_date >= DATE_TRUNC('quarter', CURRENT_DATE - INTERVAL '3 months')
  AND o.order_date < DATE_TRUNC('quarter', CURRENT_DATE)
GROUP BY p.product_name
ORDER BY revenue DESC
LIMIT 5;

Data Visualization

Intelligent Chart Selection

Quail automatically recommends the most appropriate visualization type based on your data characteristics:

Bar Charts

For comparing categories and showing distributions

Line Charts

For time-series data and trends over time

Pie Charts

For part-to-whole relationships and proportions

Scatter Plots

For correlation analysis and pattern detection

Radar Charts

For multivariate data comparison

Polar Area Charts

For cyclic data and angular comparisons

Chart Customization

Every chart can be customized with:
  • Colors: Choose from predefined palettes or custom colors
  • Labels: Customize axis labels, titles, and legends
  • Scales: Linear, logarithmic, or custom scale types
  • Tooltips: Rich hover information with formatting
  • Animations: Smooth transitions and loading effects
  • Export: Download as PNG, SVG, or embed code
Charts are built with Chart.js and Recharts, providing high-performance, responsive visualizations.

Chart Editor

The built-in chart editor allows you to:
  1. Modify Chart Type: Switch between visualization types
  2. Adjust Data Mapping: Change which columns map to axes
  3. Apply Filters: Filter data without rewriting queries
  4. Transform Data: Apply aggregations and calculations
  5. Style Components: Customize every visual element
  6. Preview Changes: See updates in real-time

Interactive Dashboards

Dashboard Features

Create comprehensive dashboards that bring your data to life:

Drag-and-Drop Layout

Intuitive grid system for arranging charts exactly how you want them

Responsive Design

Dashboards automatically adapt to different screen sizes

Real-time Updates

Configure automatic refresh intervals for live data

Filter Sync

Apply filters across all dashboard charts simultaneously

Dashboard Management

1

Create Dashboard

  • Give it a meaningful name and description
  • Choose a layout template or start blank
  • Set default refresh interval
2

Add Charts

  • Import existing saved charts
  • Create new charts inline
  • Arrange with drag-and-drop
  • Resize to emphasize key metrics
3

Configure Interactivity

  • Link filters between charts
  • Set up drill-down paths
  • Configure click actions
  • Add dynamic parameters
4

Share and Collaborate

  • Generate shareable links
  • Invite team members
  • Set view/edit permissions
  • Export as PDF reports

Dashboard Views

Quail provides two view modes:
  • Grid View: Card-based layout with chart previews
  • List View: Compact list with quick access to metadata
Use keyboard shortcuts: Press G for Grid view and L for List view.

Secure Database Integration

Encryption and Security

Quail takes security seriously with multiple layers of protection:
All database credentials are encrypted using AES-256 encryption before storage. The encryption key never leaves your server.

Security Features

  1. Credential Encryption
    • AES-256 encryption for connection strings
    • User-provided encryption keys
    • No plaintext credential storage
  2. Read-Only Queries
    • Only SELECT statements are executed
    • INSERT, UPDATE, DELETE blocked
    • DROP and ALTER statements rejected
  3. Query Validation
    • Syntax validation before execution
    • SQL injection prevention
    • Query timeout limits
    • Result size limits
  4. Authentication
    • Supabase-powered authentication
    • Email/password and OAuth support
    • Session management
    • Multi-factor authentication ready

Supported Databases

Quail supports all major SQL databases:
✓ PostgreSQL 10+
✓ PostGIS extensions
✓ JSON/JSONB columns
✓ Array types
✓ Custom types

Connection Management

Manage multiple database connections:
  • Multiple Connections: Connect to multiple databases simultaneously
  • Connection Testing: Verify connectivity before saving
  • Schema Exploration: Browse tables, columns, and relationships
  • Connection Switching: Quick switching between databases
  • Credential Updates: Update credentials without reconnecting

Agentic Hydration Pattern

Architecture Innovation

Quail implements the Agentic Hydration Pattern, an architectural innovation for LLM-based applications that separates UI scaffold generation from data hydration.
This pattern improves performance by up to 60% and reduces token usage by 40% compared to traditional approaches.

How It Works

1

Scaffold Generation

The AI generates a lightweight UI scaffold:
  • Component structure
  • Layout configuration
  • Placeholder slots for data
  • Styling and formatting rules
2

Data Hydration

Data is fetched and injected separately:
  • Query execution
  • Result formatting
  • Data transformation
  • Progressive loading
3

Progressive Rendering

Components render progressively:
  • Scaffold appears immediately
  • Data populates as available
  • Loading states handled gracefully
  • Error boundaries protect UI

Benefits

  1. Faster Response Times: UI renders before data is fully loaded
  2. Reduced Token Usage: Scaffolds are reusable across queries
  3. Better Error Handling: Data failures don’t break the UI
  4. Improved UX: Users see progress immediately
  5. Lower Costs: Fewer API calls to LLM services

SQL Editor

Monaco Editor Integration

Quail uses Monaco Editor (the same editor that powers VS Code) for SQL editing:

Syntax Highlighting

Color-coded SQL syntax for better readability

Auto-completion

Intelligent suggestions for tables, columns, and keywords

Error Detection

Real-time syntax error highlighting

Query Formatting

One-click SQL formatting and beautification

Editor Features

  • Multi-cursor Editing: Edit multiple lines simultaneously
  • Find and Replace: Powerful search with regex support
  • Keyboard Shortcuts: VS Code-compatible shortcuts
  • Query History: Access previously executed queries
  • Snippets: Save and reuse common query patterns
  • Dark/Light Themes: Match your preferred color scheme

Execution Options

// Execute with options
- Run Query (Cmd/Ctrl + Enter)
- Explain Query (shows execution plan)
- Estimate Cost (shows resource usage)
- Export Results (CSV, Excel, PDF)

Data Export

Export Formats

Export your query results in multiple formats:

CSV

Comma-separated values for Excel and other tools

Excel

Native XLSX files with formatting

PDF

Professional reports with tables and charts

Export Features

  • Large Dataset Support: Handle millions of rows
  • Streaming Export: Memory-efficient for huge datasets
  • Custom Formatting: Apply number formats, dates, and styles
  • Chart Inclusion: Embed visualizations in exports
  • Scheduled Exports: Automate report generation
  • Batch Export: Export multiple queries simultaneously
Use keyboard shortcut Cmd/Ctrl + S to quickly access export options.

Chat Interface

Conversational BI

Interact with your data through a natural chat interface:

Context-Aware

Remembers previous questions in the conversation

Follow-up Questions

Ask follow-ups without repeating context

Multi-turn Dialogs

Refine queries through conversation

Chat History

Access all previous conversations

Chat Features

  1. Contextual Understanding
    You: "Show me sales by region"
    AI: [Generates query and shows results]
    
    You: "Now break it down by month"
    AI: [Understands to modify previous query]
    
    You: "Just for 2024"
    AI: [Adds year filter to existing query]
    
  2. Multiple Chat Sessions
    • Create separate chats for different analyses
    • Name and organize chat sessions
    • Share chats with team members
    • Export chat transcripts
  3. Speed Modes Toggle between different AI performance modes:
    • Fast: Quick responses for simple queries
    • Medium: Balanced performance (default)
    • Slow: Most accurate for complex analyses
Speed mode affects both response time and token usage. Fast mode can be up to 3x faster than slow mode.

Schema Explorer

Database Schema Visualization

Explore your database structure with an intuitive interface:
  • Tree View: Hierarchical display of databases, schemas, and tables
  • Table Inspector: View columns, types, constraints, and indexes
  • Relationship Diagram: Visualize foreign key relationships
  • Search: Quickly find tables and columns across your database
  • Metadata: Access table statistics and row counts

Schema Features

1

Browse Structure

Navigate through databases, schemas, tables, and views in a tree structure.
2

Inspect Tables

Click any table to see:
  • Column names and data types
  • Primary and foreign keys
  • Indexes and constraints
  • Sample data preview
3

Search Schema

Use the search bar to find:
  • Tables by name
  • Columns across tables
  • Views and materialized views
  • Stored procedures
4

Quick Query

Right-click any table for quick actions:
  • SELECT * FROM table
  • Count rows
  • Show sample data
  • Copy table name

Performance and Optimization

Query Optimization

Quail automatically optimizes generated queries:
  • Index Usage: Leverages indexes when available
  • Join Optimization: Chooses optimal join types
  • Query Planning: Uses database query planner
  • Result Limiting: Adds sensible LIMIT clauses
  • Aggregation Pushdown: Performs calculations in database

Caching Strategy

Query Results

Cache results for frequently-run queries

Schema Metadata

Cache database schema to reduce lookups

Chart Configs

Store chart configurations locally

User Preferences

Persist settings across sessions

Performance Monitoring

  • Query Execution Time: Track how long queries take
  • Token Usage: Monitor AI API consumption
  • Error Rates: Identify problematic queries
  • Resource Usage: Memory and CPU utilization

Team Collaboration

Sharing Features

Dashboard Sharing

Share dashboards with team members via email or link

Permission Management

Control who can view or edit your content

Comments

Add comments and annotations to charts

Version History

Track changes to queries and dashboards

Collaboration Workflows

  1. Create and Share
    • Build a dashboard or query
    • Click Share button
    • Invite by email or generate link
    • Set permissions (view/edit)
  2. Receive and Collaborate
    • Receive email notification
    • View shared content
    • Add comments and feedback
    • Duplicate to your workspace
  3. Team Management
    • Manage shared dashboards
    • Revoke access when needed
    • Transfer ownership
    • Archive old content
Shared dashboards appear in the “Shared With Me” tab for easy access.

Advanced Features

Query Parameters

Create dynamic queries with parameters:
SELECT * FROM orders 
WHERE order_date >= {{start_date}}
  AND order_date <= {{end_date}}
  AND region = {{region}}

Custom Functions

Define reusable SQL snippets:
-- Save as "revenue_by_period"
SELECT 
  DATE_TRUNC('{{period}}', order_date) as period,
  SUM(total_amount) as revenue
FROM orders
GROUP BY period
ORDER BY period

Scheduled Queries

  • Run queries on a schedule
  • Email results automatically
  • Refresh dashboards periodically
  • Monitor for data changes
Scheduled queries are only available when Azure AI credentials are configured.

Next Steps

Get Started

Follow the quickstart guide to set up Quail

Architecture

Learn about the Agentic Hydration Pattern

Best Practices

Tips for optimal query performance

GitHub Repository

Explore the source code and contribute

Build docs developers (and LLMs) love