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
Be specific: Include examples that reflect how your users actually ask questions
Cover variations: Create multiple ways of asking for the same information
Include context: Use column names and business terms specific to your data
Test queries: Ensure all SQL queries are valid and return expected results
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:
Click the "Create New Query" button
Enter a natural language prompt in the text field
Write the corresponding SQL query
Run the query to test it (optional, but recommended)
Save the training pair
Last updated