{"title":"Harnessing LLMs for API Interactions: A Framework for Classification and Synthetic Data Generation","authors":"Chunliang Tao, Xiaojing Fan, Yahe Yang","doi":"arxiv-2409.11703","DOIUrl":null,"url":null,"abstract":"As Large Language Models (LLMs) advance in natural language processing, there\nis growing interest in leveraging their capabilities to simplify software\ninteractions. In this paper, we propose a novel system that integrates LLMs for\nboth classifying natural language inputs into corresponding API calls and\nautomating the creation of sample datasets tailored to specific API functions.\nBy classifying natural language commands, our system allows users to invoke\ncomplex software functionalities through simple inputs, improving interaction\nefficiency and lowering the barrier to software utilization. Our dataset\ngeneration approach also enables the efficient and systematic evaluation of\ndifferent LLMs in classifying API calls, offering a practical tool for\ndevelopers or business owners to assess the suitability of LLMs for customized\nAPI management. We conduct experiments on several prominent LLMs using\ngenerated sample datasets for various API functions. The results show that\nGPT-4 achieves a high classification accuracy of 0.996, while LLaMA-3-8B\nperforms much worse at 0.759. These findings highlight the potential of LLMs to\ntransform API management and validate the effectiveness of our system in\nguiding model testing and selection across diverse applications.","PeriodicalId":501030,"journal":{"name":"arXiv - CS - Computation and Language","volume":"8 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-09-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Computation and Language","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2409.11703","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
As Large Language Models (LLMs) advance in natural language processing, there
is growing interest in leveraging their capabilities to simplify software
interactions. In this paper, we propose a novel system that integrates LLMs for
both classifying natural language inputs into corresponding API calls and
automating the creation of sample datasets tailored to specific API functions.
By classifying natural language commands, our system allows users to invoke
complex software functionalities through simple inputs, improving interaction
efficiency and lowering the barrier to software utilization. Our dataset
generation approach also enables the efficient and systematic evaluation of
different LLMs in classifying API calls, offering a practical tool for
developers or business owners to assess the suitability of LLMs for customized
API management. We conduct experiments on several prominent LLMs using
generated sample datasets for various API functions. The results show that
GPT-4 achieves a high classification accuracy of 0.996, while LLaMA-3-8B
performs much worse at 0.759. These findings highlight the potential of LLMs to
transform API management and validate the effectiveness of our system in
guiding model testing and selection across diverse applications.