evaluate_queries
Run accuracy tests for SQL generation by storing question-SQL pairs and scoring generated SQL against ground truth.
Instructions
Build and run an accuracy test suite for SQL generation on a data source. Behavior: action 'add_test' stores a question paired with ground-truth SQL; 'list_tests' shows them; 'remove_test' deletes one; 'run' scores generated SQL against the test cases; 'results' shows the latest run. Usage: use this to measure whether keyword maps and few-shot examples actually improve smart_query accuracy over time; test cases and runs are stored locally per data_source_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| test_case | No | Test case to add (required when action=add_test) | |
| test_case_id | No | Test case ID to remove (required when action=remove_test) | |
| data_source_id | Yes | Data source ID | |
| generated_sqls | No | List of SQL to evaluate (required when action=run) |