[논문 리뷰] Counterfactually Auditable Lifecycle Certification for Autonomous Agents
도구 사용 지시 학습을 위한 ToolBench 도입, DFSDT 추론 전략, 자동 평가를 위한 ToolEval 도입으로 경쟁력 있는 도구 사용 성능과 미지의 API에 대한 강건한 일반화를 달성.
Despite the advancements of open-source large language models (LLMs), e.g., LLaMA, they remain significantly limited in tool-use capabilities, i.e., using external tools (APIs) to fulfill human instructions. The reason is that current instruction tuning largely focuses on basic language tasks but ignores the tool-use domain. This is in contrast to the excellent tool-use capabilities of state-of-the-art (SOTA) closed-source LLMs, e.g., ChatGPT. To bridge this gap, we introduce ToolLLM, a general tool-use framework encompassing data construction, model training, and evaluation. We first present ToolBench, an instruction-tuning dataset for tool use, which is constructed automatically using ChatGPT. Specifically, the construction can be divided into three stages: (i) API collection: we collect 16,464 real-world RESTful APIs spanning 49 categories from RapidAPI Hub; (ii) instruction generation: we prompt ChatGPT to generate diverse instructions involving these APIs, covering both single-tool and multi-tool scenarios; (iii) solution path annotation: we use ChatGPT to search for a valid solution path (chain of API calls) for each instruction. To enhance the reasoning capabilities of LLMs, we develop a novel depth-first search-based decision tree algorithm. It enables LLMs to evaluate multiple reasoning traces and expand the search space. Moreover, to evaluate the tool-use capabilities of LLMs, we develop an automatic evaluator: ToolEval. Based on ToolBench, we fine-tune LLaMA to obtain an LLM ToolLLaMA, and equip it with a neural API retriever to recommend appropriate APIs for each instruction. Experiments show that ToolLLaMA demonstrates a remarkable ability to execute complex instructions and generalize to unseen APIs, and exhibits comparable performance to ChatGPT. Our ToolLLaMA also demonstrates strong zero-shot generalization ability in an out-of-distribution tool-use dataset: APIBench.
연구 동기 및 목표
- 실세계의 다중 도구 시나리오에서 오픈 소스 LLM이 외부 API를 능숙하게 사용하도록 촉진한다.
- 실세계 RESTful API를 사용하여 확장 가능한 자동화된 데이터 생성 파이프라인(ToolBench)을 만든다.
- 도구 사용을 위한 계획 및 추론을 향상시키기 위해 깊이 우선 탐색 기반 의사 결정 트리(DFSDT)를 개발한다.
- 도구 사용 능력을 측정하기 위한 자동 평가 프레임워크(ToolEval)를 제공한다.
- 미지의 API 및 분포 외 도구 사용 벤치마크에 대한 일반화를 입증한다.
제안 방법
- RapidAPI에서 49개 카테고리에 걸쳐 16,464개의 RESTful API를 수집하여 ToolBench를 구축한다.
- ChatGPT로 다양한 단일 도구 및 다중 도구 지시를 생성하고 DFSDT 주도 프로세스를 사용하여 해답 경로를 주석 달다.
- 각 단계가 API를 호출하고 생각, 선택된 API, 매개변수를 기록하는 다라운드 추론을 통해 지시-해결 경로에 주석을 단다.
- ToolBench 데이터로 LLaMA-2 (7B)를 미세 조정하여 긴 API 응답에 대한 확장된 컨텍스트 길이를 갖춘 ToolLLaMA를 얻는다.
- 지시를 받으면 관련 API를 추천하도록 신경망 API 검색기를 학습시켜 검색 정확도를 향상시킨다.
- 도구 사용 성능과 해결 경로 품질을 평가하기 위해 합격률과 승률 지표를 갖춘 자동 평가기 ToolEval를 개발한다.
실험 결과
연구 질문
- RQ1오픈 소스 LLM이 단일 도구와 다중 도구 설정에서 실제 API를 마스터하도록 얼마나 잘 학습될 수 있는가?
- RQ2주어진 지시문에 대해 큰 풀에서 관련 API를 효과적으로 식별할 수 있는 신경망 API 검색기가 있는가?
- RQ3DFSDT 추론 전략이 ReACT과 비교하여 계획, 탐색, 최종 성공률을 향상시키는가?
- RQ4ToolLLaMA가 미지의 API와 분포 외 도구 사용 데이터세트에 대해 어떻게 일반화하는가?
- RQ5도구 사용 시나리오에서 자동 평가(ToolEval)가 인간 판단의 대리로서 신뢰할 수 있는가?
주요 결과
- ToolLLaMA, DFSDT가 포함된 ToolBench에서 미세 조정된 ToolLLaMA는 도구 사용 과제에서 ChatGPT와 경쟁력 있는 성능을 달성하고 GPT-4에 근접하다.
- DFSDT 전략은 ReACT에 비해 합격률과 승률을 크게 향상시키며, 특히 더 어려운 다중 도구 지시에 대해 두드러진다.
- 신경망 API 검색기는 API 선택 정밀도를 크게 향상시키며 때로는 실제 정답으로부터 검색된 API 세트를 능가하기도 한다.
- ToolLLaMA는 미지의 API와 분포 외 데이터세트(APIBench)에 대해 견고하게 일반화하여 여러 설정에서 기준선과 일치하거나 이를 능가한다.
- 실제로 API 검색기(top-5 API)를 사용하면 오라클 API 세트를 능가할 수 있어 검색기의 유용한 도구 선택 확장을 강조한다.
더 나은 연구,지금 바로 시작하세요
연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.