🇰🇿 Kazakh Exception and Tool Failure Handling Dataset
Dataset Summary
Kazakh Exception and Tool Failure Handling Dataset is a Kazakh-language dataset designed for training and evaluating Large Language Models (LLMs) in agentic AI workflows where tool calls may fail, return errors, or require retry behavior.
The dataset contains user requests, available tool schemas, expected tool calls, mock tool responses, tool failure messages, retry attempts, and final assistant answers. It focuses on practical situations where an assistant must call an external tool, interpret an error response, decide whether a retry is appropriate, and then complete the task after a successful tool response.
📊 Dataset Statistics
General Metrics
| Metric | Count |
|---|---|
| Total Samples | 3,000 |
| Total Words (approx.) | 807,564 |
| Avg. Words per Sample | 269 |
Word Count Distribution Per Field
The following table details the distribution of word counts across different fields in the dataset.
| Field | Mean | Median | Min | Max | Total Words |
|---|---|---|---|---|---|
| answers | 23.7 | 24.0 | 8 | 42 | 71,094 |
| category | 1.0 | 1.0 | 1 | 1 | 3,000 |
| difficulty | 1.0 | 1.0 | 1 | 1 | 3,000 |
| id | 1.0 | 1.0 | 1 | 1 | 3,000 |
| query | 8.0 | 7.0 | 3 | 20 | 23,880 |
| tools | 38.2 | 37.0 | 26 | 56 | 114,534 |
| turns | 196.4 | 195.0 | 115 | 383 | 589,056 |
Dataset Structure
Each dataset instance represents a complete tool-use scenario with possible failure and recovery. A sample usually includes a Kazakh user request, the available tool schema, the expected tool calls, one or more mock tool responses, and the final assistant answer.
Data Fields
id: A unique identifier for the sample.category: The task category. For example,08_exception_failure_handlingindicates that the sample focuses on tool exceptions, API failure handling, and retry behavior.query: The original user request in Kazakh. The query may involve search, shopping, service lookup, or another tool-based task.tools: A list of tools available to the assistant. Each tool contains:name: the tool name;description: the tool’s purpose;parameters: the expected argument schema;mock_response: the expected response structure.
difficulty: The difficulty label of the sample.answers: The expected tool calls. In failure-handling scenarios, this field may include repeated or corrected tool calls after an initial error.turns: The complete interaction trajectory, including:- user request;
- assistant planning;
- initial tool call;
- tool error response;
- assistant retry decision;
- retry tool call;
- successful tool output;
- final user-facing answer.
Data Instance
Below is one representative example from the dataset.
{
"id": "kk_08_exception_failure_handling_0001_0001",
"category": "08_exception_failure_handling",
"query": "Жазғы киімдерді қарастыруға бола ма?",
"tools": [
{
"name": "shop.search",
"description": "Search products in online store",
"parameters": {
"query": {
"type": "string",
"description": "Product search query",
"required": true
},
"category": {
"type": "string",
"description": "Product category",
"required": false
},
"sort": {
"type": "string",
"description": "price_low, price_high, rating",
"required": false
}
},
"mock_response": {
"items": [
{
"id": "",
"name": "",
"price": null,
"currency": "",
"in_stock": null
}
]
}
}
],
"difficulty": "hard",
"answers": [
{
"name": "shop.search",
"arguments": "{\"query\": \"жазғы киім\", \"category\": \"clothing\", \"sort\": \"price_low\"}"
},
{
"name": "shop.search",
"arguments": "{\"query\": \"жазғы киім\", \"category\": \"clothing\", \"sort\": \"price_low\"}"
}
],
"turns": [
{
"role": "user",
"content": "Жазғы киімдерді қарастыруға бола ма?"
},
{
"role": "assistant",
"content": "Алдымен жазғы киімдер бойынша іздеу жүргіземін.",
"meta": {
"plan": "I will start by searching for summer clothes.",
"tags": [],
"difficulty": "hard"
}
},
{
"role": "assistant",
"tool_call": {
"name": "shop.search",
"arguments": "{\"query\": \"жазғы киім\", \"category\": \"clothing\", \"sort\": \"price_low\"}"
}
},
{
"role": "tool",
"content": "{\"error\": true, \"type\": \"RateLimitExceeded\", \"message\": \"Too many requests\", \"code\": 429, \"retry_after\": 60}"
},
{
"role": "assistant",
"content": "Сұраулар саны шектелді, сондықтан қайтадан іздеуді жалғастырамын.",
"meta": {
"plan": "I encountered a limit on the number of queries, so I will retry the search.",
"tags": [
"rate_limited",
"retry"
],
"difficulty": "hard"
}
},
{
"role": "assistant",
"tool_call": {
"name": "shop.search",
"arguments": "{\"query\": \"жазғы киім\", \"category\": \"clothing\", \"sort\": \"price_low\"}"
}
},
{
"role": "tool",
"content": "{\"items\": [{\"id\": \"PROD-9249\", \"name\": \"жазғы киім 1\", \"price\": 10000, \"currency\": \"KZT\", \"in_stock\": true}, {\"id\": \"PROD-4632\", \"name\": \"жазғы киім 2\", \"price\": 25000, \"currency\": \"KZT\", \"in_stock\": true}, {\"id\": \"PROD-8953\", \"name\": \"жазғы киім 3\", \"price\": 10000, \"currency\": \"KZT\", \"in_stock\": true}]}"
},
{
"role": "assistant",
"content": "Міне, жазғы киімдер тізімі: 1. жазғы киім 1, бағасы 10000 KZT, қолжетімді. 2. жазғы киім 2, бағасы 25000 KZT, қолжетімді. 3. жазғы киім 3, бағасы 10000 KZT, қолжетімді. (Дерек көзі: shop.search)"
}
]
},
Funding
This dataset was developed as part of the project funded by the Ministry of Science and Higher Education of the Republic of Kazakhstan under Grant No. BR24993001, “Creation of a Large Language Model (LLM) to Support the Kazakh Language and Advance Technological Development.”
Citation
If you use this dataset in your research, please cite the following article:
APA
Kadyrbek, N., Tuimebayev, Z., Mansurova, M., & Viegas, V. (2025). The development of small-scale language models for low-resource languages, with a focus on Kazakh and direct preference optimization. Big Data and Cognitive Computing, 9(5), 137. https://doi.org/10.3390/bdcc9050137
BibTeX
@article{kadyrbek2025development,
title = {The Development of Small-Scale Language Models for Low-Resource Languages, with a Focus on Kazakh and Direct Preference Optimization},
author = {Kadyrbek, Nurgali and Tuimebayev, Zhanseit and Mansurova, Madina and Viegas, Vitor},
journal = {Big Data and Cognitive Computing},
volume = {9},
number = {5},
pages = {137},
year = {2025},
publisher = {MDPI},
doi = {10.3390/bdcc9050137},
url = {https://www.mdpi.com/2504-2289/9/5/137}
}
- Downloads last month
- 12
