Dataset Viewer
Auto-converted to Parquet Duplicate
message
stringlengths
6.57k
1.17M
subsplit
stringclasses
4 values
uuid
stringlengths
15
20
source
stringclasses
9 values
domain
stringclasses
4 values
n_tools
int64
1
43
tool_names
stringclasses
7 values
n_turns
int64
4
573
n_assistant_turns
int64
2
286
n_tool_calls
int64
0
285
n_reasoning_turns
int64
1
286
n_chars
int64
6.57k
1.17M
[{"role": "system", "content": "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{\"name\": \"shell\", \"description\": \"Execute a shell command and return its output. Pass `command` as a plain string (r...
Code-Agent
Code_Agent_000001
codex-like-codex.jsonl
Code_Agent
6
shell,apply_patch,read_file,rg,delete,update_plan
22
10
10
10
56,049
[{"role": "system", "content": "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{\"name\": \"shell\", \"description\": \"Execute a shell command and return its output. Pass `command` as a plain string (r...
Code-Agent
Code_Agent_000002
codex-like-codex.jsonl
Code_Agent
6
shell,apply_patch,read_file,rg,delete,update_plan
70
31
37
31
110,648
"[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou may call one or more functions to assist wi(...TRUNCATED)
Code-Agent
Code_Agent_000003
codex-like-codex.jsonl
Code_Agent
6
shell,apply_patch,read_file,rg,delete,update_plan
107
53
52
53
172,763
"[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou may call one or more functions to assist wi(...TRUNCATED)
Code-Agent
Code_Agent_000004
codex-like-codex.jsonl
Code_Agent
6
shell,apply_patch,read_file,rg,delete,update_plan
89
41
46
41
174,280
"[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou may call one or more functions to assist wi(...TRUNCATED)
Code-Agent
Code_Agent_000005
codex-like-codex.jsonl
Code_Agent
6
shell,apply_patch,read_file,rg,delete,update_plan
94
45
47
45
133,758
"[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou may call one or more functions to assist wi(...TRUNCATED)
Code-Agent
Code_Agent_000006
codex-like-codex.jsonl
Code_Agent
6
shell,apply_patch,read_file,rg,delete,update_plan
46
22
22
22
56,854
"[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou may call one or more functions to assist wi(...TRUNCATED)
Code-Agent
Code_Agent_000007
codex-like-codex.jsonl
Code_Agent
6
shell,apply_patch,read_file,rg,delete,update_plan
49
23
24
23
108,012
"[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou may call one or more functions to assist wi(...TRUNCATED)
Code-Agent
Code_Agent_000008
codex-like-codex.jsonl
Code_Agent
6
shell,apply_patch,read_file,rg,delete,update_plan
78
37
39
37
229,908
"[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou may call one or more functions to assist wi(...TRUNCATED)
Code-Agent
Code_Agent_000009
codex-like-codex.jsonl
Code_Agent
6
shell,apply_patch,read_file,rg,delete,update_plan
90
43
45
43
103,151
"[{\"role\": \"system\", \"content\": \"# Tools\\n\\nYou may call one or more functions to assist wi(...TRUNCATED)
Code-Agent
Code_Agent_000010
codex-like-codex.jsonl
Code_Agent
6
shell,apply_patch,read_file,rg,delete,update_plan
47
22
23
22
78,672
End of preview. Expand in Data Studio

UltraData-SFT-Agent-2609 · GLM-5.3-Flash tools-in-system-prompt

20,000 agent trajectories from openbmb/UltraData-SFT-Agent-2609, flattened into one table, with each row's tools list rendered into the system prompt in the exact format zai-org/GLM-5.3-Flash builds for itself.

Upstream ships tools in a separate tools column, which means a trainer has to pass tools= to apply_chat_template and hope the template matches. Here the tool schemas already sit inside messages[0], so message is self-contained: apply GLM-5.3-Flash's chat template to it with no tools= argument and you get the same string the model sees at inference.

The transformation

The tools block is not hand-written. It is rendered from the model's real chat_template.jinja, so it matches byte for byte — including the XML-ish <tool_call>name<arg_key>k</arg_key><arg_value>v</arg_value></tool_call> call syntax GLM demands instead of OpenAI-style JSON arguments.

# Tools

You may call one or more functions to assist with the user query.

You are provided with function signatures within <tools></tools> XML tags:
<tools>
{"name": "calculate", "description": "...", "parameters": {...}}
{"name": "cancel_pending_order", "description": "...", "parameters": {...}}
</tools>

For each function call, output the function name and arguments within the following XML format:
<tool_call>{function-name}<arg_key>{arg-key-1}</arg_key><arg_value>{arg-value-1}</arg_value><arg_key>{arg-key-2}</arg_key><arg_value>{arg-value-2}</arg_value>...</tool_call>

<the row's original system prompt, verbatim>

Note the template unwraps the {"type": "function", "function": {...}} envelope and emits only the inner object — that is GLM's behaviour, reproduced here. Rows with no tools keep their original system prompt untouched; rows with tools but no system turn get one created.

Columns

Column Type Meaning
message string JSON array of chat turns. Roles: system, user, assistant, tool. Assistant turns may carry reasoning_content and tool_calls.
subsplit string Which upstream config the row came from
uuid string Upstream row id
source string Upstream provenance string
domain string Upstream domain label
n_tools int Tool schemas rendered into the system prompt
tool_names string Comma-separated tool names, in template order
n_turns int Messages in message, including the system turn
n_assistant_turns int Assistant messages
n_tool_calls int Total tool calls across all assistant turns
n_reasoning_turns int Assistant turns carrying non-empty reasoning_content
n_chars int len(message)

message is a string, not a struct, so the table stays flat and loads without a feature spec. Parse it with json.loads.

Usage

import json
from datasets import load_dataset
from transformers import AutoTokenizer

ds = load_dataset("kaivoss/UltraData-SFT-Agent-2609-GLM53-20k", split="train")
tok = AutoTokenizer.from_pretrained("zai-org/GLM-5.3-Flash")

messages = json.loads(ds[0]["message"])
text = tok.apply_chat_template(messages, tokenize=False)   # no tools= needed

Filter by capability with the count columns — e.g. multi-turn tool use only:

ds.filter(lambda r: r["n_tool_calls"] >= 5 and r["n_reasoning_turns"] > 0)

Composition

Subsplit Rows Mean tools Mean turns Mean tool calls Reasoning turns/row Mean chars
Code-Agent 5,000 6.0 120.5 61.4 56.8 233,451
General-Agent 5,000 25.0 39.7 21.0 16.2 161,856
Search-Agent 5,000 2.0 118.3 57.8 58.6 150,015
Tool-Use 5,000 21.9 20.4 5.8 6.6 39,807
total 20,000 146,282

Build

Everything below the data was produced by build.py:

  • rows are streamed in upstream file order and taken until the per-subsplit quota is met — not randomly sampled, so the distribution within a subsplit reflects the head of the upstream shards
  • Search-Agent stores messages and tools as JSON strings upstream while the other three store lists; both are handled
  • gates reject any row with no assistant turn, an unrecognised role, a tools list that failed to land in the system prompt, or a tool name missing from the rendered block; exact-duplicate message values are dropped
  • character counts are exact; no token counts are quoted, because they would depend on a tokenizer version this card cannot pin

Limitations

  • Head-of-shard sampling. See above. If you need a uniform sample of upstream, re-run the build with a shuffle buffer.
  • Long rows. Mean n_chars runs into six figures for the code and search subsplits. Check against your context window before training; many rows exceed common sequence lengths and will need truncation or trajectory splitting.
  • No loss-mask field. Decide masking yourself. The usual choice is to mask system, user and tool turns and train on assistant reasoning_content + content + tool_calls.
  • Reasoning is upstream's, not GLM's. reasoning_content comes from whatever model generated the original trajectory. It is a distillation target, not GLM-5.3-Flash's own chain of thought.

Licence and attribution

Apache-2.0, inherited from openbmb/UltraData-SFT-Agent-2609 (arXiv:2602.09003). Only the system-prompt formatting is new here; all conversational content is upstream's. Cite them.

Downloads last month
111

Models trained or fine-tuned on kaivoss/UltraData-SFT-Agent-2609-GLM53-20k

Paper for kaivoss/UltraData-SFT-Agent-2609-GLM53-20k