Text-to-SQL
Text-to-SQL translates natural language questions into SQL queries against the tenant's data. It uses the ontology model to understand business terminology and Trino to execute the resulting queries.
:::note Bundle in progress
The aws/text-to-sql bundle is under development. This page will be updated with deployment and configuration details when the bundle is available.
:::
Role in the Stack
Text-to-SQL sits downstream of the Ontology Backend and upstream of Trino:
- A user asks a question in natural language via the Cogrion UI.
- Text-to-SQL retrieves the relevant ontology context (entities, metrics, schema) from the Ontology Backend.
- A language model generates a SQL query based on the question and context.
- The query is executed against Trino and results are returned.
Go Deeper
- Ontology Backend — provides the business context that guides SQL generation
- Trino — executes the generated SQL
- Agent-Based ML Platform — a related AI capability for ML workflow automation