ChatPaper.aiChatPaper

TPTU-v2: Potenziamento della Pianificazione dei Compiti e dell'Utilizzo degli Strumenti negli Agenti Basati su Modelli Linguistici di Grande Scala nei Sistemi del Mondo Reale

TPTU-v2: Boosting Task Planning and Tool Usage of Large Language Model-based Agents in Real-world Systems

November 19, 2023
Autori: Yilun Kong, Jingqing Ruan, Yihong Chen, Bin Zhang, Tianpeng Bao, Shiwei Shi, Guoqing Du, Xiaoru Hu, Hangyu Mao, Ziyue Li, Xingyu Zeng, Rui Zhao
cs.AI

Abstract

I modelli linguistici di grandi dimensioni (LLM) hanno dimostrato competenza nell'affrontare compiti che richiedono una combinazione di pianificazione delle attività e l'utilizzo di strumenti esterni, come le API. Tuttavia, i sistemi complessi del mondo reale presentano tre sfide prevalenti riguardanti la pianificazione delle attività e l'uso degli strumenti: (1) Il sistema reale di solito dispone di una vasta gamma di API, quindi è impossibile fornire le descrizioni di tutte le API al prompt degli LLM poiché la lunghezza dei token è limitata; (2) il sistema reale è progettato per gestire compiti complessi, e i LLM di base difficilmente possono pianificare un ordine corretto dei sotto-compiti e delle chiamate API per tali attività; (3) La somiglianza semantica e funzionale tra le API nei sistemi reali crea difficoltà sia per gli LLM che persino per gli esseri umani nel distinguerle. In risposta, questo articolo introduce un framework completo volto a migliorare le capacità di Pianificazione delle Attività e Uso degli Strumenti (TPTU) degli agenti basati su LLM che operano all'interno di sistemi del mondo reale. Il nostro framework comprende tre componenti chiave progettati per affrontare queste sfide: (1) l'API Retriever seleziona le API più pertinenti per il compito dell'utente tra la vasta gamma disponibile; (2) l'LLM Finetuner ottimizza un LLM di base in modo che il LLM ottimizzato sia più capace nella pianificazione delle attività e nelle chiamate API; (3) il Demo Selector recupera in modo adattivo diverse dimostrazioni relative alle API difficili da distinguere, che vengono ulteriormente utilizzate per l'apprendimento contestuale per migliorare le prestazioni finali. Convalidiamo i nostri metodi utilizzando un sistema commerciale del mondo reale e un dataset accademico open-source, e i risultati mostrano chiaramente l'efficacia di ciascun componente individuale così come del framework integrato.
English
Large Language Models (LLMs) have demonstrated proficiency in addressing tasks that necessitate a combination of task planning and the usage of external tools that require a blend of task planning and the utilization of external tools, such as APIs. However, real-world complex systems present three prevalent challenges concerning task planning and tool usage: (1) The real system usually has a vast array of APIs, so it is impossible to feed the descriptions of all APIs to the prompt of LLMs as the token length is limited; (2) the real system is designed for handling complex tasks, and the base LLMs can hardly plan a correct sub-task order and API-calling order for such tasks; (3) Similar semantics and functionalities among APIs in real systems create challenges for both LLMs and even humans in distinguishing between them. In response, this paper introduces a comprehensive framework aimed at enhancing the Task Planning and Tool Usage (TPTU) abilities of LLM-based agents operating within real-world systems. Our framework comprises three key components designed to address these challenges: (1) the API Retriever selects the most pertinent APIs for the user task among the extensive array available; (2) LLM Finetuner tunes a base LLM so that the finetuned LLM can be more capable for task planning and API calling; (3) the Demo Selector adaptively retrieves different demonstrations related to hard-to-distinguish APIs, which is further used for in-context learning to boost the final performance. We validate our methods using a real-world commercial system as well as an open-sourced academic dataset, and the outcomes clearly showcase the efficacy of each individual component as well as the integrated framework.
PDF82December 15, 2024