SQL is used to retrieve structured database records for an AI system. Unlike unstructured-text retrieval, evaluation asks whether the query returns the correct result and whether the result is complete. section 6.4.2
Evaluate SQL-backed retrieval with source-specific measures:
- Execution accuracy (EX) checks whether the query returns the correct result. section 6.4.2
- Task success rate (SR) measures whether the overall result is correct. section 6.4.2
- Result completeness checks whether the returned records cover what the task requires. section 6.4.2
Retrieval evaluation
Suppose an AI system answers a question by issuing a SQL query. Judge the query by comparing its returned records with the correct result, then report execution accuracy or task success rate rather than applying text-retrieval precision and recall directly. section 6.4.2 section 6.5
SQL evaluation belongs alongside broader RAG evaluation: assess source retrieval first, because poor database retrieval can lower downstream generation quality even when generation works correctly. section 6.5






























