tianyang/spider2-aifunc huggingface dataset:
Database: TCGA_BIOCLIN_V0
Task: For female breast cancer (BRCA) patients aged 30 or younger from the TCGA database who do not have disqualifying annotations (where "disqualifying" means entity_type is 'Patient' AND either category equals 'History of unacceptable prior treatment related to a prior/other malignancy' OR classification equals 'Redaction'), summarize the genomic data available for each patient using GDC metadata from archive release 14. For each eligible patient, first compute the count of files per data category, rank categories by file count descending with alphabetical tie-breaking, then take the top 5 categories. Pre-aggregate the ranked categories into a single string formatted as 'category1 (count1) | category2 (count2) | ...' using SQL, then use AI aggregation with the instruction: 'From this ordered list of data categories with file counts, extract only the category names and output them in the exact same order, separated by semicolons. Format: category1; category2; category3; category4; category5' to produce the final summary. Order results by case barcode alphabetically.
Required AI functions: AI_AGG
Database: NEW_YORK_NOAA
Task: Analyze the relationship between complaint types and daily temperature in New York City using temperature data from LaGuardia (STN=725030) and JFK (STN=744860) airports for 2008-2017, where daily temperature is computed only on days when BOTH airports have valid readings (excluding 9999.9). For each complaint type with more than 5000 total occurrences that shows a strong correlation (absolute value > 0.5) with temperature in either daily count or daily percentage, classify the complaint type into exactly one of ['Outdoor/Environmental', 'Building/Infrastructure', 'Noise/Disturbance', 'Health/Safety', 'Administrative/Other'] based on the complaint type name, where 'Outdoor/Environmental' means 'issues occurring in outdoor spaces, involving vegetation, weather exposure, or environmental conditions', 'Building/Infrastructure' means 'issues with buildings, structures, utilities, or mechanical systems like heating and plumbing', 'Noise/Disturbance' means 'noise complaints or disturbances from any source', 'Health/Safety' means 'public health concerns including pests, sanitation, food safety, or physical hazards', and 'Administrative/Other' means 'permits, regulations, administrative processes, or miscellaneous issues not fitting other categories'. Then filter to only those complaint types where the condition 'The frequency of this type of complaint could plausibly vary with seasonal temperature changes due to weather, human behavior, or environmental factors: ' concatenated with the complaint type evaluates to true. Return the complaint type, its category, total complaints, days with valid temperature records from both airports, and Pearson correlation coefficients (rounded to four decimals) for both daily count and daily percentage correlations, ordered by total complaints descending.
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: NEW_YORK_NOAA
Task: Among complaint types with more than 3000 total requests from 2011-01-01 through 2020-12-31 (treating days with no complaints of a given type as having zero complaints for proportion calculations), which show the strongest positive and strongest negative Pearson correlations between daily complaint proportion (type-specific daily count divided by total daily complaints) and daily average wind speed at station 744860? For each of these two complaint types, classify them into exactly one of ['Weather-Related', 'Infrastructure', 'Quality of Life', 'Health & Safety', 'Nuisance', 'Other'] based on the complaint type name, and provide the complaint type, its semantic category, and correlation coefficient rounded to four decimal places. Order results by correlation descending, with ties broken first by semantic similarity to 'wind damage, weather conditions, outdoor environment' in descending order, then by complaint type alphabetically ascending.
Required AI functions: AI_CLASSIFY, AI_SIMILARITY
Database: PATENTSVIEW
Task: For U.S. patents in CPC subsection 'C05' or group 'A01G', retrieve the patent ID, title, application date (using the earliest application date if multiple exist), the number of backward citations (patents cited by the current patent whose application date is within 1 month before the current patent's application date, exclusive of the application date itself), the number of forward citations (patents that cite the current patent whose application date is within 1 month after the current patent's application date, inclusive of the application date but exclusive of the 1-month boundary), and the abstract text. Only include patents that have at least one backward or forward citation in these time windows.

