> ## Documentation Index
> Fetch the complete documentation index at: https://www.getmaxim.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SQL Correctness

> Evaluates whether a generated SQL query correctly translates a natural language query into valid SQL based on a provided database schema.

## Input

* **Required Inputs:**
  * **`input`**: Natural language query intent
  * **`output`**: Generated SQL query
  * **`db_schema`**: Database schema definition

## Output

* **`Result`**: Binary score (0 or 1)
* **`Reasoning`**: Brief explanation of assessment

## Interpretation

* **1**: Query is correct (valid syntax and captures intent)
* **0**: Query is incorrect (invalid syntax or wrong intent)
