[논문 리뷰] RestGPT: Connecting Large Language Models with Real-World RESTful APIs
RestGPT는 실세계 RESTful API를 대형 언어 모델(LLM)과 결합하여 거친-정교한 온라인 계획 루프와 API 실행기를 사용하며, 실제 시나리오를 갖춘 RestBench에서 시연됩니다.
Tool-augmented large language models (LLMs) have achieved remarkable progress in tackling a broad range of tasks. However, existing methods are mainly restricted to specifically designed tools and fail to fulfill complex instructions, having great limitations when confronted with real-world scenarios. In this paper, we explore a more realistic scenario by connecting LLMs with RESTful APIs, which adhere to the widely adopted REST software architectural style for web service development. To address the practical challenges of tackling complex instructions, we propose RestGPT, which exploits the power of LLMs and conducts a coarse-to-fine online planning mechanism to enhance the abilities of task decomposition and API selection. RestGPT also contains an API executor tailored for calling RESTful APIs, which can meticulously formulate parameters and parse API responses. To fully evaluate the performance of RestGPT, we propose RestBench, a high-quality benchmark which consists of two real-world scenarios and human-annotated instructions with gold solution paths. Experiments show that RestGPT is able to achieve impressive results in complex tasks and has strong robustness, which paves a new way towards AGI. RestGPT and RestBench is publicly available at https://restgpt.github.io/.
연구 동기 및 목표
- 실세계 RESTful API와 LLM을 연결하여 복잡한 사용자 지시를 처리하도록 동기를 부여한다.
- 작업 분해 및 API 선택을 위한 거칠-정교한 온라인 계획 프레임워크를 개발한다.
- OpenAPI (OAS) 스키마를 사용하여 매개변수를 구성하고 API 응답을 해석할 수 있는 API 실행기를 설계한다.
- RestBench를 만들고, LLM의 RESTful API 사용을 평가하기 위한 실세계 시나리오가 포함된 인간 주석 벤치마크를 만든다.
제안 방법
- 세 가지 모듈이 핵심을 이룬다: Planner, API Selector, 그리고 Executor, 각각 LLM의 프롬프트에 의해 구동된다.
- NL 하위 작업 계획과 API 선택 사이를 오가며 반복되는 거칠-정교한 온라인 계획 루프를 적용한다.
- API 실행은 API 문서에서 올바른 매개변수를 생성하는 Caller와 OAS 스키마를 사용하여 파싱 코드를 생성하는 Response Parser를 사용한다.
- 제한된 맥락 내에서 API 이해와 응답 파싱 관리를 위해 특수 프롬트를 통해 읽는 OAS/OpenAPI 명세 부품을 사용한다.
- 실행 중에 응답 스키마에서 파이썬 코드를 생성해 JSON 결과를 파싱하고, 파싱 실패 시 대체 프롬프트를 사용한다.

실험 결과
연구 질문
- RQ1RestGPT가 다중 RESTful API 호출을 구성하여 복잡한 사용자 지시를 해결할 수 있는가?
- RQ2거칠-정교한 온라인 계획 접근법이 기저선 대비 API 이해, 계획, 실행을 개선하는가?
- RQ3다수의 RESTful 엔드포인트를 사용할 때 Real-world API 변동성과 노이즈에 대해 RestGPT의 강건성은 어떠한가?
- RQ4不同한 기본 LLM이 RestGPT의 계획, API 선택 및 파싱 능력에 어떤 영향을 미치는가?
주요 결과
- RestGPT는 두 가지 RestBench 실제 시나리오(TMDB 및 Spotify)에서 기저선보다 우수한 성능을 보인다.
- TMDB에서 RestGPT는 75.0%의 성공률과 79.0%의 올바른 경로 비율을 달성하며 해답 길이의 Δ가 +0.55이다.
- Spotify에서 RestGPT는 72.7%의 성공률과 74.5%의 올바른 경로 비율을 달성하며 해답 길이의 Δ가 +0.25이다.
- 분석 제거(ablation)에서 계획자와 스키마 기반 파서가 모두 성능에 기여하며, 특히 계획 수립이 중요하다.
- RestGPT는 작업 복잡성과 API 수가 증가해도 강건한 성능을 유지하며 확장성을 보여 준다.

더 나은 연구,지금 바로 시작하세요
연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.