Classify each patent's abstract into exactly one of ['Agricultural Technology', 'Chemical Process', 'Biological Method', 'Mechanical Device', 'Other'] based on the primary innovation described. Only include patents classified as 'Agricultural Technology', 'Biological Method', or 'Chemical Process', and only include patents where the filter condition 'This patent describes a practical application for agriculture, horticulture, or plant cultivation: ' concatenated with the abstract evaluates to true. Sort results by application date ascending, then by patent ID ascending for ties.
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: NEW_YORK
Task: Calculate the change in the number of living trees for each fall color in New York City from 1995 to 2015. For 1995, count trees where status is not 'Dead'; for 2015, count trees where status is 'Alive'. Match species between census data and the tree_species table using the uppercase form of their scientific names (with whitespace trimmed). Exclude fall colors that are NULL or empty after trimming whitespace. Only include fall colors that had at least one tree in either the 1995 or 2015 census.

Then, classify each fall color into exactly one of ['Warm Autumn Tones', 'Cool Autumn Tones', 'Neutral Tones'] based on the color name, and filter to only fall colors classified as 'Warm Autumn Tones'. Order the results by semantic similarity to 'vibrant autumn foliage colors' in descending order, with ties broken by fall color name alphabetically. Return the fall color and its net change in tree count.
Required AI functions: AI_CLASSIFY, AI_SIMILARITY
Database: NEW_YORK
Task: For the top 10 tree species in New York ranked by total tree count growth from 1995 to 2015 (with ties broken alphabetically by Latin name), provide their uppercase Latin names (excluding empty Latin names), common names, total tree counts for 1995, 2005, and 2015, alive and dead counts for each year (where 'alive' means status is not in ['DEAD', 'PLANTING SPACE', 'STUMP', 'EMPTY PIT', 'SHAFT'] and is not empty, and 'dead' means status equals 'DEAD'), three growth metrics from 1995 to 2015 (total growth, alive growth, and dead growth), aggregate the 2015 health and problem statistics (formatted as 'Health distribution: Good={good_count}, Fair={fair_count}, Poor={poor_count}. Problems: Stones={stones_count}, BranchLights={lights_count}, RootOther={root_count}, TrunkOther={trunk_count}') using the instruction 'Summarize health and issues in one sentence, formatted as: [health summary]. Issues: [top 2 issues or None].', and extract from a growth narrative formatted as 'Population change: from {total_1995} trees in 1995 to {total_2015} trees in 2015 (net change: {growth}). Starting point: {zero_or_existing}.' where zero_or_existing is 'started from zero' if total_1995=0 else 'had existing population', the field 'growth_pattern' as a string value (not raw JSON) using the question 'Characterize this population change in 2-3 words. If started from zero, use phrases like: New introduction, Rapid establishment. If had existing population, use phrases like: Strong growth, Moderate increase, Steady expansion'. Return columns in this order: species_latin_upper, common_name, total_1995, alive_1995, dead_1995, total_2005, alive_2005, dead_2005, total_2015, alive_2015, dead_2015, growth_total_1995_2015, growth_alive_1995_2015, growth_dead_1995_2015, health_assessment, growth_pattern.
Required AI functions: AI_AGG, AI_EXTRACT
Database: GOOGLE_DEI
Task: For the top 3 races with the largest absolute percentage point differences between Google's 2021 overall hiring rates and the average 2021 BLS percentages for technology sectors (subsectors 'Internet publishing and broadcasting and web search portals', 'Software publishers', 'Data processing, hosting, and related services', or industry group 'Computer systems design and related services'), classify each race's representation status into exactly one of ['Significantly under-represented at Google', 'Slightly under-represented at Google', 'Comparable to industry', 'Slightly over-represented at Google', 'Significantly over-represented at Google'] based on a description formatted as 'Google 2021 overall hiring: {google_percentage}% {race}. Tech industry BLS average: {bls_avg_percentage}%. Difference: {percentage_difference} percentage points.' Only include races that should be part of a comprehensive diversity analysis, filtered using the condition 'The following compares Google hiring to industry average for {race} employees: {google_percentage}% vs {bls_avg_percentage}%. Should this racial group be included in a comprehensive workforce diversity analysis?' Show the race, Google percentage, BLS average percentage, percentage difference, and the representation status classification. All percentage values should be rounded to 1 decimal place.
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: GOOGLE_DEI
Task: Summarize the representation gaps between Google's 2021 overall hiring data (from the non-intersectional hiring table) and the 2021 BLS technology sector simple averages (unweighted average of percentages across subsectors 'Internet publishing and broadcasting and web search portals', 'Software publishers', 'Data processing, hosting, and related services', or industry group 'Computer systems design and related services') across all available races (White, Black, Asian, Hispanic/Latino). Calculate differences in percentage points rounded to 1 decimal place. Use AI aggregation with the instruction: 'For the three races with the largest absolute percentage point differences, output exactly in this format for each: "[Race]: [difference] pp - Google hires more [Race] employees than industry average." if the difference is positive, or "[Race]: [difference] pp - Google hires fewer [Race] employees than industry average." if the difference is negative. Output one race per line, no additional text.'
Required AI functions: AI_AGG
Database: CRYPTO
Task: Which month in 2021 had Bitcoin CoinJoin activity most similar to 'Strong privacy adoption characterized by high CoinJoin volume percentage and significant UTXO involvement in privacy transactions'? CoinJoin transactions are defined as non-coinbase transactions with more than 2 outputs, output value less than or equal to input value, and at least 2 outputs with equal positive values. For each month, create a profile formatted as 'CoinJoin metrics: {pct_transactions}% transaction share, {pct_utxos}% UTXO share, {pct_volume}% volume share' and rank by semantic similarity to the reference phrase. Return the top 1 month by similarity, showing the month number, the percentage of transactions that were CoinJoins, the percentage of UTXOs in CoinJoins (average of input and output percentages), the percentage of volume in CoinJoins, and classify the month's privacy adoption level into exactly one of ['High Privacy Adoption', 'Moderate Privacy Adoption', 'Low Privacy Adoption'] based on the same profile description. Round all percentages to 1 decimal place.
Required AI functions: AI_CLASSIFY, AI_SIMILARITY
Database: CENSUS_BUREAU_INTERNATIONAL
Task: Among countries with an area greater than 500 square kilometers in 2017, classify each country into exactly one of ['Economic Hub', 'Conflict/Displacement', 'Regional Gateway', 'Other'] based on the country name. Then, filter to only countries classified as 'Economic Hub' or 'Conflict/Displacement' to focus on the most significant migration patterns. From these filtered countries, what are the top 3 by net migration rate (per 1,000 population)? Return each country's name, net migration rate, and migration driver classification. If there are ties in net migration rate, break ties by semantic similarity to 'major international migration destination' in descending order.
Required AI functions: AI_CLASSIFY, AI_SIMILARITY
Database: CENSUS_BUREAU_ACS_1
Task: Which California census tract code (tract_ce) experienced the largest absolute median income increase between 2015 and 2018, among tracts where the condition 'The income change from $[2015_income] to $[2018_income] represents exceptional economic transformation and significant upward mobility: ' evaluates to true? The income values in the condition should be formatted as rounded whole dollar amounts (e.g., $50000 to $120000). Only consider tracts with income increases exceeding $50,000.
Required AI functions: AI_FILTER
Database: DEPS_DEV_V1
Task: Find the GitHub URL (returned as stored, without modification) of the latest released version of the NPM package that has the highest number of dependencies in its latest released version. Exclude packages whose names contain the character '@' and only consider URLs where the link label is 'SOURCE_REPO' and the URL contains 'github.com'. Additionally, extract the GitHub repository owner and repository name from the URL using the extraction questions: 'What is the GitHub username or organization that owns this repository?' for the owner field and 'What is the repository name without the .git extension?' for the repo_name field. If there are ties in dependency count, break ties alphabetically by package name, then by URL.
Required AI functions: AI_EXTRACT
Database: NOAA_DATA_PLUS
Task: For named Atlantic hurricanes (basin 'NA', excluding names 'NOT_NAMED' and 'UNNAMED') with maximum wind speed of at least 100 knots, find the top 20 unique hurricane names with characteristic profiles most similar to 'Category 5 hurricane with maximum winds exceeding 150 knots, minimum pressure below 920 mb, causing catastrophic damage'. The profile should be formatted as 'Hurricane with maximum sustained winds of {max_wind} knots and minimum central pressure of {min_pressure} millibars', where NULL pressure values are displayed as 'unknown'. For hurricanes with the same name across different seasons, use the highest recorded wind speed and lowest recorded pressure. Return the hurricane name, maximum wind speed, and minimum pressure. Order by similarity score rounded to 1 decimal place descending, with ties broken first by maximum wind speed descending, then by hurricane name alphabetically.
Required AI functions: AI_SIMILARITY
Database: NOAA_DATA_PLUS
Task: For each city and its associated zip code where hurricanes have fallen within the zip code boundaries, provide the count of distinct hurricanes and an AI-aggregated list of hurricane names. The hurricane names should be pre-sorted alphabetically in SQL, then passed to AI aggregation with the instruction: 'Return the provided list of hurricane names exactly as given, formatted as: NAME1, NAME2, NAME3'. Exclude unnamed hurricanes (those with null, empty, or placeholder names like 'NOT_NAMED', 'UNNAMED', 'NO NAME', 'NONAME', or 'UNKNOWN'). Output the city, zip code, state code, hurricane count, and aggregated hurricane names. Sort the results by hurricane count in descending order, then alphabetically by city, then by zip code. Limit to the top 50 results.
Required AI functions: AI_AGG
Database: DEATH
Task: For each age from 12 through 18 (inclusive, where AgeType = 1), provide in a single row per age: the total number of vehicle-related deaths, the number of vehicle-related deaths among individuals identified as Black (race description containing 'black'), the total number of firearm-related deaths, and the number of firearm-related deaths among individuals identified as Black. Vehicle-related deaths are those linked via EntityAxisConditions to ICD-10 codes whose descriptions contain 'vehicle', and firearm-related deaths are those linked to ICD-10 codes whose descriptions contain 'firearm'. Additionally, for each age group, aggregate all the ICD-10 descriptions of these deaths using the instruction: 'List the 3 most common specific causes of death mentioned, breaking ties alphabetically by cause name. Format: [cause1]; [cause2]; [cause3]'. Order results by age ascending.
Required AI functions: AI_AGG
Database: CHICAGO
Task: For each year from 2010 to 2016, which location type had the highest monthly motor vehicle theft count, considering only automobile thefts? Filter to thefts where the condition 'This vehicle theft description refers to a standard automobile or car (not motorcycle, truck, or bus): ' concatenated with the description field evaluates to true. Classify each theft's location_description into exactly one of ['Street/Public', 'Residential', 'Commercial', 'Parking/Garage', 'Other']. For each year, return the location category with the highest peak monthly theft count along with that peak count. If there is a tie in peak monthly thefts, rank by location category alphabetically.
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: OPEN_TARGETS_PLATFORM_2
Task: First, identify all target genes that are associated with disease 'EFO_0000676' from the data source 'IMPC'. From these genes, select the top 20 by their overall association score for the same disease. Then, filter to only those where the condition 'The following gene is involved in immune system or inflammatory processes: ' concatenated with the approved name evaluates to true. Finally, find the one with an approved name most semantically similar to 'immune system signaling and inflammatory response'. Return only the approved symbol.
Required AI functions: AI_FILTER, AI_SIMILARITY
Database: USFS_FIA
Task: Using the latest evaluation group per state for the 'EXPCURR' evaluation type, identify which state has the highest total timberland acreage and which has the highest total forestland acreage. Calculate total acres by summing macroplot and subplot acres from the pre-aggregated timberland and forestland estimate tables. Filter to states whose forest profile (formatted as 'State: {state_name}, Timberland: {timberland_acres} acres, Forestland: {forestland_acres} acres' with acres rounded to whole numbers) has similarity greater than 0.3 to the reference text 'State with substantial forest land resources suitable for timber production and conservation'. For each qualifying state, classify its forest significance into exactly one of ['Major-Forest-State', 'Moderate-Forest-State', 'Minor-Forest-State'] based on the same profile format, then further filter to only states classified as 'Major-Forest-State' or 'Moderate-Forest-State'. Return for each category (Timberland and Forestland): the category name, state code, evaluation group, state name, total acres (rounded to 2 decimal places), and forest significance classification. If there are ties in total acres, break ties by state code ascending.
Required AI functions: AI_CLASSIFY, AI_SIMILARITY
Database: CRYPTO
Task: Provide daily cumulative counts of sophisticated smart contract deployments on Ethereum between August 30, 2018 and September 30, 2018. A deployment is considered sophisticated if filtering with the phrase 'This deployment represents a sophisticated smart contract with substantial computational requirements: ' concatenated with a description formatted as 'Contract deployment metrics - Gas consumed: {gas_used} units, Value: {value} Wei, Internal operations: {subtraces}' evaluates to true. Split the counts by external creators (where trace_address is null or empty string) versus contract creators (where trace_address is not null and not empty). Only include successful creations where status equals 1. Include every date in the range even if no sophisticated contracts were created, showing strictly increasing cumulative totals.
Required AI functions: AI_FILTER
Database: SAN_FRANCISCO_PLUS
Task: Find the latest ride for each region between 2014 and 2017, and classify each starting station into one of ['Business District', 'Residential Area', 'Transit Hub', 'Parks/Recreation', 'Other'] based on the station name. Only include rides where the station is classified as 'Business District' or 'Transit Hub', and where the station name semantically matches the condition 'This location is in a busy urban commercial area: ' concatenated with the station name. Return the region name, trip ID, ride duration in seconds, start time, starting station name, rider gender, and station classification, ordered alphabetically by region name.
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: GOOG_BLOCKCHAIN
Task: For each month in 2023 that recorded at least one transaction on the Polygon blockchain, what were the total transaction count and transactions per second (calculated by dividing the monthly count by the exact number of seconds in that month, rounded to 4 decimal places)? Rank the results by how closely each month's performance matches 'optimal blockchain performance with high transaction throughput and fast processing speed', using a description formatted as 'Month with {count} total transactions and {tps} transactions per second throughput'. Show the top 3 months with their year, month, transaction count, and TPS, ordered from best to worst performance match.
Required AI functions: AI_SIMILARITY
Database: COVID19_SYMPTOM_SEARCH
Task: Calculate the overall percentage change in average weekly search frequency for the symptom 'Anosmia' across the five NYC counties (Bronx County, Queens County, Kings County, New York County, Richmond County) by taking a single pooled average of all county-week observations from January 1, 2019 through December 31, 2019 and comparing it to the pooled average from January 1, 2020 through December 31, 2020. Round the percentage change to 2 decimal places. Classify the epidemiological significance of this change into exactly one of ['Dramatic Surge', 'Significant Increase', 'Moderate Increase', 'Slight Increase', 'No Significant Change'] based on input formatted as 'The year-over-year percentage change in symptom search frequency is {percentage}%'. Only return results where the filter condition formatted as 'A {percentage}% year-over-year increase in health symptom search frequency is epidemiologically noteworthy' evaluates to true.
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: COVID19_SYMPTOM_SEARCH
Task: For the United States (filtering where country_region equals 'United States'), calculate the average anxiety and depression symptom search levels from weekly country data for two periods: January 1, 2019 to January 1, 2020 (pre-pandemic, using date >= '2019-01-01' AND date < '2020-01-01') and January 1, 2020 to January 1, 2021 (pandemic year, using date >= '2020-01-01' AND date < '2021-01-01'). Compute the percentage change from the pre-pandemic period to the pandemic period for each symptom. For each symptom, create a description formatted as 'Mental health symptom {symptom} showed a {pct_change}% change during the pandemic'. Classify each symptom's public health significance into exactly one of ['Concerning', 'Neutral', 'Positive'] based on this description. Order results by semantic similarity between this description and 'concerning mental health crisis worsening during COVID pandemic', with the most similar (most concerning) first. Return the symptom name (capitalized, e.g., 'Anxiety', 'Depression'), both period averages rounded to 4 decimal places, percentage change rounded to 2 decimal places, and the health concern classification.
Required AI functions: AI_CLASSIFY, AI_SIMILARITY