Original task Spider2-Snow
INSTRUCTION

For each year in Westminster borough, what is the total number of incidents where the minor crime category is 'Other Theft' under 'Theft and Handling'?

GOLD SQL
SELECT year,
  SUM(value) AS total_incidents
FROM CRIME_BY_LSOA
WHERE borough = 'Westminster'
  AND major_category =
      'Theft and Handling'
  AND minor_category =
      'Other Theft'
GROUP BY year ORDER BY year
inject AI requirement
revise instruction
rewrite SQL
AI-native task Spider 2.0-AIFunc
INSTRUCTION

For each year in Westminster borough, what is the total number of incidents for the crime type within 'Theft and Handling' that is most semantically similar to 'general unclassified theft of miscellaneous items'?

GOLD SQL
WITH cat_sim AS (
  SELECT minor_category,
    AI_SIMILARITY(
      minor_category,
      'general unclassified theft of misc. items'
    ) AS similarity
), top_cat AS (
  ... ORDER BY similarity DESC LIMIT 1
)
... AND minor_category =
    (SELECT minor_category FROM top_cat)
GROUP BY year ORDER BY year