kotraj / README.md
drlee1's picture
kotraj v0.1: 10,684 Korean tool-use trajectories (7,010 verified)
bc871f6 verified
|
Raw
History Blame Contribute Delete
8.34 kB
metadata
license: cc-by-4.0
language:
  - ko
task_categories:
  - text-generation
tags:
  - function-calling
  - tool-use
  - agentic
  - multi-turn
  - synthetic
  - conversational
  - korean
size_categories:
  - 10K<n<100K
pretty_name: kotraj
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*.parquet

kotraj — Korean Tool-use Trajectories

kotraj is a synthetic dataset of Korean-native multi-turn tool-use trajectories, generated end-to-end in Korean — task design, user utterances, tool calls, and responses — rather than translated from English corpora. Trajectories are grounded in deterministic mock tool environments that model everyday Korean services (shopping, transport and travel booking, calendar and email), and every tool call in the released data was actually executed and replay-verified against those environments.

Highlights

  • 10,684 trajectories across 3 domains and 30 tools defined with Korean-language JSON Schemas (OpenAI function-calling compatible)
  • Two quality tiers: verified (7,010 — passed the full rule gate and an LLM-judge review, avg. judge score 4.91/5) and unverified (3,674 — clean conversations that did not fully complete the task; filter by verify_status)
  • Execution-grounded verification: JSON-Schema validation of every call, tool_call_id consistency checks, deterministic replay of the entire call log, and machine-checkable success criteria (required calls, ordering constraints, final environment state)
  • Rich interaction mix: multi-turn information seeking (hidden user constraints revealed only when asked), sequential dependent calls, parallel calls, single calls, and refusal/no-call cases
  • Persona-conditioned users: 10 persona axes (age group, formality, speech style, regional context, life stage, digital literacy, request relationship, priorities, speech habits, accessibility considerations) to secure diversity under a single-teacher setup

Dataset at a glance

total verified unverified
trajectories 10,684 7,010 3,674
avg. user turns 3.7 3.5
avg. tool calls 4.5 4.0
multi-turn ratio (≥2 turns) 89.2%
call pattern total verified
multi_turn (info elicitation across turns) 3,720 2,169
sequential (dependent call chains) 3,560 2,331
single (one-shot call) 1,527 1,247
parallel (independent calls at once) 1,175 850
no_call (refusal / out-of-scope) 702 413
domain trajectories tools
calendar (calendar & email) 3,747 10
travel (transport & lodging booking) 3,581 10
commerce (shopping & delivery) 3,356 10

Example

A verified sequential trajectory from the travel domain (Korean, as released):

U: 아들아, 내가 예전에 잡아둔 기차표 있잖아. 예약 번호가 R0001인데, 이게 정확히
   언제 떠나는지 한번 봐주라. 손주들 데리고 갈라니까 시간이 맞나 궁금하네.
A: [tool_call] get_reservation({"reservation_id": "R0001"})
T: {"ok": true, "reservation": {"trip": {"kind": "KTX", "origin": "서울",
   "destination": "부산", "date": "2026-08-09", "departure": "09:20", ...}}}
A: 예약 번호 R0001 조회 결과 알려드릴게요!
   - 출발일: 2026년 8월 9일 (일요일)  - 출발 시간: 오전 9시 20분
   - 노선: 서울 → 부산 (KTX)  - 탑승 인원: 2명 ...

Schema

column type description
id string Unique trajectory ID
domain string commerce | travel | calendar
tools string (JSON) Full tool inventory of the domain — OpenAI function-calling compatible JSON Schemas with Korean descriptions
messages string (JSON) Array of system / user / assistant / tool messages; assistant messages may carry tool_calls
n_turns int Number of user turns
n_tool_calls int Number of tool calls
call_pattern string single | sequential | parallel | multi_turn | no_call
tool_env string mock (deterministic execution) — this release is 100% mock-executed
success_criteria string (JSON) Machine-checkable success spec: required_calls (tool, argument subset, prerequisite ordering) plus free-form notes for the judge
judge_score float Mean of 3-axis LLM-judge scores (goal / consistency / naturalness, 1–5 each); may be null for unverified rows
verify_status string verified | unverified (see below)
gen_model string upstage-family
pipeline_ver string Generation pipeline version
seed int Mock environment seed (for reproduction)

Quality tiers

  • verified — passed every gate: (1) the rule gate — tool schema validity, tool_call_id consistency, deterministic replay of the full call log against the mock environment, and satisfaction of success_criteria (required calls, call ordering, final environment state); and (2) an LLM judge scoring goal achievement, step consistency, and Korean naturalness on 1–5 scales with a threshold-based accept.
  • unverified — conversations with no formatting corruption or misbehavior whose task was nevertheless left incomplete (e.g., some required calls missing). Released with labels preserved so they can be used for filtering experiments or training on imperfect interactions. For plain SFT we recommend using the verified tier only.

Trajectories with formatting corruption (leaked tool-call tokens), write-calls in no-call cases, turn-cap truncation, or replay mismatches were excluded from the release entirely.

How it was built

A single-teacher, 3-role simulation pipeline:

  1. Task synthesis — task specs are generated by combining domain × scenario category × Korean everyday situation × case variant × persona (10 axes). Every task carries machine-checkable success_criteria and hidden_info — key parameters the simulated user reveals only when asked, which forces genuine multi-turn interaction.
  2. 3-role rollout — separate user-simulator / agent (native function calling) / tool-environment roles. Tool responses come from seed-fixed, stateful Python mock executors (carts, reservation slots, calendars, pre-seeded resources), not from an LLM.
  3. Verification — only trajectories that pass the rule gate (schema, consistency, deterministic replay, success criteria) are scored by an LLM judge on goal / consistency / naturalness (1–5), with threshold-based acceptance.
  4. Refinement — two-level deduplication (task spec and trajectory signature), tier labeling, and packaging.

Generation, user simulation, and judging all use an Upstage-family LLM (single teacher). Diversity is obtained from the combinatorial persona/scenario/case axes rather than from multiple teacher models.

Usage

from datasets import load_dataset
import json

ds = load_dataset("drlee1/kotraj", split="train")

# Recommended for SFT: keep the verified tier only
verified = ds.filter(lambda x: x["verify_status"] == "verified")

row = verified[0]
messages = json.loads(row["messages"])
tools = json.loads(row["tools"]) 

Limitations

  • Single teacher: generation, user simulation, and judging share one Upstage-family model — style bias and self-judging limitations apply
  • Mock environments: execution verification is exact, but response diversity and edge cases are simpler than real production APIs; some tools (e.g., product search) use literal matching without the resilience of a real search engine
  • Domain coverage: v0.1 covers 3 domains / 30 tools; public-sector, finance, healthcare booking and other domains are planned for future versions
  • LLM judge: judge_score comes from an LLM and may differ from human evaluation
  • All persons, contacts, products, and reservations are fictional; the dataset contains no real personal information

License

CC-BY-4.0

Citation

@misc{kotraj2026,
  title   = {kotraj: Korean-native Multi-turn Tool-use Trajectories with Execution-grounded Verification},
  author  = {Lee, Dongryeol},
  year    = {2026},
  url     = {https://huggingface.co/datasets/drlee1/kotraj}
}