tool-calling / README.md
jedisct1's picture
Add tool-calling harness dataset
bd43184 verified
|
Raw
History Blame Contribute Delete
3.76 kB
metadata
language:
  - en
license: mit
pretty_name: Tool Calling Harness Training Corpus
tags:
  - tool-calling
  - agents
  - codex
  - opencode
  - swival
  - function-calling
task_categories:
  - text-generation

Tool Calling Harness Training Corpus

This dataset contains supervised tool-calling conversations and executable eval tasks for three local coding-agent harnesses:

  • Swival
  • opencode
  • Codex CLI

The examples are OpenAI-style chat records. Assistant tool calls use a tool_calls array with JSON-encoded function arguments, followed by tool-result messages and final assistant responses. The corpus is intended for fine-tuning and evaluating local models that need to choose the right tool, use the correct argument shape, recover from harness-specific mistakes, and verify coding work through the actual harness.

Files

Training splits:

  • swival/train.jsonl: 6,064 examples
  • opencode/train.jsonl: 6,290 examples
  • codex/train.jsonl: 6,410 examples

Eval task specs:

  • swival/eval.jsonl: 5 executable eval tasks
  • opencode/eval.jsonl: 5 executable eval tasks
  • codex/eval.jsonl: 5 executable eval tasks

Tool inventories:

  • swival/tool_inventory.json
  • opencode/tool_inventory.json
  • codex/tool_inventory.json

Harness support files:

  • configs/opencode-qwen35.json
  • configs/codex-qwen35.toml
  • scripts/run_swival_eval.py
  • scripts/run_opencode_eval.py
  • scripts/run_codex_eval.py
  • scripts/validate_dataset.py
  • scripts/validate_opencode_dataset.py
  • scripts/validate_codex_dataset.py

Local Harness Targets

The generated eval runners were tested against a local OpenAI-compatible qwen35 server at http://127.0.0.1:8000.

Swival uses:

swival --profile omlx

opencode uses:

bunx opencode-ai@latest run --model qwen35/qwen35

Codex uses:

env OMLX_API_KEY=omlx codex -a never exec --json --ephemeral --skip-git-repo-check --sandbox workspace-write -c model_provider=\"omlx\" -m qwen35

Validation

The source workspace validated the generated artifacts with:

uv run python scripts/validate_dataset.py data/swival_tool_calling_train.jsonl
uv run python scripts/validate_dataset.py data/swival_tool_calling_eval.jsonl
uv run python scripts/validate_opencode_dataset.py data/opencode_tool_calling_train.jsonl
uv run python scripts/validate_opencode_dataset.py data/opencode_tool_calling_eval.jsonl
uv run python scripts/validate_codex_dataset.py data/codex_tool_calling_train.jsonl
uv run python scripts/validate_codex_dataset.py data/codex_tool_calling_eval.jsonl
uv run python scripts/run_swival_eval.py --self-check
uv run python scripts/run_opencode_eval.py --self-check
uv run python scripts/run_codex_eval.py --self-check

Live smoke tests were also run for opencode and Codex against the local qwen35 endpoint. Swival, opencode, and Codex each have their own tool naming and argument conventions, so the examples intentionally avoid collapsing them into one generic schema.

Schema

Training rows use:

{
  "id": "string",
  "split": "train",
  "tags": ["harness", "tool_name"],
  "messages": [
    {"role": "user", "content": "task"},
    {
      "role": "assistant",
      "content": "",
      "tool_calls": [
        {
          "id": "call_1",
          "type": "function",
          "function": {
            "name": "tool_name",
            "arguments": "{\"key\":\"value\"}"
          }
        }
      ]
    },
    {"role": "tool", "tool_call_id": "call_1", "name": "tool_name", "content": "tool result"},
    {"role": "assistant", "content": "final response"}
  ]
}

Eval rows define disposable workspace files plus verifiers such as exact file contents, substring checks, missing-file checks, JSON field checks, and command checks.