SQL Syntax Match
Definitions
SQL Syntax Match evaluates the syntactic equivalence between generated SQL queries and a set of ground truth queries. The strict comparison can tolerate formatting changes.
Introduced in version 0.3.9.
Example Usage
Required data items: answer
, ground_truth_answers
res = client.metrics.compute(
Metric.SQLSyntaxMatch,
args={
"answer": "SELECT * FROM users;",
"ground_truth_answers": ["SELECT * from users;"],
},
)
print(res)
Example Output
{
"SQL_Syntax_Match": 1.0
}