# Creating Manual Training Data

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:

{% hint style="success" %}

## 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
  {% endhint %}

## 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"
```

{% embed url="<https://www.loom.com/share/460f618e4c1746b6a5a5d84d18456f9a>" %}

## Option 2: Create New Query

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

{% stepper %}
{% step %}
Click the **"Create New Query"** button

{% endstep %}

{% step %}
Enter a natural language prompt in the text field

{% endstep %}

{% step %}
Write the corresponding SQL query

{% endstep %}

{% step %}
Run the query to test it (optional, but recommended)

{% endstep %}

{% step %}
Save the training pair
{% endstep %}
{% endstepper %}

{% embed url="<https://www.loom.com/share/39b1075ff2cf426294679862bcc2f2e6?sid=ed04f493-1955-41f7-bbbf-d3d370e5b0e9>" %}
