Skip to content
Announcements6 min read

Potato 2.3:智能体标注、Solo 模式与人类评估的未来

Potato 2.3.0 引入了智能体标注(支持 12 种 trace 格式转换器)、Solo Mode 人机协同标注、Best-Worst Scaling、SSO/OAuth 认证、Parquet 导出以及 15 个演示项目。

Potato Team·

Potato 2.3:智能体标注、Solo 模式与人类评估的未来

我们很高兴地宣布 Potato 2.3.0 发布,这是 Potato 历史上规模最大的一次更新。本版本引入了两大全新系统——智能体标注和 Solo Mode——以及 Best-Worst Scaling、SSO/OAuth 认证、Parquet 导出和 15 个新演示项目。

本次发布的主题很简单:我们需要标注的内容已经发生了变化,我们的工具也需要跟上。 研究人员不再只是标注文本情感和命名实体。他们正在评估多步骤 AI 智能体 trace、大规模比较 LLM 输出,并为日益复杂的任务构建数据集。Potato 2.3 正是为这一新现实而构建的。


智能体标注

Potato 2.3 的核心功能是一套完整的通过人类标注评估 AI 智能体的系统。

AI 智能体——执行多步骤操作以完成任务的系统——正在迅速普及。但评估它们很困难。单次智能体运行可能涉及数十个工具调用、推理步骤、网页浏览和中间输出。现有的标注工具将智能体的输出显示为纯文本,丢失了评估人员需要看到的丰富结构。

Potato 的智能体标注系统通过三个组件来解决这个问题。

12 种 Trace 格式转换器

智能体 trace 的格式因框架不同而各异。Potato 将它们全部标准化为统一的表示形式:

转换器来源
openaiOpenAI Assistants API / 函数调用
anthropicAnthropic Claude tool_use / Messages API
swebenchSWE-bench 任务 trace
opentelemetryOpenTelemetry span 导出
mcpModel Context Protocol 会话
multi_agentCrewAI / AutoGen / LangGraph
langchainLangChain 回调 trace
langfuseLangFuse 观测导出
reactReAct Thought/Action/Observation
webarenaWebArena / VisualWebArena
atifAgent Trace Interchange Format
raw_web原始浏览器录制(HAR + 截图)

配置非常简单:

yaml
agentic:
  enabled: true
  trace_converter: react
  trace_file: "data/agent_traces.jsonl"

对于需要从多个来源导入 trace 的项目,支持自动检测:

yaml
agentic:
  enabled: true
  trace_converter: auto

三种显示类型

不同的智能体模态需要不同的可视化方式。

Agent Trace 显示 将使用工具的智能体 trace 渲染为带颜色编码的步骤卡片,支持可折叠的观测结果、JSON 格式化显示和时间线侧边栏:

yaml
agentic:
  display_type: agent_trace
  agent_trace_display:
    colors:
      thought: "#6E56CF"
      action: "#3b82f6"
      observation: "#22c55e"
      error: "#ef4444"
    collapse_observations: true
    show_step_numbers: true

Web Agent Trace 显示 渲染浏览智能体的 trace,包含完整截图、显示点击目标和输入字段的 SVG 覆盖层,以及用于快速导航的胶片条视图:

yaml
agentic:
  display_type: web_agent
  web_agent_display:
    screenshot_max_width: 900
    overlay:
      enabled: true
      click_marker: "circle"
      click_color: "#ef4444"
    filmstrip:
      enabled: true

交互式聊天显示 支持 trace 回顾(评估已录制的对话)和实时聊天(标注人员与智能体实时交互,然后评估对话)两种模式:

yaml
agentic:
  display_type: interactive_chat
  interactive_chat_display:
    mode: trace_review
    trace_review:
      show_token_counts: true
      show_latency: true

逐步评分

对于任何显示类型,标注人员都可以在评估整体 trace 的同时对单个步骤进行评分:

yaml
annotation_schemes:
  - annotation_type: likert
    name: overall_quality
    min: 1
    max: 5
 
  - annotation_type: per_turn_rating
    name: step_correctness
    target: agentic_steps
    rating_type: radio
    labels:
      - "Correct"
      - "Partially Correct"
      - "Incorrect"

预置标注方案

九个标注方案开箱即用,覆盖常见的智能体评估维度:

yaml
annotation_schemes:
  - preset: agent_task_success
  - preset: agent_step_correctness
  - preset: agent_error_taxonomy
  - preset: agent_safety

可用预置方案:agent_task_successagent_step_correctnessagent_error_taxonomyagent_safetyagent_efficiencyagent_instruction_followingagent_explanation_qualityagent_web_action_correctnessagent_conversation_quality

阅读智能体标注文档 →


Solo Mode

Potato 2.3 的第二大功能是 Solo Mode:一个 12 阶段的工作流,用单个人类专家与 LLM 的协作取代传统的多标注者范式。

问题

