Checks if a generated SQL query is syntactically valid and executable against a given SQLite schema by actually running the query in an in-memory database.
output
(str): The generated SQL query.db_schema
(str): The CREATE TABLE
statements for the database schema.Result
(int): A binary score (0 or 1).Reasoning
(str): An explanation of the validation result, including any syntax or schema errors found.1
: The query is valid and successfully executed against the schema.0
: The query is invalid due to a syntax error, execution error, or incompatibility with the schema.