manage_few_shot_examples
Store and manage few-shot examples that pair natural language questions with correct SQL. Use list, add, or remove actions to improve query accuracy by teaching domain conventions.
Instructions
Manage the few-shot examples that smart_query uses to generate more accurate SQL. Behavior: action 'list' returns all stored examples with their ids; 'add' saves a new example (requires the example object); 'remove' deletes one (requires example_id). Each example pairs a natural-language question with the correct SQL and the tables it uses, teaching the model your schema's domain conventions. Usage: examples are stored locally per data_source_id and are retrieved automatically by smart_query — register a few for recurring question patterns to raise accuracy.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| example | No | Example to add (required when action=add) | |
| example_id | No | Example ID to remove (required when action=remove) | |
| data_source_id | Yes | Data source ID |