传统标注需要多个标注者来确保可靠性。但招聘、培训和协调团队既昂贵又耗时。对于许多研究项目来说,标注瓶颈不在于界面,而在于后勤工作。

解决方案

Solo Mode 让一位领域专家标注数据中经过策略性选择的一个子集。LLM 从这些标签中学习,为剩余实例提出标签建议,人类只需审核 LLM 不确定的案例。12 阶段工作流自动编排这一过程。

在内部基准测试中,Solo Mode 达到了与完整多标注者流程 95% 以上的一致性,同时仅需 10-15% 的人工标注量。

12 个阶段

  1. 种子标注 -- 人类标注 50 个多样化实例
  2. 初始 LLM 校准 -- LLM 使用种子示例标注校准批次
  3. 混淆分析 -- 识别人类与 LLM 之间的系统性分歧模式
  4. 指南优化 -- LLM 提出改进后的标注指南;人类审批
  5. 标注函数生成 -- 受 ALCHEmist 启发的程序化规则处理简单实例
  6. 主动标注 -- 人类标注最具信息量的剩余实例
  7. 自动化优化循环 -- 使用更新后的指南迭代重新标注
  8. 分歧探索 -- 人类解决 LLM 和标注函数冲突的案例
  9. 边缘案例合成 -- LLM 生成合成的模糊示例供人类标注
  10. 级联置信度升级 -- 人类审核 LLM 最低置信度的标签
  11. 提示优化 -- 受 DSPy 启发的自动化提示搜索
  12. 最终验证 -- 随机抽样审核;通过或循环返回

快速开始

yaml
solo_mode:
  enabled: true
  llm:
    endpoint_type: openai
    model: "gpt-4o"
    api_key: ${OPENAI_API_KEY}
  seed_count: 50
  accuracy_threshold: 0.92
  confidence_threshold: 0.85
 
annotation_schemes:
  - annotation_type: radio
    name: sentiment
    labels: [Positive, Neutral, Negative]

多信号实例优先级

Solo Mode 使用六个加权池来选择对人类标注最有价值的实例:

yaml
solo_mode:
  prioritization:
    pools:
      - name: uncertain
        weight: 0.30
      - name: disagreement
        weight: 0.25
      - name: boundary
        weight: 0.20
      - name: novel
        weight: 0.10
      - name: error_pattern
        weight: 0.10
      - name: random
        weight: 0.05

阅读 Solo Mode 文档 →


Best-Worst Scaling

Potato 2.3 新增了 Best-Worst Scaling(BWS),也称为最大差异缩放。标注人员看到一组项目(通常 4 个),根据某个标准选择最好和最差的项目。BWS 从简单的二元判断中生成可靠的标量分数,在相同统计效力下所需的标注量远少于 Likert 量表。

yaml
annotation_schemes:
  - annotation_type: best_worst_scaling
    name: fluency
    description: "Select the BEST and WORST translation"
    items_key: "translations"
    tuple_size: 4
    best_label: "Most Fluent"
    worst_label: "Least Fluent"
    randomize_order: true
 
    tuple_generation:
      method: balanced_incomplete
      tuples_per_item: 5
 
    scoring:
      method: bradley_terry
      auto_compute: true
      include_confidence: true

提供三种评分方法:

  • 计数法 -- 简单的 (best_count - worst_count) / appearances
  • Bradley-Terry -- 成对比较模型(推荐默认选项)
  • Plackett-Luce -- 完整排名模型,最大化数据效率

通过命令行计算分数:

bash
python -m potato.bws score --config config.yaml --method bradley_terry --output scores.csv

管理面板包含 BWS 标签页,显示分数分布、收敛图表和分半信度指标。

阅读 Best-Worst Scaling 文档 →


SSO 与 OAuth 认证

生产环境的标注部署需要适当的认证。Potato 2.3 支持三种 OAuth 方法:

Google OAuth

yaml
authentication:
  method: google_oauth
  google_oauth:
    client_id: ${GOOGLE_CLIENT_ID}
    client_secret: ${GOOGLE_CLIENT_SECRET}
    redirect_uri: "https://annotation.example.com/auth/google/callback"
    allowed_domains:
      - "umich.edu"
    auto_register: true

GitHub OAuth(带组织限制)

yaml
authentication:
  method: github_oauth
  github_oauth:
    client_id: ${GITHUB_CLIENT_ID}
    client_secret: ${GITHUB_CLIENT_SECRET}
    redirect_uri: "https://annotation.example.com/auth/github/callback"
    allowed_organizations:
      - "my-research-lab"
    scopes:
      - "read:user"
      - "read:org"

通用 OIDC

连接 Okta、Azure AD、Auth0、Keycloak 或任何符合 OIDC 标准的提供商:

yaml
authentication:
  method: oidc
  oidc:
    discovery_url: "https://accounts.example.com/.well-known/openid-configuration"
    client_id: ${OIDC_CLIENT_ID}
    client_secret: ${OIDC_CLIENT_SECRET}
    redirect_uri: "https://annotation.example.com/auth/oidc/callback"

