Skip to content

滑块

使用可拖动滑块进行连续数值输入。

滑块标注

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

基本配置

yaml
annotation_schemes:
  - name: "confidence"
    description: "How confident are you in this answer?"
    annotation_type: "slider"
    min: 0
    max: 100
    step: 1
    default: 50

配置选项

字段类型必填描述
namestring标注的唯一标识符
descriptionstring显示给标注者的说明
annotation_typestring必须为 "slider"
minnumber滑块最小值
maxnumber滑块最大值
stepnumber步进值(默认:1)
defaultnumber滑块初始位置
min_labelstring最小端标签
max_labelstring最大端标签
show_valueboolean显示当前值(默认:true)

示例

置信度评分

yaml
- name: "confidence"
  description: "How confident are you in your annotation?"
  annotation_type: "slider"
  min: 0
  max: 100
  step: 5
  default: 50
  min_label: "Not confident at all"
  max_label: "Completely confident"
  show_value: true

强度量表

yaml
- name: "intensity"
  description: "Rate the emotional intensity of this text"
  annotation_type: "slider"
  min: 1
  max: 10
  step: 1
  default: 5
  min_label: "Very mild"
  max_label: "Very intense"

百分比输入

yaml
- name: "agreement"
  description: "What percentage of people would agree with this statement?"
  annotation_type: "slider"
  min: 0
  max: 100
  step: 1
  default: 50
  show_value: true

输出格式

滑块标注输出一个数值:

json
{
  "id": "item_1",
  "annotations": {
    "confidence": 75
  }
}

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

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

最佳实践

  1. 设置合理的默认值 - 将默认位置放在有意义的位置(通常是中点)
  2. 使用端点标签 - 帮助标注者理解量表代表什么
  3. 选择合适的步长 - 细粒度区分用较小步长,粗略评分用较大步长
  4. 保持范围直观 - 0-100 或 1-10 对大多数标注者来说都很熟悉