Skip to content

会話ツリー

ノード評価とパス選択による階層的な会話構造のアノテーション。

会話ツリー

ツリーアノテーションスキーマは、チャットボットの応答ツリー、対話システム、分岐ナラティブなどの階層的な会話構造のアノテーションを可能にします。アノテーターは個々のノードを評価し、好みのパスを選択し、分岐点でブランチを比較できます。

ユースケース

  • チャットボット評価 - 複数の応答オプションの品質評価
  • 対話システム - 好みの会話パスの選択
  • A/Bテスト - 異なる応答戦略の比較
  • インタラクティブフィクション - 分岐ストーリーパスの評価

クイックスタート

yaml
annotation_schemes:
  - annotation_type: tree_annotation
    name: response_quality
    description: Evaluate the conversation tree
    node_scheme:
      annotation_type: likert
      min_label: "Poor"
      max_label: "Excellent"
      size: 5
    path_selection:
      enabled: true
      description: Select the best response path through the tree

設定オプション

フィールドタイプデフォルト説明
annotation_typestring必須"tree_annotation"でなければならない
namestring必須このスキーマの一意識別子
descriptionstring必須アノテーターに表示される指示
node_schemeobject{}ノードごとのアノテーション用スキーム設定
path_selection.enabledbooleanfalseツリーを通るパス選択を有効化
path_selection.descriptionstring"Select the best response path"パス選択の指示
branch_comparison.enabledbooleanfalseブランチ比較モードを有効化

ノード評価

会話ツリーの各応答を評価:

yaml
annotation_schemes:
  - annotation_type: tree_annotation
    name: response_rating
    description: Rate each response in the conversation
    node_scheme:
      annotation_type: likert
      min_label: "Very Bad"
      max_label: "Very Good"
      size: 5

パス選択

会話を通じた最適なパスを選択:

yaml
annotation_schemes:
  - annotation_type: tree_annotation
    name: best_path
    description: Navigate the conversation tree
    path_selection:
      enabled: true
      description: Click on responses to build the best conversation path

多基準ノード評価

複数の次元でノードを評価:

yaml
annotation_schemes:
  - annotation_type: tree_annotation
    name: multi_criteria
    description: Evaluate each response on multiple criteria
    node_scheme:
      annotation_type: multirate
      options:
        - Relevance
        - Fluency
        - Helpfulness
      labels: ["1", "2", "3", "4", "5"]

ブランチ比較モード

分岐点で兄弟ブランチを比較:

yaml
annotation_schemes:
  - annotation_type: tree_annotation
    name: branch_compare
    description: Compare response options at each decision point
    branch_comparison:
      enabled: true
    node_scheme:
      annotation_type: radio
      labels: ["Better", "Same", "Worse"]

データ形式

入力

ツリーデータは階層構造を持つJSON形式で提供します:

json
{
  "id": "conv_001",
  "tree": {
    "id": "root",
    "role": "user",
    "content": "Hello, I need help with my order",
    "children": [
      {
        "id": "resp_a",
        "role": "assistant",
        "content": "I'd be happy to help! Can you provide your order number?",
        "children": [
          {
            "id": "user_2",
            "role": "user",
            "content": "It's ORDER-12345",
            "children": []
          }
        ]
      },
      {
        "id": "resp_b",
        "role": "assistant",
        "content": "Sure, what seems to be the problem?",
        "children": []
      }
    ]
  }
}

ツリーデータキーの設定:

yaml
item_properties:
  id_key: id
  tree_key: tree

出力

ツリーアノテーションはノードレベルとパスレベルの両方のデータで保存されます:

json
{
  "response_quality": {
    "node_annotations": {
      "resp_a": {
        "rating": 4
      },
      "resp_b": {
        "rating": 2
      }
    },
    "selected_path": ["root", "resp_a", "user_2"]
  }
}

ユーザーインターフェース

ツリーの可視化

会話ツリーは、メッセージ/応答を表すノード、親子関係を接続するエッジ、複数の応答が存在する分岐点で表示されます。

ノード選択

任意のノードをクリックして、完全なメッセージ内容を表示し、アノテーションパネルにアクセスし、ノードを選択パスに追加できます(パス選択が有効な場合)。

パス選択

パス選択が有効な場合、ノードをクリックしてパスに追加します。選択されたパスはハイライトされ、「パスをクリア」で最初からやり直せます。

ベストプラクティス

  1. ノードスキームをシンプルに - 各ノードに複雑なアノテーションインターフェースがあるとアノテーションが遅くなる
  2. コンテキストを提供 - 応答を評価する際にアノテーターが親メッセージを見られるようにする
  3. パス選択を賢く使用 - 小さなツリーに最適
  4. アノテーターを訓練 - ツリーナビゲーションには練習が必要。トレーニング例を提供

関連資料

実装の詳細については、ソースドキュメントを参照してください。