所有方法都支持域名限制、自动注册和混合模式(在一个登录页面上使用多种认证方法)。

阅读 SSO 与 OAuth 文档 →


Parquet 导出

标注数据越来越多地被期望使用列式格式的数据科学工具所消费。Potato 2.3 可以直接将标注导出为 Apache Parquet 格式,生成三个结构化文件:

  • annotations.parquet -- 每行对应一个(实例、标注者、方案)组合,包含值、时间戳和持续时间
  • spans.parquet -- 每行对应一个标注的 span,包含偏移量、标签和链接
  • items.parquet -- 实例元数据,包含标注计数和状态
yaml
parquet_export:
  enabled: true
  output_dir: "output/parquet/"
  compression: zstd
  auto_export: true

可直接在 pandas、DuckDB、PyArrow、Polars 或 Hugging Face Datasets 中加载:

python
import pandas as pd
annotations = pd.read_parquet("output/parquet/annotations.parquet")
 
# Or with DuckDB for SQL queries
import duckdb
duckdb.sql("""
  SELECT instance_id, value, COUNT(*) as n
  FROM 'output/parquet/annotations.parquet'
  WHERE schema_name = 'sentiment'
  GROUP BY instance_id, value
""")

支持 snappy、gzip、zstd、lz4 和 brotli 压缩,支持按日期/标注者分区的增量导出,以及字符串列的字典编码。

阅读 Parquet 导出文档 →


15 个新演示项目

Potato 2.3 在 project-hub/ 目录中附带了 15 个新演示项目,涵盖所有新功能:

智能体标注演示

  1. react-agent-eval -- 使用步骤级评分评估 ReAct 智能体 trace
  2. web-agent-eval -- 带截图覆盖层的 WebArena trace 评估
  3. chatbot-eval -- 带实时智能体代理的交互式聊天评估
  4. multi-agent-eval -- 评估 CrewAI 多智能体系统
  5. swebench-eval -- 编码智能体的 SWE-bench trace 评估

Solo Mode 演示

  1. solo-sentiment -- 产品评论的 Solo Mode 情感分类
  2. solo-ner -- Solo Mode 命名实体识别
  3. solo-toxicity -- 带边缘案例合成的 Solo Mode 毒性检测

Best-Worst Scaling 演示

  1. bws-translation -- 机器翻译质量排名
  2. bws-summarization -- 摘要质量比较
  3. bws-image-quality -- 图像生成质量排名

认证演示

  1. google-oauth-demo -- Google OAuth 配置示例
  2. github-oauth-demo -- 带组织限制的 GitHub OAuth

导出演示

  1. parquet-export-demo -- 带 DuckDB 分析脚本的 Parquet 导出
  2. huggingface-upload -- 导出为 Parquet 并推送到 Hugging Face Hub

每个演示都包含完整的 config.yaml、示例数据和包含设置说明的 README。启动任意演示:

bash
cd project-hub/react-agent-eval
potato start config.yaml

安全加固

Potato 2.3 包含多项安全改进:

  • 会话令牌 使用加密安全的随机生成,支持可配置的过期时间
  • CSRF 保护 默认对所有表单提交启用
  • 速率限制 应用于认证端点(可配置,默认每分钟 10 次尝试)
  • 输入净化 用于标注界面中显示的所有用户提供内容
  • 依赖审计 -- 所有 Python 和 JavaScript 依赖已更新至最新安全版本
  • 内容安全策略 头已添加以防止 XSS
yaml
security:
  csrf_protection: true
  rate_limiting:
    auth_attempts: 10            # per minute
    api_requests: 100            # per minute
  session:
    token_length: 64
    lifetime_hours: 24
  content_security_policy: true

升级指南

从 Potato 2.2.x 升级

bash
pip install --upgrade potato-annotation

所有 v2.2 配置完全向后兼容。无需修改现有配置。

新增依赖

Parquet 导出需要 PyArrow:

bash
pip install potato-annotation[parquet]

Solo Mode 需要 LLM 提供商 SDK:

bash
pip install potato-annotation[solo]    # installs openai + anthropic SDKs

或安装所有组件:

bash
pip install potato-annotation[all]

未来展望

Potato 2.3 代表了标注工具能力的重大扩展。我们已经在开发下一批功能:

  • 标注差异比较 -- 使用可视化差异跨轮次和标注者比较标注
  • 联邦标注 -- 跨多个 Potato 实例协调标注
  • 流式数据源 -- 标注来自 Kafka、Pub/Sub 和其他流式系统的数据
  • 移动端优化界面 -- 适用于平板和手机的响应式标注

我们期待听到您的反馈。请在 GitHub 上提交 issue,加入 GitHub Discussions 中的讨论,或直接联系团队。


链接