tianyang/spider2-aifunc huggingface dataset:
Database: STACKOVERFLOW
Task: Which categories of gold badges do Stack Overflow users most commonly earn as their first gold badge, focusing only on badges that represent user contribution achievements? First, filter badge names using the condition 'This Stack Overflow badge name represents an achievement earned through user contributions such as asking questions, providing answers, or community participation: ' concatenated with the badge name. Then classify each remaining badge name into exactly one of ['Content Quality', 'Community Engagement', 'Site Loyalty', 'Visibility', 'Moderation']. For each category, display the number of users who earned a badge in that category as their first gold badge and the average number of days from account creation to earning the badge (rounded to whole days). Order results by user count descending, then by category name ascending for any ties.
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: STACKOVERFLOW
Task: Find the top 10 gold badges that users most commonly earn as their first gold badge on Stack Overflow. For each badge, show the badge name, the count of users who earned it as their first gold badge, the average days from account creation to earning the badge (rounded to 2 decimal places), the predominant sentiment (most common among 'positive', 'negative', 'neutral', 'mixed', 'unknown', with ties broken alphabetically) from the 'about me' descriptions, and a summary of common user interests. When determining a user's first gold badge, if multiple gold badges share the same earliest date, select the one with the lowest badge ID. Analyze up to 50 users per badge (selected by ascending user_id) who have 'about me' descriptions of at least 20 characters. For the interest summary, aggregate descriptions using the instruction: 'List the top 3 common themes or interests among these users, formatted as: theme1; theme2; theme3'. Order results by user count descending, then by badge name ascending.
Required AI functions: AI_AGG, AI_SENTIMENT
Database: STACKOVERFLOW
Task: For Python-tagged Stack Overflow questions asked in 2021 (limited to the earliest 5000 by creation date), filter to those where the condition 'This question expresses urgency or a deadline: ' concatenated with the title evaluates to true. Classify each remaining question into exactly one of ['Bug/Error', 'How-To', 'Conceptual', 'Performance', 'Other'] based on title. For each classification category and day of week combination, show the count of questions, count answered within one hour (where the first answer was posted within 3600 seconds of the question), and the percentage answered within one hour. Order results by category alphabetically, then by day of week from Monday (1) through Sunday (7). Display day names as full words (Monday, Tuesday, etc.) and percentages rounded to 2 decimal places.
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: STACKOVERFLOW
Task: Among Stack Overflow questions that either have an accepted answer or have at least one answer with a score-to-view ratio exceeding 0.01, find the top 10 longest questions (by body text length) where the title passes the filter condition 'This is a technical programming question about code implementation, debugging, or data manipulation: ' concatenated with the question title, AND the question is classified as either 'Data Processing' or 'Database' from the categories ['Data Processing', 'Web Development', 'System Programming', 'Database', 'Other'] based on the question title. Return the question ID, title, the classification result, body length, the asking user's reputation, net votes (calculated as up_votes minus down_votes), and total badge count. If there are ties in body length, break ties by question ID ascending.
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: STACKOVERFLOW
Task: Retrieve the top 10 longest Stack Overflow questions (measured by body text length) where each question either has an accepted answer or has no accepted answer but has at least one answer with a score-to-view ratio exceeding 0.01. For each question, analyze the overall sentiment of the question title, and extract the main technology using the field 'main_technology' with the extraction question: 'Return the name of ONE programming language or technology from this list ONLY if clearly mentioned as a technology: Python, Java, JavaScript, R (the statistical programming language), SQL, Excel, XSLT, C++, Ruby, PHP, HTML, CSS, JSON. If none clearly match or uncertain, return General.' (only accepting values from the valid list: Python, Java, JavaScript, R, SQL, Excel, XSLT, C++, Ruby, PHP, HTML, CSS, JSON, General; defaulting to 'General' for any other response). Order results by body length descending, then by sentiment priority (where 'negative' ranks first, followed by 'mixed', then 'neutral', then 'positive', then 'unknown'), then by question ID ascending as a final tie-breaker. Return the question ID, body length, user reputation, net votes (calculated as up_votes minus down_votes), total badge count, title sentiment, and main technology.
Required AI functions: AI_EXTRACT, AI_SENTIMENT
Database: IDC
Task: How many unique StudyInstanceUIDs are there in the 'qin_prostate_repeatability' collection (using collection_id) where the series description is classified into one of ['DWI Diffusion Imaging', 'T2 Weighted Imaging', 'ADC Mapping', 'Anatomical Segmentation', 'Other'] based on the series description text, filtering to only series classified as 'DWI Diffusion Imaging', 'T2 Weighted Imaging', 'ADC Mapping', or 'Anatomical Segmentation', and where the series description satisfies the condition 'This MRI series involves diffusion weighted imaging (DWI), T2-weighted imaging, apparent diffusion coefficient (ADC), or anatomical segmentation - it is NOT a dynamic contrast enhanced (DCE) series' when evaluated as '{SeriesDescription} - {condition}'?
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: IDC
Task: Within the 'prostatex' collection, for MRI sequences where Modality is 'MR' and SeriesDescription contains either 't2_tse_tra' or 'ADC', first validate that each sequence represents a valid diagnostic imaging sequence (not a test, calibration, or phantom scan) using the condition 'This MRI sequence description represents a valid diagnostic imaging sequence (not a test, calibration, or phantom scan): ' concatenated with the SeriesDescription. Then classify each validated sequence into exactly one of ['t2w_prostateX', 'adc_prostateX', 'Other'] based on SeriesDescription, where 't2w_prostateX' means 'T2-weighted turbo spin echo transverse sequence for anatomical prostate imaging', 'adc_prostateX' means 'Apparent Diffusion Coefficient map derived from diffusion-weighted imaging', and 'Other' means 'Other MRI sequence types not fitting the above categories'. Filter to only sequences classified as 't2w_prostateX' or 'adc_prostateX', then calculate the average Repetition Time, average Echo Time, and average Slice Thickness across these sequences, and compute the sum of these three averages as the combined overall average.
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: IDC
Task: What is the total frame count across all whole slide microscopy images (where ImageType contains 'VOLUME') from the tcga_brca collection using SM modality, filtering to images that include at least one eosin-based staining step in their SpecimenPreparationSequence? An eosin-based staining step is semantically identified by evaluating the condition 'This specimen preparation step uses eosin-based staining: ' concatenated with the CodeMeaning text (from either ConceptCodeSequence or ConceptNameCodeSequence in the SpecimenPreparationStepContentItemSequence).
Required AI functions: AI_FILTER
Database: IDC
Task: What is the total frame count for whole slide microscopy VOLUME images in the TCGA-BRCA collection (using collection_id = 'tcga_brca') with SM modality, where specimen preparation includes eosin-based staining? For each image, concatenate all distinct preparation step descriptions (from CodeMeaning fields in SpecimenPreparationStepContentItemSequence) separated by commas, then extract into field 'has_eosin' using the question: 'Based on these specimen preparation steps, does this specimen include eosin-based staining (eosin, eosin Y, water soluble eosin, or any eosin variant)? Answer exactly: yes or no'. Filter for images where the extracted answer is 'yes' and sum the total frames.
Required AI functions: AI_EXTRACT
Database: OPEN_TARGETS_GENETICS_2
Task: Among genes whose descriptions are semantically related to 'immune system regulation and inflammatory response' (similarity score above 0.3), identify the top 10 genes with the strongest associations across all studies. For each gene within each study, first select the variant with the lowest p-value from the DISEASE_VARIANT_GENE table, then find each gene's best p-value across all studies. Consider only the top 200 candidate genes ranked by p-value (with alphabetical gene_id as tie-breaker). For each qualifying gene, classify its immune function into exactly one of ['Innate Immunity', 'Adaptive Immunity', 'Inflammation', 'Cell Signaling', 'Other Immune Function'] based on the gene description. Return the gene_id, gene_name, immune function classification, and p-value for the 10 genes with the smallest p-values. If multiple genes share the same p-value, rank them alphabetically by gene_id.
Required AI functions: AI_CLASSIFY, AI_SIMILARITY
Database: WORLD_BANK
Task: Using the World Bank datasets, for entities that satisfy the semantic condition 'The following is a sovereign independent country, not a regional aggregate, income classification group, or multi-country organization: ' concatenated with the entity name, how many in each development category experienced more than 1% growth from 2017 to 2018 in both total population and per capita current health expenditure (PPP, indicator code 'SH.XPD.CHEX.PP.CD')? Classify each qualifying country into exactly one of ['Developed Economy', 'Emerging Economy', 'Developing Economy', 'Other'] based on the country name. Return the development category and the count of countries, ordered by count descending, then by development category alphabetically if counts are tied.
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: WORLD_BANK
Task: For Russia's debt indicators with a value of exactly 0 (excluding NULL values), how many distinct indicators fall into each category when classified into ['External Debt', 'Government Debt', 'Private Debt', 'Trade Debt', 'Other'] based on the indicator name? Only include indicators where the condition 'This indicator name describes a debt amount or obligation, not a ratio, rate, or index: ' concatenated with the indicator name evaluates to true.
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: WORLD_BANK
Task: Using each country's most recent available GDP (constant 2015 US$) data, which World Bank region classified as 'Developed Economies' (from ['Developed Economies', 'Emerging Markets', 'Developing Economies'] based on region name) has the highest median GDP, considering only genuine geographic regions that satisfy the condition 'This is a genuine World Bank geographic region containing multiple countries, not an income-based aggregate or special category: ' concatenated with the region name?
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: FDA
Task: Which Colorado zip code has the highest concentration of community bank locations per block group, where banks are classified into exactly ['National Bank', 'Regional Bank', 'Community Bank', 'Credit Union', 'Other'] based on institution name, and only banks classified as 'Community Bank' that also satisfy the condition 'This bank name suggests it is locally owned and independent: ' concatenated with the institution name are included? Concentration is calculated as the sum of weighted bank counts divided by the number of overlapping block groups, where weighted bank count is the number of qualifying banks in that zip code multiplied by the overlap ratio (intersection area divided by block group area).
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: META_KAGGLE
Task: Among the top 500 highest-scoring first messages in forum topics (identified by the FirstForumMessageId field, where message score is the count of distinct users who voted, message length is between 100 and 1500 characters, and ties in score are broken by message ID ascending), find those where the overall sentiment is 'positive'. For the top 3 users who authored these positive first messages, ranked by message score in descending order with ties broken by username alphabetically ascending, show each user's username, the absolute difference between their message score and the average message score across all positive first messages in this top-500 set (rounded to 2 decimal places), and the main topic of their message extracted into a field named 'main_topic' using the extraction question 'What is the main topic or theme of this forum message in 3-5 words?'.
Required AI functions: AI_EXTRACT, AI_SENTIMENT
Database: THELOOK_ECOMMERCE
Task: Among browsers classified into exactly one of ['Modern Browser', 'Legacy Browser', 'Niche Browser'] based on browser name, which three browsers classified as 'Modern Browser' have the shortest average session duration—calculated by the difference in seconds between the earliest and latest timestamps for each session—while only including browsers that have more than 10 total sessions? In case of ties in average session duration, rank by similarity to 'widely-used contemporary web browser' in descending order. Return the browser name and its average session duration.
Required AI functions: AI_CLASSIFY, AI_SIMILARITY
Database: CRYPTO
Task: For Bitcoin data, compare two methods of calculating yearly output value averages: (1) Merged outputs method - union the inputs and outputs tables, filter to output records only, and calculate the average of individual output values per year using block_timestamp from the outputs table (converted from microseconds); (2) Transactions method - calculate the average of output_value per year using block_timestamp from the transactions table (converted from microseconds). For years with data in both methods, compute the difference (merged outputs average minus transactions average). Generate a description for each year formatted as 'Year {YEAR}: the merged outputs average was {X} billion satoshis {lower/higher} than the transactions average' where X is the absolute difference rounded to 2 decimal places. First, filter to years where the condition 'The following methodological discrepancy between two calculation methods is significant enough to warrant investigation: {year_description}' evaluates to true. Then rank the filtered years by semantic similarity to 'severe methodological discrepancy with very large difference between calculation methods' and return the top 3 most similar years, using year descending as tiebreaker. Return only the year and difference value.
Required AI functions: AI_FILTER, AI_SIMILARITY
Database: CRYPTO
Task: Among all Bitcoin addresses that have at least one transaction in October 2017 (combining both inputs and outputs, where October 2017 is defined as timestamps from '2017-10-01 00:00:00' to before '2017-11-01 00:00:00'), first identify addresses whose final transaction occurred on the last day of October 2017 (October 31, 2017). From these addresses, filter to those that satisfy the condition 'This address demonstrates significant trading activity with substantial transaction volume: ' concatenated with a description formatted as 'Total value: {total_value} satoshis, Transaction count: {tx_count}'. Among these filtered addresses, find the one whose final transaction occurred at the absolute latest timestamp (to the second precision). If multiple addresses share the exact same latest timestamp, select the one with the highest sum of transaction values. For the resulting address, classify its activity pattern into exactly one of ['High-Volume Trader', 'Moderate Trader', 'Casual User', 'Minimal Activity'] based on a description formatted as 'Total transaction value: {total_value} satoshis across October 2017 transactions'. Return the address and its activity classification.
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: IDC
Task: For DICOM image files with SEG or RTSTRUCT modalities and SOP Class UID '1.2.840.10008.5.1.4.1.1.66.4' that have no references to other series, images, or sources (where ReferencedSeriesSequence, ReferencedImageSequence, and SourceImageSequence all have zero elements, treating NULL arrays as zero-length), first filter to only those where the condition 'This medical imaging collection is related to pulmonary or thoracic imaging research: ' concatenated with the collection_id evaluates to true. Then classify each remaining collection into exactly one of ['Oncology Research', 'Quality Assurance', 'Lung Imaging', 'Other'] based on the collection_id name, returning only results where the classification is 'Oncology Research' or 'Lung Imaging'. Group by collection, study, and series IDs, and provide the collection classification, the viewer URL formatted as 'https://viewer.imaging.datacommons.cancer.gov/viewer/' followed by the study ID, and the total size in kilobytes rounded to whole numbers. Sort from largest to smallest size, with ties broken by collection_id, then study_id, then series_id in ascending order.
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: IDC
Task: For DICOM image files with SEG or RTSTRUCT modality and SOP Class UID '1.2.840.10008.5.1.4.1.1.66.4' that have no references to other series, images, or sources (all reference sequence arrays empty or null), extract the anatomical focus from each collection ID using the extraction question: 'What anatomical body part or organ is referenced in this medical imaging collection name? Return only the body part name (e.g., lung, brain, chest) or "unspecified" if none is mentioned.' into a field named 'body_part'. Group by collection, study, and series IDs, showing the collection ID, study ID, series ID, viewer URL (formatted as 'https://viewer.imaging.datacommons.cancer.gov/viewer/' followed by the study ID), and total size in kilobytes (rounded to whole numbers). Normalize any extraction result that is null, empty, 'nan', 'n/a', 'none', or 'null' to 'unspecified'. Order by size from largest to smallest, then by extracted body part alphabetically, then by series ID alphabetically for any remaining ties.
Required AI functions: AI_EXTRACT
Database: IDC
Task: Among publicly accessible DICOM segmentation data where Modality is 'SEG' and SOPClassUID is '1.2.840.10008.5.1.4.1.1.66.4', and where each segmentation references its original image (segmented_SeriesInstanceUID is not null), which 5 distinct segmentation category names (from SegmentedPropertyCategory.CodeMeaning) are most semantically similar to 'abnormal pathological tissue structure'? Only include categories where the condition 'This medical term represents a type of anatomical structure or tissue: ' concatenated with the category name evaluates to true.
Required AI functions: AI_FILTER, AI_SIMILARITY
Database: IDC
Task: For publicly accessible DICOM segmentation data where Modality is 'SEG' and SOPClassUID is '1.2.840.10008.5.1.4.1.1.66.4', identify the five segmentation categories (by SegmentedPropertyCategory.CodeMeaning) that occur most frequently. For each category, report its frequency count and aggregate the associated SegmentedPropertyType.CodeMeaning values using the instruction 'List the top 3 most common segmentation property types, formatted as: Type1; Type2; Type3'. If there are ties in frequency, order alphabetically by category name.
Required AI functions: AI_AGG
Database: IDC
Task: From the MR series with SeriesInstanceUID '1.3.6.1.4.1.14519.5.2.1.3671.4754.105976129314091491952445656147' in the DICOM_ALL table and its associated segmentation records from the SEGMENTATIONS table (where segmented_SeriesInstanceUID matches), classify each segmentation record based on its SegmentedPropertyCategory into exactly one of ['Lesion', 'Anatomy', 'Tissue', 'Other']. Then filter to only segmentation records classified as 'Lesion' or 'Anatomy', and further filter to those where the condition 'This segmentation is clinically significant for diagnostic purposes: ' concatenated with the SegmentedPropertyCategory evaluates to true. Assign modality 'SEG' to all segmentation records. Determine which modality has the greatest number of records in total and report that modality along with its count.
Required AI functions: AI_CLASSIFY, AI_FILTER
Database: IDC
Task: For the MR series with SeriesInstanceUID '1.3.6.1.4.1.14519.5.2.1.3671.4754.105976129314091491952445656147', combine its SOP instances from DICOM_METADATA with associated segmentation SOP instances from SEGMENTATIONS (where segmented_SeriesInstanceUID matches, labeled as modality 'SEG'). Which modality has the most SOP instances (alphabetically first if tied), how many are there, and what types of content do those instances represent? Aggregate the winning modality's instance descriptions using the instruction: 'List the distinct content types, formatted as: Type1; Type2; Type3'. For MR instances, use SeriesDescription (or 'MR imaging series' if null); for SEG instances, use the format '{CodeMeaning from SegmentedPropertyCategory, or "Segmentation"} - {SegmentAlgorithmName or "Unknown algorithm"}'.
Required AI functions: AI_AGG
Database: GEO_OPENSTREETMAP
Task: Among historical nodes originally tagged with amenities 'hospital', 'clinic', or 'doctors' within latitude 31.1798246 to 54.3798246 and longitude 18.4519921 to 33.6519921, which three usernames contributed the most nodes that are now missing from the current planet_nodes dataset? Consider only nodes classified as 'Hospital' from the categories ['Hospital', 'Clinic', 'Doctor Office', 'Other Healthcare'] based on the formatted input 'Healthcare facility with tags: {all_tags}', and further filtered to those with similarity above 0.2 to 'major public hospital medical center'. Break ties alphabetically by username.
Required AI functions: AI_CLASSIFY, AI_SIMILARITY
Database: OPEN_TARGETS_PLATFORM_1
Task: For approved drugs with black box warnings and known drug types among 'Keytruda', 'Vioxx', 'Premarin', and 'Humira', display the drug id, drug type, withdrawal status, the overall sentiment of their drug descriptions (one of: 'positive', 'negative', 'neutral', 'mixed', or 'unknown'), and extract the year of first approval from the description into a field named 'first_approval_year' using the extraction question 'What year was this drug first approved? Return only the 4-digit year number.'
Required AI functions: AI_EXTRACT, AI_SENTIMENT
Database: CMS_DATA
Task: For participants with dermatological conditions defined by ICD-10-CM codes starting with L70 (Acne), L20 (Atopic Dermatitis), L40 (Psoriasis), or L80 (Vitiligo) mapped to their standard concepts via the 'Maps to' relationship, calculate the percentage of total participants. Only include standard concepts where the concept name has a semantic similarity score above 0.35 to 'chronic inflammatory skin disorder requiring medical treatment'. Report the percentage of total participants (rounded to 2 decimal places) grouped by condition category, ordered alphabetically by condition category.
Required AI functions: AI_SIMILARITY
Database: GITHUB_REPOS
Task: For the top 2 GitHub repositories where JavaScript is the primary language (determined by the language with the most bytes), ranked by the number of commits classified as 'Feature Addition' from the categories ['Bug Fix', 'Feature Addition', 'Code Refactor', 'Documentation', 'Maintenance', 'Other'] based on the commit subject, list the repository names, feature commit counts, and the single most common feature topic aggregated using the instruction: 'What is the single most frequently mentioned component, module, or UI element name (excluding common action verbs like add, fix, update, remove, change) in these commit subjects? Return exactly one word in lowercase singular form (e.g., button not buttons), nothing else.'.
Required AI functions: AI_AGG, AI_CLASSIFY