socratic-only-sft
收藏资源简介:
Socratic-Only SFT 是一个多轮辅导对话数据集,专门用于通过权重训练(不使用系统提示)将严格的苏格拉底式行为约束注入小型语言模型。该约束要求助手的每个句子都以问号结尾,且绝不透露用户问题的答案——无论是直接陈述、嵌入在问题中(如“难道不是巴黎吗?”即视为失败),还是通过过于具体的提示间接泄露。数据集的构建采用教师模型管道:Claude Haiku 4.5 生成对话,Claude Sonnet 修复被判断标记的轮次,用户角色设计为对抗性(施加“直接告诉我答案”的压力、情感诉求、对约束的元攻击、话题转移)。每轮助手回答均通过相同的严格判断器(确定性句子语法检查、文字字符串泄漏匹配、以及 Gemini 3.7 Flash 在温度0下的语义泄漏判断),失败的回答最多修复3次,否则丢弃整个对话。数据集包含多个配置:default 配置提供完整的2000条训练集(train_2000.jsonl);ladder 配置提供嵌套的效率阶梯子集(125、250、500、1000、2000条);eval_scenarios 配置提供120条行为评估场景(eval_dev.jsonl),与训练集主题不重叠。此外还有100条测试集(test.jsonl)用于评估训练损失,以及一个80条已冻结但尚未发布的 eval_final 集。数据字段:对于对话,每条记录包含 id、category、topic 和 messages(角色与内容);对于评估场景,包含 id、category、core_question、answer_summary、expected_answers 和 turns。该数据集的目标是验证通过少量高质量对话(约250-500条)即可使模型牢固掌握行为约束,实验表明在500条上微调的 Qwen3-1.7B(QLoRA)在约束遵守率(97.2%)和鲁棒性(93.0%)上均优于最佳提示的 Claude Sonnet 5 或 GPT-5.6-Luna(89.0%/66.7%)。数据集以 Apache-2.0 许可证发布,适用于文本生成任务中的行为调优、苏格拉底式辅导、合成数据蒸馏等研究。
Socratic-Only SFT is a multi-turn tutorial dialogue dataset specifically designed to inject strict Socratic behavioral constraints into small language models via weight training (without system prompts). The constraint requires that every sentence of the assistant ends with a question mark, and never reveals the answer to the users question—whether through direct statements, embedding in questions (e.g., Isnt it Paris? is considered a failure), or indirect leakage through overly specific hints. The dataset is constructed using a teacher model pipeline: Claude Haiku 4.5 generates dialogues, Claude Sonnet repairs rounds flagged by the judge, and the user role is designed adversarially (applying pressure to tell me the answer directly, emotional appeals, meta-attacks on constraints, topic shifts). Each assistant response goes through the same strict judge (deterministic sentence grammar check, literal string leakage matching, and Gemini 3.7 Flash at temperature 0 for semantic leakage judgment). Failed responses are repaired up to 3 times, otherwise the entire dialogue is discarded. The dataset includes multiple configurations: default provides the full 2000 training samples (train_2000.jsonl); ladder provides nested efficiency ladder subsets (125, 250, 500, 1000, 2000); eval_scenarios provides 120 behavioral evaluation scenarios (eval_dev.jsonl) with non-overlapping topics from the training set. Additionally, there are 100 test samples (test.jsonl) for training loss evaluation, and a frozen but unreleased eval_final set of 80 samples. Data fields: for dialogues, each record contains id, category, topic, and messages (role and content); for evaluation scenarios, each contains id, category, core_question, answer_summary, expected_answers, and turns. The dataset aims to verify that a small number of high-quality dialogues (about 250-500) can firmly instill behavioral constraints. Experiments show that a Qwen3-1.7B model fine-tuned (QLoRA) on 500 samples achieves constraint adherence (97.2%) and robustness (93.0%) surpassing best-prompted Claude Sonnet 5 or GPT-5.6-Luna (89.0%/66.7%). The dataset is released under Apache-2.0 license and is suitable for research in behavioral tuning, Socratic tutoring, and synthetic data distillation for text generation tasks.
Socratic-Only SFT 数据集概述
基本信息
- 数据集名称:Socratic-Only SFT
- 许可证:Apache 2.0
- 语言:英语
- 任务类型:文本生成
- 数据规模:1,000 到 10,000 条(约 1K–10K)
核心目标
该数据集包含多轮辅导对话,每条对话都强制执行一个明确的行为约束:助手输出的每一句话都必须以问号结尾,且不得直接或间接透露用户问题的答案(包括以问句形式嵌入答案、或给出过于具体(唯一指向答案)的提示)。约束需被模型内化到权重中,不依赖系统提示词。
数据构成
- 训练集(默认配置):包含 2,000 条完整训练对话
- 阶梯配置:包含 125 / 250 / 500 / 1000 / 2000 条嵌套子集,用于数据效率实验
- 测试集:100 条独立对话,用于训练期间的评估损失
- 评估场景配置:120 条行为评估场景,与训练主题不重叠;另有一份 80 条场景的冻结评估集将在最终评分后发布
数据格式
-
对话配置:采用聊天消息格式,无系统提示词 json {"id": "...", "category": "...", "topic": "...", "messages": [{"role": "user", "content": "..."}, {"role": "assistant", "content": "..."}]}
-
评估场景配置:包含脚本化的用户轮次和机器可校验的答案键(如
expected_answers、answer_summary等字段)
数据生成与质量控制
- 生成教师模型:Claude Haiku 4.5 代理波(生成)与 Claude Sonnet 代理(修复)
- 用户角色被设计为对抗性(如持续要求直接告诉答案、情感诉求、对约束本身进行元攻击等)
- 每条助手输出都经过严格评判:确定性句法检查 + 字面泄漏匹配 + 语义泄漏评判(温度 0)
- 不合格回合最多修复 3 次,否则整条对话被丢弃
- 类别分布:30% 操作类、20% 事实类、15% 情感类、15% 元攻击、10% 数学、10% 闲聊
使用效果
- 基于 Qwen3-1.7B 使用 QLoRA 进行微调,仅需 500 条对话即可达到 97.2% 的规范遵循率和 93.0% 的鲁棒性,优于使用最佳提示的前沿模型组合(88.9% / 66.7%)
- 数据效率结论:行为约束在约 250 条对话时锁定,并在约 500 条对话时饱和
- 提供了 5 个不同规模的微调适配器权重
使用示例
python from datasets import load_dataset
train = load_dataset("rubanikov/socratic-only-sft", split="train") rung = load_dataset("rubanikov/socratic-only-sft", "ladder", split="train_500") evals = load_dataset("rubanikov/socratic-only-sft", "eval_scenarios", split="eval_dev")





