The Manual tab provides complete control over your training examples, ensuring accuracy for critical queries.

Creating Training Data Manually

You have two options for manual creation:

Option 1: CSV Upload

Upload a CSV file containing your training examples with the following structure:

Example CSV format:

text,query
"Show me total sales by month","SELECT DATE_TRUNC('month', sale_date) as month, SUM(amount) as total_sales FROM sales GROUP BY month ORDER BY month"
"Which products had the highest revenue last quarter","SELECT product_name, SUM(revenue) as total_revenue FROM products WHERE sale_date >= DATE_TRUNC('quarter', CURRENT_DATE - INTERVAL '3 months') GROUP BY product_name ORDER BY total_revenue DESC LIMIT 10"

Walkthrough:

import-queries.mp4

Option 2: Create New Query

Use the "Create New Query" modal to add training examples one at a time:

  1. Click the "Create New Query" button
  2. Enter a natural language prompt in the text field
  3. Write the corresponding SQL query
  4. Run the query to test it (optional, but recommended)
  5. Save the training pair

Walkthrough: