Understanding Text-to-SQL Explanations

Text-to-SQL is a TableQA method that translates the natural language question into an SQL query. The SQL query itself serves as the explanation for how the system arrives at its answer.

Example: 1947 Kentucky Wildcats Football Team

Statement to verify: "The Wildcats kept the opposing team scoreless in 4 games."

SQL Command Generation

The system generates an SQL command to verify the statement:

SELECT CASE WHEN COUNT(*) = 4 THEN 'TRUE' ELSE 'FALSE' END AS result FROM table_sql WHERE opponents = 0;

This SQL command does the following:

  1. It counts the number of rows where the 'opponents' column is 0 (scoreless games).
  2. If the count is exactly 4, it returns 'TRUE', otherwise 'FALSE'.