sora 13274243a0 Bump vendored EvalScope and add K3-ready DPV4 configs.
Keep K3 suite selection and report-schema scoring in bash, merge K3/vision dataset_args into dpv4 yamls, and pin EvalScope at 735d920ee911 with local patches.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 07:30:48 +00:00

5.4 KiB
Raw Blame History

GAIA

概述

GAIAGeneral 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 配置使用远程沙箱引擎)。
  • 智能体循环默认最多执行 50 步。可通过 NativeAgentConfig.max_steps 覆盖该设置。
  • 默认启用网络访问,因为许多问题需要网页浏览。可通过 TaskConfig.sandbox.default_config 覆盖镜像、网络、CPU 或内存等配置。
  • 使用 subset_list 限制评估特定难度级别,例如 ['2023_level1']['2023_level1', '2023_level2'] 或默认的 ['2023_all']
  • 使用文档

属性

属性
基准测试名称 gaia
数据集ID gaia-benchmark/GAIA
论文 N/A
标签 Agent, MultiTurn, Reasoning
指标 accuracy
默认示例数 0-shot
评估划分 validation

数据统计

指标
总样本数 165
提示词长度(平均) 861.35 字符
提示词长度(最小/最大) 596 / 2582 字符

各子集统计数据:

子集 样本数 提示词平均长度 提示词最小长度 提示词最大长度
2023_level1 53 906.53 604 2582
2023_level2 86 816.66 596 1275
2023_level3 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}

使用方法

使用 CLI

evalscope eval \
    --model YOUR_MODEL \
    --api-url OPENAI_API_COMPAT_URL \
    --api-key EMPTY_TOKEN \
    --datasets gaia \
    --agent-config '{"mode":"native","strategy":"react","max_steps":50}' \
    --limit 10  # 正式评估时请删除此行

使用 Python

from evalscope import TaskConfig, run_task
from evalscope.api.agent import NativeAgentConfig

task_cfg = TaskConfig(
    model='YOUR_MODEL',
    api_url='OPENAI_API_COMPAT_URL',
    api_key='EMPTY_TOKEN',
    datasets=['gaia'],
    agent_config=NativeAgentConfig(
        strategy='react',
        max_steps=50,
    ),
    dataset_args={
        'gaia': {
            # subset_list: ['2023_level1', '2023_level2', '2023_level3']  # 可选,用于评估特定子集
        }
    },
    limit=10,  # 正式评估时请删除此行
)

run_task(task_cfg=task_cfg)