{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,18]],"date-time":"2026-05-18T19:06:59Z","timestamp":1779131219677,"version":"3.51.4"},"reference-count":47,"publisher":"Association for Computing Machinery (ACM)","issue":"3","content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. ACM Manag. Data"],"published-print":{"date-parts":[[2026,5,18]]},"abstract":"<jats:p>\n                    Large Language Models (LLMs) vary significantly in metrics such as accuracy, latency, and cost, making it challenging for users and applications to decide which model to invoke for each query. This paper presents O\n                    <jats:sc>cto<\/jats:sc>\n                    S\n                    <jats:sc>elector<\/jats:sc>\n                    , a framework for LLM selection that satisfies user-defined objectives and constraints across multiple metrics. In the pre-processing phase, O\n                    <jats:sc>cto<\/jats:sc>\n                    S\n                    <jats:sc>elector<\/jats:sc>\n                    learns difficulty-aware representations of queries based on both input and output complexity, clustering them into similar difficulty groups to enable efficient performance estimation across multiple LLMs. During inference, O\n                    <jats:sc>cto<\/jats:sc>\n                    S\n                    <jats:sc>elector<\/jats:sc>\n                    supports LLM selection for batched workload, formulating it as an Integer Linear Programming (ILP) problem that optimizes a user-defined objective (e.g., minimizing cost or latency, or maximizing accuracy) while enforcing constraints on other metrics. We evaluate O\n                    <jats:sc>cto<\/jats:sc>\n                    S\n                    <jats:sc>elector<\/jats:sc>\n                    on two types of tasks: NL2SQL using the Spider and BIRD benchmarks, and sentiment analysis using the IMDb benchmark. When optimizing for cost under accuracy and latency constraints, O\n                    <jats:sc>cto<\/jats:sc>\n                    S\n                    <jats:sc>elector<\/jats:sc>\n                    achieves up to a 67.7% cost reduction on NL2SQL tasks for batched workloads compared to state-of-the-art approaches.\n                  <\/jats:p>","DOI":"10.1145\/3802095","type":"journal-article","created":{"date-parts":[[2026,5,18]],"date-time":"2026-05-18T18:19:16Z","timestamp":1779128356000},"page":"1-26","source":"Crossref","is-referenced-by-count":0,"title":["O\n                    <scp>cto<\/scp>\n                    S\n                    <scp>elector<\/scp>\n                    : Efficient and Effective Batch-Aware Model Selection for Large Language Models"],"prefix":"10.1145","volume":"4","author":[{"ORCID":"https:\/\/orcid.org\/0009-0007-1657-4200","authenticated-orcid":false,"given":"Guangxue","family":"Zhang","sequence":"first","affiliation":[{"name":"University of California, Irvine, Irvine, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6792-2155","authenticated-orcid":false,"given":"Yiming","family":"Lin","sequence":"additional","affiliation":[{"name":"University of California, Berkeley, Berkeley, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-1667-5435","authenticated-orcid":false,"given":"Sharad","family":"Mehrotra","sequence":"additional","affiliation":[{"name":"University of California, Irvine, Irvine, CA, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2026,5,18]]},"reference":[{"key":"e_1_2_1_1_1","unstructured":"2025. https:\/\/ai.google.dev\/gemini-api\/docs\/models."},{"key":"e_1_2_1_2_1","unstructured":"2025. https:\/\/docs.anthropic.com\/en\/docs\/about-claude\/models\/all-models."},{"key":"e_1_2_1_3_1","unstructured":"2025. https:\/\/openai.com\/api\/pricing\/."},{"key":"e_1_2_1_4_1","unstructured":"2025. https:\/\/platform.openai.com\/docs\/models\/gpt-4o."},{"key":"e_1_2_1_5_1","unstructured":"2025. https:\/\/www.anthropic.com\/pricing#anthropic-api."},{"key":"e_1_2_1_6_1","unstructured":"2026. https:\/\/drive.google.com\/file\/d\/10udgPuUg-XksCmab9jzUMyutc56jbBOK\/view?usp=sharing."},{"key":"e_1_2_1_7_1","doi-asserted-by":"crossref","first-page":"131000","DOI":"10.52202\/079017-4164","article-title":"Automix: Automatically mixing language models","volume":"37","author":"Aggarwal Pranjal","year":"2024","unstructured":"Pranjal Aggarwal, Aman Madaan, Ankit Anand, Srividya Pranavi Potharaju, Swaroop Mishra, Pei Zhou, Aditya Gupta, Dheeraj Rajagopal, Karthik Kappaganthu, Yiming Yang, et al. 2024. Automix: Automatically mixing language models. Advances in Neural Information Processing Systems 37 (2024), 131000-131034.","journal-title":"Advances in Neural Information Processing Systems"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.52202\/079017-1986"},{"key":"e_1_2_1_9_1","volume-title":"Language models enable simple systems for generating structured views of heterogeneous data lakes. arXiv preprint arXiv:2304.09433","author":"Arora Simran","year":"2023","unstructured":"Simran Arora, Brandon Yang, Sabri Eyuboglu, Avanika Narayan, Andrew Hojel, Immanuel Trummer, and Christopher R\u00e9. 2023. Language models enable simple systems for generating structured views of heterogeneous data lakes. arXiv preprint arXiv:2304.09433 (2023)."},{"key":"e_1_2_1_10_1","volume-title":"Current state of LLM Risks and AI Guardrails. arXiv preprint arXiv:2406.12934","author":"Ayyamperumal Suriya Ganesh","year":"2024","unstructured":"Suriya Ganesh Ayyamperumal and Limin Ge. 2024. Current state of LLM Risks and AI Guardrails. arXiv preprint arXiv:2406.12934 (2024)."},{"key":"e_1_2_1_11_1","volume-title":"European Conference on Advances in Databases and Information Systems. Springer, 68-78","author":"Biester Fabian","year":"2024","unstructured":"Fabian Biester, Mohamed Abdelaal, and Daniel Del Gaudio. 2024. Llmclean: Context-aware tabular data cleaning via llm-generated ofds. In European Conference on Advances in Databases and Information Systems. Springer, 68-78."},{"key":"e_1_2_1_12_1","volume-title":"Frugalgpt: How to use large language models while reducing cost and improving performance. arXiv preprint arXiv:2305.05176","author":"Chen Lingjiao","year":"2023","unstructured":"Lingjiao Chen, Matei Zaharia, and James Zou. 2023. Frugalgpt: How to use large language models while reducing cost and improving performance. arXiv preprint arXiv:2305.05176 (2023)."},{"key":"e_1_2_1_13_1","volume-title":"Dango: A Mixed-Initiative Data Wrangling System using Large Language Model. arXiv preprint arXiv:2503.03154","author":"Chen Wei-Hao","year":"2025","unstructured":"Wei-Hao Chen, Weixi Tong, Amanda Case, and Tianyi Zhang. 2025. Dango: A Mixed-Initiative Data Wrangling System using Large Language Model. arXiv preprint arXiv:2503.03154 (2025)."},{"key":"e_1_2_1_14_1","volume-title":"ICML 2024 Workshop on LLMs and Cognition.","author":"Chen Yibin","year":"2024","unstructured":"Yibin Chen, Yifu Yuan, Zeyu Zhang, Yan Zheng, Jinyi Liu, Fei Ni, and Jianye Hao. 2024. Sheetagent: A generalist agent for spreadsheet reasoning and manipulation via large language models. In ICML 2024 Workshop on LLMs and Cognition."},{"key":"e_1_2_1_15_1","first-page":"5","article-title":"Introduction to the k-means clustering algorithm based on the elbow method","volume":"1","author":"Mengyao Cui","year":"2020","unstructured":"Mengyao Cui et al. 2020. Introduction to the k-means clustering algorithm based on the elbow method. Accounting, Auditing and Finance 1, 1 (2020), 5-8.","journal-title":"Accounting, Auditing and Finance"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.2307\/2346806"},{"key":"e_1_2_1_17_1","volume-title":"Laks VS Lakshmanan, and Ahmed Hassan Awadallah","author":"Ding Dujian","year":"2024","unstructured":"Dujian Ding, Ankur Mallick, Chi Wang, Robert Sim, Subhabrata Mukherjee, Victor Ruhle, Laks VS Lakshmanan, and Ahmed Hassan Awadallah. 2024. Hybrid llm: Cost-efficient and quality-aware query routing. arXiv preprint arXiv:2404.14618 (2024)."},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.14778\/3681954.3681960"},{"key":"e_1_2_1_19_1","volume-title":"2024 IEEE 40th International Conference on Data Engineering (ICDE). IEEE, 1765-1778","author":"Fan Yuankai","year":"2024","unstructured":"Yuankai Fan, Zhenying He, Tonghui Ren, Can Huang, Yinan Jing, Kai Zhang, and X Sean Wang. 2024. Metasql: A generate-then-rank framework for natural language to sql translation. In 2024 IEEE 40th International Conference on Data Engineering (ICDE). IEEE, 1765-1778."},{"key":"e_1_2_1_20_1","volume-title":"Graphrouter: A graph-based router for llm selections. arXiv preprint arXiv:2410.03834","author":"Feng Tao","year":"2024","unstructured":"Tao Feng, Yanzhen Shen, and Jiaxuan You. 2024. Graphrouter: A graph-based router for llm selections. arXiv preprint arXiv:2410.03834 (2024)."},{"key":"e_1_2_1_21_1","volume-title":"Text-to-sql empowered by large language models: A benchmark evaluation. arXiv preprint arXiv:2308.15363","author":"Gao Dawei","year":"2023","unstructured":"Dawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun, Yichen Qian, Bolin Ding, and Jingren Zhou. 2023. Text-to-sql empowered by large language models: A benchmark evaluation. arXiv preprint arXiv:2308.15363 (2023)."},{"key":"e_1_2_1_22_1","volume-title":"Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers). 658-664","author":"Govindaraju Vidhya","year":"2013","unstructured":"Vidhya Govindaraju, Ce Zhang, and Christopher R\u00e9. 2013. Understanding tables in context using standard NLP toolkits. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers). 658-664."},{"key":"e_1_2_1_23_1","first-page":"127645","article-title":"Smoothie: Label free language model routing","volume":"37","author":"Guha Neel","year":"2024","unstructured":"Neel Guha, Mayee Chen, Trevor Chow, Ishan Khare, and Christopher Re. 2024. Smoothie: Label free language model routing. Advances in Neural Information Processing Systems 37 (2024), 127645-127672.","journal-title":"Advances in Neural Information Processing Systems"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/3703155"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/3654989"},{"key":"e_1_2_1_26_1","volume-title":"Proceedings of the 7th BlackboxNLP Workshop: Analyzing and Interpreting Neural Networks for NLP. 43-57","author":"Leybzon Danny","year":"2024","unstructured":"Danny Leybzon and Corentin Kervadec. 2024. Learning, forgetting, remembering: Insights from tracking llm memo- rization during training. In Proceedings of the 7th BlackboxNLP Workshop: Analyzing and Interpreting Neural Networks for NLP. 43-57."},{"key":"e_1_2_1_27_1","volume-title":"The dawn of natural language to SQL: are we fully ready? arXiv preprint arXiv:2406.01265","author":"Li Boyan","year":"2024","unstructured":"Boyan Li, Yuyu Luo, Chengliang Chai, Guoliang Li, and Nan Tang. 2024. The dawn of natural language to SQL: are we fully ready? arXiv preprint arXiv:2406.01265 (2024)."},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/3654930"},{"key":"e_1_2_1_29_1","first-page":"42330","article-title":"Can llm already serve as a database interface? a big bench for large-scale database grounded text-to-sqls","volume":"36","author":"Li Jinyang","year":"2023","unstructured":"Jinyang Li, Binyuan Hui, Ge Qu, Jiaxi Yang, Binhua Li, Bowen Li, Bailin Wang, Bowen Qin, Ruiying Geng, Nan Huo, et al. 2023. Can llm already serve as a database interface? a big bench for large-scale database grounded text-to-sqls. Advances in Neural Information Processing Systems 36 (2023), 42330-42357.","journal-title":"Advances in Neural Information Processing Systems"},{"key":"e_1_2_1_30_1","volume-title":"Dongmei Zhang, and Surajit Chaudhuri.","author":"Li Peng","year":"2023","unstructured":"Peng Li, Yeye He, Dror Yashar, Weiwei Cui, Song Ge, Haidong Zhang, Danielle Rifinski Fainman, Dongmei Zhang, and Surajit Chaudhuri. 2023. Table-gpt: Table-tuned gpt for diverse table tasks. arXiv preprint arXiv:2310.09263 (2023)."},{"key":"e_1_2_1_31_1","volume-title":"Proceedings of the Conference on Innovative Database Research (CIDR). 2.","author":"Liu Chunwei","year":"2025","unstructured":"Chunwei Liu, Matthew Russo, Michael Cafarella, Lei Cao, Peter Baile Chen, Zui Chen, Michael Franklin, Tim Kraska, Samuel Madden, Rana Shahout, et al. 2025. Palimpzest: Optimizing ai-powered analytics with declarative query processing. In Proceedings of the Conference on Innovative Database Research (CIDR). 2."},{"key":"e_1_2_1_32_1","volume-title":"Proceedings of the 39th IEEE\/ACM International Conference on Automated Software Engineering. 2041-2052","author":"Liu Lei","year":"2024","unstructured":"Lei Liu, So Hasegawa, Shailaja Keyur Sampat, Maria Xenochristou, Wei-Peng Chen, Takashi Kato, Taisei Kakibuchi, and Tatsuya Asai. 2024. AutoDW: Automatic Data Wrangling Leveraging Large Language Models. In Proceedings of the 39th IEEE\/ACM International Conference on Automated Software Engineering. 2041-2052."},{"key":"e_1_2_1_33_1","volume-title":"Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP). https:\/\/arxiv.org\/abs\/2307","author":"Liu Nelson F.","year":"2023","unstructured":"Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. 2023. Lost in the Middle: How Language Models Use Long Contexts. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP). https:\/\/arxiv.org\/abs\/2307.03172"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3639283"},{"key":"e_1_2_1_35_1","volume-title":"A Survey of NL2SQL with Large Language Models: Where are we, and where are we going? arXiv preprint arXiv:2408.05109","author":"Liu Xinyu","year":"2024","unstructured":"Xinyu Liu, Shuyu Shen, Boyan Li, Peixian Ma, Runzhi Jiang, Yuxin Zhang, Ju Fan, Guoliang Li, Nan Tang, and Yuyu Luo. 2024. A Survey of NL2SQL with Large Language Models: Where are we, and where are we going? arXiv preprint arXiv:2408.05109 (2024)."},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1109\/TIT.1982.1056489"},{"key":"e_1_2_1_37_1","first-page":"281","volume-title":"Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability","volume":"5","author":"MacQueen James","year":"1967","unstructured":"James MacQueen. 1967. Some methods for classification and analysis of multivariate observations. In Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability, Volume 1: Statistics, Vol. 5. University of California press, 281-298."},{"key":"e_1_2_1_38_1","first-page":"9","article-title":"Structural parse tree features for text representation. In 2013 IEEE seventh international conference on semantic computing","author":"Massung Sean","year":"2013","unstructured":"Sean Massung, ChengXiang Zhai, and Julia Hockenmaier. 2013. Structural parse tree features for text representation. In 2013 IEEE seventh international conference on semantic computing. IEEE, 9-16.","journal-title":"IEEE"},{"key":"e_1_2_1_39_1","first-page":"2434","volume-title":"Language Task Difficulty Prediction Through LLM-Annotated Meta-Features. In ECAI","author":"Moros-Daval Yael","year":"2024","unstructured":"Yael Moros-Daval, Fernando Mart\u00ednez-Plumed, and Jos\u00e9 Hern\u00e1ndez-Orallo. 2024. Language Task Difficulty Prediction Through LLM-Annotated Meta-Features. In ECAI 2024. IOS Press, 2434-2441."},{"key":"e_1_2_1_40_1","doi-asserted-by":"publisher","unstructured":"Aditya Pal Abhilash Barigidad and Abhijit Mustafi. 2020. IMDb Movie Reviews Dataset. https:\/\/doi.org\/10.21227\/zm1y- b270","DOI":"10.21227\/zm1y-"},{"key":"e_1_2_1_41_1","volume-title":"Semantic Operators: A Declarative Model for Rich, AI-based Data Processing. arXiv preprint arXiv:2407.11418","author":"Patel Liana","year":"2024","unstructured":"Liana Patel, Siddharth Jha, Melissa Pan, Harshit Gupta, Parth Asawa, Carlos Guestrin, and Matei Zaharia. 2024. Semantic Operators: A Declarative Model for Rich, AI-based Data Processing. arXiv preprint arXiv:2407.11418 (2024)."},{"key":"e_1_2_1_42_1","first-page":"29","volume-title":"Proceedings of the first instructional conference on machine learning","volume":"242","author":"Juan","unstructured":"Juan Ramos et al. 2003. Using tf-idf to determine word relevance in document queries. In Proceedings of the first instructional conference on machine learning, Vol. 242. Citeseer, 29-48."},{"key":"e_1_2_1_43_1","volume-title":"Proceedings of the 14th International Joint Conference on Natural Language Processing and the 4th Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics. 1497-1512","author":"Sheng Lei","year":"2025","unstructured":"Lei Sheng and Xu Shuai Shuai. 2025. Slm-sql: An exploration of small language models for text-to-sql. In Proceedings of the 14th International Joint Conference on Natural Language Processing and the 4th Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics. 1497-1512."},{"key":"e_1_2_1_44_1","first-page":"238","article-title":"Evaluating text complexity and Flesch-Kincaid grade level","volume":"8","author":"Solnyshkina Marina","year":"2017","unstructured":"Marina Solnyshkina, Radif Zamaletdinov, Ludmila Gorodetskaya, and Azat Gabitov. 2017. Evaluating text complexity and Flesch-Kincaid grade level. Journal of social studies education research 8, 3 (2017), 238-248.","journal-title":"Journal of social studies education research"},{"key":"e_1_2_1_45_1","volume-title":"Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task. arXiv preprint arXiv:1809.08887","author":"Yu Tao","year":"2018","unstructured":"Tao Yu, Rui Zhang, Kai Yang, Michihiro Yasunaga, Dongxu Wang, Zifan Li, James Ma, Irene Li, Qingning Yao, Shanelle Roman, et al. 2018. Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task. arXiv preprint arXiv:1809.08887 (2018)."},{"key":"e_1_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.1145\/3626246.3653375"},{"key":"e_1_2_1_47_1","volume-title":"Directions Towards Efficient and Automated Data Wrangling with Large Language Models. In 2024 IEEE 40th International Conference on Data Engineering Workshops (ICDEW). IEEE, 301-304","author":"Zhang Zeyu","year":"2024","unstructured":"Zeyu Zhang, Paul Groth, Iacer Calixto, and Sebastian Schelter. 2024. Directions Towards Efficient and Automated Data Wrangling with Large Language Models. In 2024 IEEE 40th International Conference on Data Engineering Workshops (ICDEW). IEEE, 301-304."}],"container-title":["Proceedings of the ACM on Management of Data"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3802095","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,5,18]],"date-time":"2026-05-18T18:29:27Z","timestamp":1779128967000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3802095"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,5,18]]},"references-count":47,"journal-issue":{"issue":"3","published-print":{"date-parts":[[2026,5,18]]}},"alternative-id":["10.1145\/3802095"],"URL":"https:\/\/doi.org\/10.1145\/3802095","relation":{},"ISSN":["2836-6573"],"issn-type":[{"value":"2836-6573","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,5,18]]}}}