01CityWise · 2023–2025 · System design and experiments시스템 설계·실험
An agent that reads 8,000 APIsAPI 8,000개를 읽는 에이전트
Seoul's open-data chatbot answered only its sample questions, so I built an agent that finds and calls the right API itself: 84% correct on one-dataset questions, 2–4% when several large datasets are needed.서울 열린데이터광장의 챗봇은 예시 질문에만 답할 수 있었습니다. 그래서 질문에 맞는 API를 스스로 찾아 호출하는 에이전트를 만들었고, 단일 데이터셋 질문에서 정답률 84%를 기록했습니다. 대용량 데이터셋 여러 개가 필요한 질문에서는 2–4%에 그쳤습니다.
- Situation상황
Seoul's open-data portal lists 8,000+ APIs, but its chatbot handled only sample questions and fell back to keyword search. Analysts still spend 60%+ of their time finding data.열린데이터광장의 API는 8,000개가 넘지만, 챗봇은 예시 질문만 처리하고 나머지는 키워드 검색으로 대체함. 분석가는 여전히 업무 시간의 60% 이상을 데이터 탐색에 씀
- Task과제
Turn a plain question into the right API call and a checked answer, and measure every step from day one.자연어 질문을 정확한 API 호출과 검증된 답변으로 연결하고, 첫날부터 단계별 성능을 측정함
- Action실행
Crawled and embedded 8,000+ API documents. A tool generator writes API tools from the docs, a plan-and-reflect agent answers, and an LLM judge scores every answer with error codes that split agent faults from platform faults.API 문서 8,000여 건을 수집·임베딩함. Tool Generator가 문서로부터 API 도구를 자동 생성하고, Plan-and-Reflect 에이전트가 답변하며, LLM Judge가 오류 코드로 에이전트 오류와 플랫폼 오류를 구분해 채점함
- Result결과
The gap between 84% and 2–4% set up the next two projects. First shown at GSCS & ICUI 2023, Hong Kong Polytechnic University.84%와 2–4%의 격차를 확인하고, 이를 다음 두 프로젝트의 출발점으로 삼음. GSCS & ICUI 2023(홍콩이공대학교)에서 첫 발표
I want to go to Yeouido. Is it crowded in 2 hours?
Chain of thought · 3 steps · 2 API callsChain of Thought · 3단계 · API 호출 2회
- Plan
- Check the current time and calculate the time 2 hours from now.
- Research typical crowd levels in Yeouido during that time based on historical data or recent trends.
- Given the above steps taken, please respond to the user's original question with referring to the data source.
- Step 1 · Thought
I need to check the current time first and then calculate the time 2 hours from now.
APIget_current_time()→ 2024-11-10T02:19:36.641646 - Step 2 · Thought
To research typical crowd levels in Yeouido during the specified time (2024-11-10T04:19:36), I will fetch real-time and expected population data for Yeouido.
APIget_city_population(area_name="여의도", start_index=1, end_index=5, response_format="json")→ AREA_NM: '여의도' · AREA_CONGEST_LVL: '여유' · AREA_PPLTN_MIN: '30000' · AREA_PPLTN_MAX: '32000' · AREA_CONGEST_MSG: '사람이 몰려있을 가능성이 낮고 붐빔은 거의 느껴지지 않아요. 도보 이동이 자유로워요.' - Step 3 · Answer
Answers the question and cites the data source.질문에 답하고 데이터 출처를 밝힘.
Based on the data gathered, at 04:00 on November 10, 2024, Yeouido is expected to have a crowd level of '여유' (leisurely), with a population between 30,000 and 32,000. There is a low chance of crowding, allowing for free movement.
Source출처 · Seoul real-time city data (SeoulRtd.citydata_ppltn, POI072)
Asked whether Yeouido will be crowded in two hours, the agent writes a three-step plan, calls the clock and the city-population API, and answers from the live data.'2시간 뒤 여의도가 붐빌까?'라는 질문에 에이전트가 3단계 계획을 세우고, 현재 시각 API와 도시 인구 API를 호출한 뒤 실시간 데이터로 답함.