GAIA#
概述#
GAIA(General AI Assistants)是一个包含 450 多个问题的基准测试,面向具备工具使用、网页浏览和多步推理能力的新一代大语言模型(LLM)。每个问题都有一个明确的简短答案,并被划分为三个难度等级之一。
任务描述#
任务类型:工具使用型智能体(多轮交互)
输入:自然语言问题,可选附带一个引用附件文件(PDF / xlsx / 图像 / 音频 / ...)
输出:简短的最终答案(数字 / 短语 / 逗号分隔的列表)
数据划分:
validation(答案公开)和test(答案私有 — 跳过评估)
核心特性#
基于 ReAct 智能体循环,内置单一
bash工具,运行于 Docker 沙箱中(默认镜像为python:3.11,包含curl/wget/git)。附件文件以只读方式挂载至沙箱内的
/shared_files目录。评分器直接移植自官方 GAIA 排行榜的规则逻辑(不使用 LLM 作为评判)。
数据集默认从 ModelScope(
gaia-benchmark/GAIA)下载;设置dataset_hub='huggingface'可改从 Hugging Face 加载。
评估说明#
需本地运行 Docker 守护进程(或通过
ms_enclave配置使用远程沙箱引擎)。extra_params.max_steps限制智能体循环的最大步数(默认为 50)。extra_params.command_timeout设置每条bash命令的超时时间(默认 180 秒,与 inspect_ai 一致)。默认启用网络访问 — 许多问题需要浏览或搜索。
使用
subset_list可限定特定难度级别,例如['2023_level1']、['2023_level1', '2023_level2']或['2023_all'](默认)。
属性#
属性 |
值 |
|---|---|
基准测试名称 |
|
数据集ID |
|
论文 |
N/A |
标签 |
|
指标 |
|
默认示例数 |
0-shot |
评估划分 |
|
数据统计#
指标 |
值 |
|---|---|
总样本数 |
165 |
提示词长度(平均) |
861.35 字符 |
提示词长度(最小/最大) |
596 / 2582 字符 |
各子集统计数据:
子集 |
样本数 |
提示平均长度 |
提示最小长度 |
提示最大长度 |
|---|---|---|---|---|
|
53 |
906.53 |
604 |
2582 |
|
86 |
816.66 |
596 |
1275 |
|
26 |
917.08 |
621 |
1497 |
样例示例#
子集: 2023_level1
{
"input": [
{
"id": "93e8257c",
"content": "Please answer the question below. You should:\n\n- Return only your answer, which should be a number, or a short phrase with as few words as possible, or a comma separated list of numbers and/or strings.\n- If the answer is a number, return only ... [TRUNCATED 431 chars] ... Earth and the Moon its closest approach? Please use the minimum perigee value on the Wikipedia page for the Moon when carrying out your calculation. Round your result to the nearest 1000 hours and do not use any comma separators if necessary."
}
],
"target": "17",
"id": 0,
"group_id": 0,
"tools": [
{
"name": "bash",
"description": "Execute a bash command inside the sandbox environment. Returns the combined stdout / stderr output of the command.",
"parameters": {
"properties": {
"command": {
"type": "string",
"description": "The bash command to execute."
},
"timeout": {
"type": "number",
"description": "Maximum execution time in seconds (default: 60).",
"default": 60
}
},
"required": [
"command"
]
}
}
],
"metadata": {
"task_id": "e1fc63a2-da7a-432f-be78-7c4a95598703",
"level": "1",
"file_name": "",
"file_path": "",
"Annotator Metadata": {
"Steps": "1. Googled Eliud Kipchoge marathon pace to find 4min 37sec/mile\n2. Converted into fractions of hours.\n3. Found moon periapsis in miles (225,623 miles).\n4. Multiplied the two to find the number of hours and rounded to the nearest 100 hours.",
"Number of steps": "4",
"How long did this take?": "20 Minutes",
"Tools": "1. A web browser.\n2. A search engine.\n3. A calculator.",
"Number of tools": "3"
}
}
}
提示模板#
提示模板:
{question}
额外参数#
参数 |
类型 |
默认值 |
描述 |
|---|---|---|---|
|
|
|
每个样本允许的最大智能体步数。 |
|
|
|
每条 bash 命令的默认超时时间(秒)。 |
|
|
|
用作每个样本沙箱环境的 Docker 镜像。 |
|
|
|
允许沙箱访问网络(GAIA 中涉及浏览的问题需要此选项)。 |
使用方法#
使用 CLI#
evalscope eval \
--model YOUR_MODEL \
--api-url OPENAI_API_COMPAT_URL \
--api-key EMPTY_TOKEN \
--datasets gaia \
--limit 10 # 正式评估时请删除此行
使用 Python#
from evalscope import run_task
from evalscope.config import TaskConfig
task_cfg = TaskConfig(
model='YOUR_MODEL',
api_url='OPENAI_API_COMPAT_URL',
api_key='EMPTY_TOKEN',
datasets=['gaia'],
dataset_args={
'gaia': {
# subset_list: ['2023_level1', '2023_level2', '2023_level3'] # 可选,用于评估特定子集
# extra_params: {} # 使用默认额外参数
}
},
limit=10, # 正式评估时请删除此行
)
run_task(task_cfg=task_cfg)