Generate SQL filter from natural language using AI
Generate SQL filter from natural language using AI
Generate a SQL WHERE clause from a natural language description using AI.
This endpoint uses a language model to convert natural language descriptions like “steps lasting more than an hour” into SQL WHERE clauses like “duration_s >= 3600”.
The AI also determines whether to use “step” or “cycle” match mode based on the user’s intent.
The generated SQL is validated against the specified measurement to ensure it is syntactically correct. If validation fails, the AI will retry.
Returns:
- sql_where_clause: The generated SQL WHERE clause
- match_mode: “step” or “cycle”
- explanation: Brief explanation of what the filter does
Generate SQL filter from natural language using AI
Body
application/json