Skip to main content
QUICK REVIEW

[論文レビュー] TPTU-v2: Boosting Task Planning and Tool Usage of Large Language Model-based Agents in Real-world Systems

Yilun Kong, Jingqing Ruan|arXiv (Cornell University)|Nov 19, 2023
Topic Modeling被引用数 7
ひとこと要約

この論文は、実世界のシステムにおけるLLMベースのエージェントのタスク計画とAPI使用を改善するための三要素フレームワーク(API Retriever、LLM Finetuner、Demo Selector)を提案し、実データとToolBenchで検証します。

ABSTRACT

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.

研究の動機と目的

  • 現実世界のシステムにおけるLLMベースのエージェントの実務的な課題を特定すること(膨大なAPIセット、複雑なタスク/APIのシーケンス、APIの類似性)。
  • この課題に対処する三要素フレームワークを提案すること:API Retriever、LLM Finetuner、そして Demo Selector。
  • 現実世界およびオープンソースデータセットにおいて、各コンポーネントと統合フレームワークの有効性を実証すること。

提案手法

  • API Retrieverは、セマンティック埋め込みとMultiple Negatives Ranking Lossを用いたデュアルストリームSBERT訓練により、膨大なAPIコレクションから最も関連性の高いAPIを選択します。
  • LLM Finetunerは、現実世界の文脈でのタスク計画とAPI呼び出しを強化するために、慎重に構築されたデータセットで監督付きファインチューニングを行います。
  • Demo Selectorは、埋め込み類似度に基づいてサブタスクレベルまたはAPIレベルのデモンストレーションを動的に取得し、インコンテキスト学習を改善し、類似APIを区別します。
  • API Retrieverの訓練データは、instruction-APIペアと人間/LLMのハイブリッドアノテーションプロセスに依存します。
  • ファインチューニングデータセットには、Training Set v1(実世界分布)、Training Set v2(機能リストを含むプロンプト機能)、Training Set v3(多様なプロンプトと多段API相互作用)を含みます。
  • Demo Selectorは、Knowledge DatabaseとAPI Collectionの埋め込みを用いて上位k件のデモンストレーションを取得するか、必要に応じてAPIレベルのデモにフォールバックします。

実験結果

リサーチクエスチョン

  • RQ1大規模APIエコシステムにおけるタスク計画のためのAPIリトリーバルは、APIの関連性をどれだけ効果的に改善できるか?
  • RQ2ドメイン特化データでのLLMのファインチューニングは、タスク計画とAPI呼び出しの精度を向上させるか?
  • RQ3適応的デモ取得は、意味的に類似するAPIをモデルが区別するのを助け、最終タスク完了を改善できるか?

主な発見

  • API Retrieverは実世界のシナリオでRecall@5 = 84.64%およびRecall@10 = 98.47%を達成。
  • 基本LLMの実行精度は、デモなしの38.89%から、API Retrieverで43.33%、Demo Selectorで95.55%、ファインチューニング済みLLM+API Retrieverで80%、全てのコンポーネントを組み合わせると96.67%に到達。
  • オープンソースのシナリオでは、基本LLMの実行精度は76.67%、API Retriever単独では複雑さのため53.3%に低下するが、ファインチューニング済みLLM+API Retrieverは86.7%に達する。
  • 実世界での最高性能(96.67%)は、ファインチューニング済みLLM、API Retriever、Demo Selectorを組み合わせたときに得られ、統合コンポーネントの価値を示している。

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。