Creating Manual Training Data

Creating training examples by hand with direct control.

In the Manual tab, you maintain full control over training examples to ensure precise handling of essential queries. You have two options for creating these examples manually:

Best Practices for Manual Training Data

Option 1: CSV Upload

Upload a CSV file with the following structure:

  • text column: Contains the natural language prompt.

  • query column: Contains the corresponding SQL query.

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"

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

Last updated