You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

BFCL-toolcall-SDG

資料集概述

  • 來源:依 Berkeley Function Calling Leaderboard(BFCL) 的評測類別設計的合成工具呼叫對話,經人工審查。
  • 用途:工具呼叫(function calling)的監督式微調(SFT)。
  • 主要輸出:data/train.jsonl(373 列、366 條對話軌跡)。
  • 授權:僅供內部共享使用。

Splits

Split 檔案 說明
train data/train.jsonl 單輪與多輪工具呼叫對話,每列是一個訓練樣本

資料結構

  • 每一列的 messages 都以一則 assistant 訊息結尾,這則訊息就是監督目標,內容可能是工具呼叫(154 列),也可能是文字回覆(219 列)。
  • 單輪類別(simple、multiple、parallel、live_*、irrelevance 等):每條軌跡一列。
  • 多輪類別(multi_turn_*):每條軌跡一列,內容是包含完整對話的最後一步。

欄位說明

欄位 型別 說明
id string 每列唯一的識別碼
trajectory_id string 所屬對話軌跡;只有 multi_turn_miss_func 會有多列共用同一個值
category string 對應的 BFCL 類別(見下方統計)
messages list OpenAI 格式的對話:user、assistant(可帶 tool_calls)、tool(帶 tool_call_id、name);沒有 system 訊息
tools string 工具定義清單的 JSON 字串;json.loads 後為 OpenAI function 格式的 list({"type": "function", "function": {...}})

tool_calls[].function.arguments 與 OpenAI 格式相同,存成 JSON 字串。

目前資料統計

data/train.jsonl:373 列,其中單輪 305 列(305 條軌跡)、多輪 68 列(61 條軌跡)。

category 軌跡數 列數
simple 126 126
multiple 59 59
parallel 39 39
multi_turn_base 28 28
multi_turn_miss_param 18 18
parallel_multiple 18 18
irrelevance 14 14
live_parallel_multiple 14 14
multi_turn_long_context 14 14
live_relevance 11 11
live_multiple 9 9
multi_turn_miss_func 1 8
live_irrelevance 7 7
live_parallel 5 5
live_simple 3 3
  • 語言:單輪類別為繁體中文(台灣用語);多輪類別以英文為主(約九成),其餘為繁體中文;工具描述多為英文。

使用方式(最小範例)

import json
from datasets import load_dataset

ds = load_dataset("minyichen/BFCL-toolcall-SDG", split="train")
row = ds[0]
tools = json.loads(row["tools"])  # 工具定義
for m in row["messages"]:
    for tc in m.get("tool_calls") or []:
        args = json.loads(tc["function"]["arguments"])  # 呼叫參數

若要直接讀檔:

import json

with open("data/train.jsonl", encoding="utf-8") as f:
    rows = [json.loads(line) for line in f]
Downloads last month
48