five

AmanPriyanshu/reasoning-sft-JSON-structuring-and-correcting

收藏
Hugging Face2026-03-10 更新2026-03-29 收录
下载链接:
https://hf-mirror.com/datasets/AmanPriyanshu/reasoning-sft-JSON-structuring-and-correcting
下载链接
链接失效反馈
官方服务:
资源简介:
--- license: apache-2.0 task_categories: - text-generation - question-answering language: - en - ja tags: - reasoning - sft - chain-of-thought - tool-calling - structured-output - json - json-repair - agent size_categories: - 100K<n<1M --- # JSON Structuring and Correcting (Reasoning SFT) Combined dataset of 508K rows for training LLMs on structured output tasks with reasoning traces, sourced from two datasets: ## Sources ### tool_calling.parquet (488,461 rows) Converted from [vericava/sft-tool-calling-structured-output-v1](https://huggingface.co/datasets/vericava/sft-tool-calling-structured-output-v1). Multi-turn tool calling and structured output tasks including tool invocations, tool results, and final assistant responses. Includes English and Japanese content. ### json_repair.parquet (19,645 rows) Converted from [kth8/json-repair](https://huggingface.co/datasets/kth8/json-repair). JSON formatting and repair tasks where the model corrects malformed JSON into valid, properly indented output. ## Format Each row has three columns: - **`input`** — list of dicts with role/content conversation turns (system prompt includes tools/schema where applicable) - **`response`** — response string with `<think>` reasoning block followed by the structured output - **`source`** — `N/A` ## Conversion - Tool-calling: system prompt combines model identity + available tools + output schema; tool calls and results preserved as context turns; 1,322 rows dropped (empty targets) - JSON repair: system + user turns as input, assistant response as output; 0 rows dropped - Both: short task-focused reasoning injected in think blocks; validated exactly 1 open and 1 close think tag per response ## Usage ```py from huggingface_hub import hf_hub_download import pyarrow.parquet as pq import random repo = "AmanPriyanshu/reasoning-sft-JSON-structuring-and-correcting" for name in ["tool_calling.parquet", "json_repair.parquet"]: path = hf_hub_download(repo_id=repo, filename=name, repo_type="dataset") table = pq.read_table(path) print(f"{'='*80}") print(f"{name}: {len(table)} rows") print(f"{'='*80}") i = random.randint(0, len(table) - 1) row = {col: table.column(col)[i].as_py() for col in table.schema.names} print(f"\n[source] {row['source']}") print(f"\n[input] ({len(row['input'])} turns)") for t in row["input"]: preview = t["content"][:250] + ("..." if len(t["content"]) > 250 else "") print(f" {t['role']}: {preview}") rp = row["response"][:800] if len(row["response"]) > 800: rp += "..." print(f"\n[response]\n{rp}\n") ``` ## License Apache 2.0 — inherited from both source datasets.

许可证:Apache-2.0 任务类别: - 文本生成 - 问答 语言: - 英语 - 日语 标签: - 推理 - 监督微调(SFT) - 思维链(Chain-of-Thought) - 工具调用(Tool Calling) - 结构化输出(Structured Output) - JSON - JSON修复 - AI智能体(AI Agent) 规模类别:10万<样本数<100万 # JSON结构化与修复(推理监督微调) 本数据集包含50.8万条数据,用于训练支持推理轨迹的结构化输出任务的大语言模型(LLM),数据源自两个公开数据集: ## 数据源 ### tool_calling.parquet(488,461条数据) 源自[vericava/sft-tool-calling-structured-output-v1](https://huggingface.co/datasets/vericava/sft-tool-calling-structured-output-v1)。涵盖多轮工具调用与结构化输出任务,包含工具调用、工具返回结果与最终助手回复,支持英语与日语内容。 ### json_repair.parquet(19,645条数据) 源自[kth8/json-repair](https://huggingface.co/datasets/kth8/json-repair)。包含JSON格式修复任务,要求模型将格式错误的JSON修正为合法且缩进规范的输出内容。 ## 数据格式 每条数据包含三列: - **`input`**:包含角色/内容对话轮次的字典列表(系统提示中会按需包含工具与输出schema) - **`response`**:回复字符串,以`<think>`推理块开头,后接结构化输出内容 - **`source`**:`N/A`(未指定具体来源) ## 数据处理流程 - 工具调用任务:系统提示由模型身份、可用工具与输出schema组合而成;工具调用与结果作为上下文轮次保留;移除1322条无效目标(空目标)数据 - JSON修复任务:以系统与用户轮次作为输入,助手回复作为输出;未移除任何数据 - 两类任务均:在`<think>`块中注入针对任务的简短推理内容;经校验,每条回复恰好包含1个`<think>`起始标签与1个`<think>`闭合标签 ## 使用示例 py from huggingface_hub import hf_hub_download import pyarrow.parquet as pq import random repo = "AmanPriyanshu/reasoning-sft-JSON-structuring-and-correcting" for name in ["tool_calling.parquet", "json_repair.parquet"]: path = hf_hub_download(repo_id=repo, filename=name, repo_type="dataset") table = pq.read_table(path) print(f"{'='*80}") print(f"{name}: {len(table)} 条数据") print(f"{'='*80}") i = random.randint(0, len(table) - 1) row = {col: table.column(col)[i].as_py() for col in table.schema.names} print(f" [来源] {row['source']}") print(f" [输入](共{len(row['input'])}轮对话)") for t in row["input"]: preview = t["content"][:250] + ("..." if len(t["content"]) > 250 else "") print(f" {t['role']}: {preview}") rp = row["response"][:800] if len(row["response"]) > 800: rp += "..." print(f" [回复] {rp} ") ## 许可证 本数据集采用Apache 2.0协议,协议内容继承自两个源数据集。
提供机构:
AmanPriyanshu
二维码
社区交流群
二维码
科研交流群
商业服务