Surfdan's picture
Add dataset card
791e54f verified
|
Raw History Blame Contribute Delete
2.38 kB
metadata
language: en
license: mit
task_categories:
  - conversational
  - question-answering
tags:
  - function-calling
  - tool-use
  - synthetic
  - glm5
  - agentic
size_categories:
  - 1K<n<10K

GLM-5.3-Flash Function Calling (synthetic)

A synthetic function-calling dataset generated with zai-org/GLM-5.3-Flash via Hugging Face Inference Providers. Every example is schema-validated and deduplicated before it is written.

Splits

File Format Rows
data/messages.jsonl OpenAI messages (multi-turn) —
data/xlam.jsonl xlam single-turn —

The table is filled in when the generation run completes.

messages format

{
  "id": "glm53fc-000123",
  "messages": [
    {"role": "system", "content": "..."},
    {"role": "user", "content": "..."},
    {"role": "assistant", "content": null, "tool_calls": [{"id": "call_1", "type": "function", "function": {"name": "...", "arguments": "{...}"}}]},
    {"role": "tool", "tool_call_id": "call_1", "name": "...", "content": "{...}"},
    {"role": "assistant", "content": "final natural-language answer"}
  ],
  "tools": [/* OpenAI function definitions used in the example */],
  "domain": "travel",
  "type": "tool" 
}

Multi-call examples contain several entries in one assistant tool_calls list plus one tool reply per call.

xlam format

{"id": "...", "query": "user request", "tools": [...], "answers": [{"name": "...", "arguments": {...}}]}

No-tool ("negative") examples have empty answers — they teach a model not to call a function.

Generation pipeline

  1. Scenario — GLM-5.3-Flash invents a domain scenario with 3–6 JSON-schema functions and a natural user query (16 domains, ~85% tool-using / 15% no-tool negatives).
  2. Call — the same model answers with tools attached (tool_choice="required" / "auto"), producing real OpenAI-style tool_calls.
  3. Simulate — the model fabricates plausible JSON tool results, then writes the final assistant answer with results in context.

Arguments are validated against each function's JSON Schema (required keys present, types match, no extra keys); failures are dropped. Generation script: generate_function_calling.py. Resume-safe (append + dedup), so later runs extend the dataset in place.