File size: 2,362 Bytes
bcd2b5f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | ---
language:
- en
license: apache-2.0
size_categories:
- 1K<n<10K
task_categories:
- text-generation
pretty_name: OpenAI Function Calling Format (5K)
tags:
- function-calling
- tool-use
- openai
- chat
- messages
- synthetic
- instruction-tuning
- tool_calls
configs:
- config_name: default
data_files:
- split: train
path: openai-function-calling-5k.jsonl
---
# OpenAI Function Calling Format (5K)
Synthetic function-calling conversations in the **OpenAI messages format** (`tool_calls` / `tool` role).
## Why This Dataset
Compatible with GPT-4, Mistral, Llama-3.1, Qwen2.5, and any model trained on the OpenAI chat format. Most existing function-calling datasets use abstract schemas — this uses the exact wire format models see in production.
## Dataset Description
**5,000 conversations** across 10 tool types:
| Tool | Single-turn | Multi-turn |
|---|---|---|
| `get_weather` | ✓ | — |
| `get_stock_price` | ✓ | ✓ |
| `search_web` | ✓ | ✓ |
| `execute_python` | ✓ | ✓ |
| `query_database` | ✓ | — |
| `send_email` | ✓ | ✓ |
| `create_calendar_event` | ✓ | — |
| `translate_text` | ✓ | — |
| `read_file` | ✓ | ✓ |
| `create_chart` | ✓ | — |
- **~80% single-turn** (one tool call → result → response)
- **~20% multi-turn** (sequential tool calls, e.g. search then email)
## Format
Exact OpenAI messages format:
```json
{
"messages": [
{"role": "system", "content": "You are a helpful AI assistant..."},
{"role": "user", "content": "What's the weather in Tokyo?"},
{
"role": "assistant",
"content": null,
"tool_calls": [{
"id": "call_abc123",
"type": "function",
"function": {"name": "get_weather", "arguments": "{"location": "Tokyo, Japan"}"}
}]
},
{"role": "tool", "content": "{"temperature": 28, ...}", "tool_call_id": "call_abc123"},
{"role": "assistant", "content": "Current weather in Tokyo: 28°C..."}
],
"tools": [{"type": "function", "function": {...}}],
"metadata": {"type": "single_turn", "tool": "get_weather"},
"id": "abc123"
}
```
## Use Case
- Fine-tune LLMs for function calling (SFT on chosen response)
- Train tool-selection and argument generation
- Evaluate function-calling capability
- Drop-in compatible with OpenAI fine-tuning API format (with minor adaptation)
## License
Apache 2.0
|