[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-83061-en":3,"doc-seo-83061-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":13,"seo_description":14,"update_tm":28,"read_time":29},83061,1374391975076,"Riley","https://ap-avatar.wpscdn.com/avatar/14000253ca4ec9f6853?x-image-process=image/resize,m_fixed,w_180,h_180&k=1783305029341752051",8,"Research & Report","Spider 2.0-AIFunc: Extending Real-World Text-to-SQL to AI-Native SQL Workflows","Major cloud data platforms expose large language model capabilities as native SQL functions, letting analysts perform classification, filtering, sentiment analysis, extraction, similarity search, and aggregation inside standard SQL queries. Existing text-to-SQL benchmarks evaluate only conventional SQL and do not test the ability to generate AI-native SQL. Spider 2.0-AIFunc introduces 465 verified instances over 125 real-world databases, covering six Snowflake AI function types, built via an agent pipeline with stability-checked execution and evaluation across ten state-of-the-art models.","arXiv :2607 .06229v 1 [ cs .CL] 7 Jul 2026  \nSpider 2.0-AIFunc: Extending Real-World Text-to-SQL to AINative SQL Workflows  \nTianyang Liu1 Canwen Xu2, Fangyu Lei3, Nikki Lijing Kuang2, Jixuan Chen1, Tao Yu3, Julian McAuley1, Zhewei Yao2, Yuxiong He2  \n1UC San Diego 2Snowflake AI Research 3University of Hong Kong  \n{til040,[jmcauley}@ucsd.edu {canwen.xu](jmcauley}@ucsd.edu {canwen.xu) ,zhewei.yao,[yuxiong.he}@snowflake.com](yuxiong.he}@snowflake.com)  \nAbstract  \nMajor cloud data platforms now expose large language model capabilities as native SQL functions, enabling analysts to perform classification, filtering, sentiment analysis, extraction, similarity search, and aggregation within ordinary SQL queries. Yet existing text-to-SQL benchmarks evaluate only conventional SQL and provide no signal on whether models can generate such AI-native SQL. We introduce Spider 2.0-AIFunc, a benchmark of 465 verified instances across 125 real-world databases covering six types of AI functions on the Snowflake platform. Starting from an existing enterprise text-to-SQL benchmark, we construct Spider 2.0-AIFunc through an agent-based pipeline that rewrites source tasks into AI-native form, simultaneously transforming target queries and refining natural language instructions to make the intended AI-native solution explicit and reduce ambiguity. All instances pass a multi-round repeated execution protocol across temporally separated windows to confirm result stability before release. Evaluating ten state-of-the-art language models, we find that the strongest proprietary models reach 67–70% execution accuracy while the best open-source model achieves 58.1%, a gap driven primarily by errors in predicate specification, schema grounding, and AI function parameterization. Agent frameworks designed for traditional text-to-SQL challenges, such as schema retrieval and relevant table selection, do not transfer effectively to AI-native SQL: a minimal agent setup consistently matches or outperforms more elaborate alternatives, suggesting that the strategies these frameworks employ are less critical in this setting.  \n1 Introduction  \nMuch of enterprise data analysis begins with questions that are easy to ask in natural language but awkward to express in traditional SQL: Which support tickets describe billing issues? Which survey responses mention churn risk? Which product reviews are negative, and what are customers complaining about? Consider the last case. A data analyst has a table of product reviews stored in a cloud data warehouse and wants to analyze their sentiment and categorize the negative ones by complaint type. Until recently, answering this kind of question meant extracting the text from the database, running sentiment analysis and classification models in a separate environment, and loading the results back. Today, on platforms like Snowflake, this can be done directly in SQL using AI functions such as AI_SENTIMENT and AI_CLASSIFY:  \nSELECT  \nreview_id,  \nAI_SENTIMENT(review_text) AS sentiment, AI_CLASSIFY (  \nreview_text,[ ' shipping ' , ' quality ' , ' service ' , ' pricing ' ]  \n):labels AS complaint_type FROM product_reviews;  \n∗ Work done during Tianyang Liu’s internship at Snowflake.  \nFigure 1: An example of transforming a traditional SQL task into an AI-native SQL instance in SPIDER 2.0-AIFUNC. The original instruction and gold SQL are rewritten to incorporate a Snowflake Cortex AI function (AI_SIMILARITY) . Highlighted spans indicate the injected AI requirement and the corresponding SQL transformation.  \nSuch functions can be combined with standard SQL aggregations, filters, and joins, enabling analysts to express semantic operations over unstructured text within ordinary SQL queries (Snowflake, 2026) . Snowflake is not alone in this direction. BigQuery (Google Cloud, 2026), Databricks (Databricks, 2026), and other major cloud platforms have all introduced SQL-callable AI functions, enabling a broad spectrum of semantic operations, fr","cbCaisrnL66smvpD","https://ap.wps.com/l/cbCaisrnL66smvpD","pdf",1105810,4,1,23,"English","en",105,"# Abstract\n# 1 Introduction\n## Motivation for AI-native SQL workflows\n## Example: sentiment and complaint categorization with AI functions","[{\"question\":\"What problem does Spider 2.0-AIFunc address in existing text-to-SQL work?\",\"answer\":\"Existing benchmarks target conventional SQL only and provide no signal on whether models can generate AI-native SQL that includes AI function calls.\"},{\"question\":\"How is Spider 2.0-AIFunc constructed from prior benchmarks?\",\"answer\":\"It rewrites Spider2-Snow instances into AI-native SQL by injecting Snowflake Cortex AI functions, transforming the target SQL and refining natural-language instructions, including handling multiple gold SQLs when present.\"},{\"question\":\"Why do agent frameworks for traditional text-to-SQL transfer poorly to AI-native SQL?\",\"answer\":\"The document reports that minimal agent setups match or outperform more elaborate alternatives, indicating that prior strategies like schema retrieval and table selection are less critical for AI-native SQL generation.\"}]",1784184934,58,{"code":4,"msg":31,"data":32},"ok",{"site_id":25,"language":24,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"spider-20-aifunc-extending-real-world-text-to-sql-to-ai-native-sql-workflows","",{"@graph":36,"@context":85},[37,53,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,51],{"item":41,"name":42,"@type":43,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":50},"https://docshare.wps.com/document/research-report/",3,{"item":52,"name":13,"@type":43,"position":20},"https://docshare.wps.com/document/spider-20-aifunc-extending-real-world-text-to-sql-to-ai-native-sql-workflows/83061/",{"url":52,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":24,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-21","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What problem does Spider 2.0-AIFunc address in existing text-to-SQL work?","Question",{"text":75,"@type":76},"Existing benchmarks target conventional SQL only and provide no signal on whether models can generate AI-native SQL that includes AI function calls.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How is Spider 2.0-AIFunc constructed from prior benchmarks?",{"text":80,"@type":76},"It rewrites Spider2-Snow instances into AI-native SQL by injecting Snowflake Cortex AI functions, transforming the target SQL and refining natural-language instructions, including handling multiple gold SQLs when present.",{"name":82,"@type":73,"acceptedAnswer":83},"Why do agent frameworks for traditional text-to-SQL transfer poorly to AI-native SQL?",{"text":84,"@type":76},"The document reports that minimal agent setups match or outperform more elaborate alternatives, indicating that prior strategies like schema retrieval and table selection are less critical for AI-native SQL generation.","https://schema.org",{"og:url":52,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":52},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,135],{"id":21,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":20,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":46,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":46,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]