generate_sql
Converts natural language questions into validated SQL SELECT queries by leveraging database schema context.
Instructions
Generate a SQL query from a natural language question. Uses the database schema as context and an LLM to produce a valid SELECT query. The generated query is validated for safety.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | Schema to use for context | public |
| question | Yes | Natural language question (e.g., 'What are the top 10 customers by order count?') |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |