跳转到内容

滑块

在 Potato 中配置连续数值滑块,设置最小值、最大值、步长和起始值,适用于细粒度的评分和打分任务。

滑块类型提供一个可拖动的滑块,用于在范围内选择数值。适用于置信度评分、强度得分或任何连续数值输入。

基本配置

yaml
annotation_schemes:
  - name: "confidence"
    description: "How confident are you in this answer?"
    annotation_type: "slider"
    min_value: 0
    max_value: 100
    starting_value: 50
    step: 1

配置选项

字段类型必填描述
namestring是标注的唯一标识符
descriptionstring是显示给标注者的说明,也是说明量表两端含义的地方
annotation_typestring是必须为 "slider"
min_valueinteger是滑块最小值,显示为左端的标注文字
max_valueinteger是滑块最大值,显示为右端的标注文字
starting_valueinteger是滑块的初始位置(超出范围的值会被移到最近的一端)
stepnumber否步进值(默认:1)
maxTickinteger否沿滑轨标注的刻度最多个数(默认:8)

滑块在滑块头上方显示当前值。滑轨两端只显示数字 min_value 和 max_value,像“完全没有把握”这样的文字应放在 description 中。不要给滑块方案添加 labels。带有 labels 的滑块方案会渲染成一列单选按钮,而不是滑块。

示例

置信度评分

yaml
- name: "confidence"
  description: "How confident are you in your annotation? (0 = not confident at all, 100 = completely confident)"
  annotation_type: "slider"
  min_value: 0
  max_value: 100
  starting_value: 50
  step: 5

强度量表

yaml
- name: "intensity"
  description: "Rate the emotional intensity of this text, from 1 (very mild) to 10 (very intense)"
  annotation_type: "slider"
  min_value: 1
  max_value: 10
  starting_value: 5
  step: 1

百分比输入

yaml
- name: "agreement"
  description: "What percentage of people would agree with this statement?"
  annotation_type: "slider"
  min_value: 0
  max_value: 100
  starting_value: 50
  step: 1
  maxTick: 6  # labeled ticks at 0, 20, 40, 60, 80, and 100

输出格式

滑块标注输出一个数值:

slider 的答案存在标签名 slider 下,是一个字符串:

json
{
  "instance_id": "item_1",
  "user_id": "annotator1",
  "labels": {
    "confidence": {
      "slider": "75"
    }
  },
  "spans": {},
  "links": {}
}

何时使用滑块还是数字输入

  • 当您希望标注者在连续量表上进行快速、直觉性选择时,使用滑块
  • 当您需要精确值或范围非常大时,使用数字输入

最佳实践

  1. 设置合理的起始值 - 将 starting_value 放在有意义的位置(通常是中点)
  2. 在说明中写明两端的含义 - 滑块只显示数字。请在 description 中说明最低值和最高值的含义
  3. 选择合适的步长 - 细粒度区分用较小步长,粗略评分用较大步长
  4. 保持范围直观 - 0-100 或 1-10 对大多数标注者来说都很熟悉