2026-08-20-difficult-advice-grok-716
收藏资源简介:
该数据集是一个合成监督微调(SFT)语料库,专注于“困难建议”(difficult-advice)任务,旨在训练语言模型在复杂、敏感或潜在危险的场景中提供符合伦理和安全的回复。它基于“Teaching Claude Why”方法,但将整个生成器堆栈从 Anthropic 的基线模型替换为 xAI 的 Grok 模型。数据集通过多阶段流水线构建:x-ai/grok-4.3 用于生成场景和提示,x-ai/grok-4.6 用于生成草稿回复,并根据完整的宪法重写提示和回复,同时执行评审和去重。最终数据集包含 620 个样本,来自 716 个场景预算,经过质量和长度过滤后保留。数据格式为 JSONL,提供多个中间阶段快照,每个样本包含文本字段。该数据集适用于语言模型的对齐训练、安全微调以及困难建议生成任务,标签包括 training-data、kind:synth、pipeline:difficult-advice、constitution:claude_distilled_12_principles_mid 等。
This dataset is a synthetic supervised fine-tuning (SFT) corpus focusing on the "difficult-advice" task, designed to train language models to provide ethical and safe responses in complex, sensitive, or potentially dangerous scenarios. It is based on the "Teaching Claude Why" approach but replaces the entire generator stack from Anthropics baseline model (difficult_advice.yaml) with xAIs Grok model. The dataset is built through a multi-stage pipeline: x-ai/grok-4.3 is used to generate scenarios and prompts (stages 2/3), x-ai/grok-4.6 is used to generate draft responses (stage 5), and prompts and responses are rewritten according to a full constitution (stages 4/6), with reviews and deduplication performed. The final dataset contains 620 samples from a budget of 716 scenarios, retained after quality and length filtering. The data format is JSONL, with multiple intermediate stage snapshots (e.g., stage_1_chunk_constitution.jsonl to stage_8_export_sft.jsonl), each sample containing a text field. This dataset is suitable for alignment training, safety fine-tuning, and difficult-advice generation tasks for language models, with tags including training-data, kind:synth, pipeline:difficult-advice, constitution:claude_distilled_12_principles_mid, etc.
数据集详情总结
数据集概述
本数据集是一个名为“Difficult-advice SFT corpus, all-grok arm”的合成训练语料库,采用“Teaching Claude Why”训练配方,将原始基线(difficult_advice.yaml,基于Anthropic模型)中的生成器栈整体替换为xAI模型,以对比行为差异。数据集共包含620行数据(数据集名称中的716为场景预算,与基线保持一致)。
生成流程与技术细节
- 配置结构:包含主配置(dataset)及多个阶段配置(stage_1至stage_8),以JSONL格式存储各阶段快照,并附有manifest.json文件记录完整运行配置、采样设置及各阶段的token使用情况。
- 模型分工:场景与提示词生成(阶段2/3)及分类任务由x-ai/grok-4.3承担;草稿响应生成(阶段5)、提示词与响应改写(阶段4/6,即对齐决策步骤)以及语料评估由x-ai/grok-4.6完成。
- 生成配置:grok-4.3隐藏推理关闭(匹配基线的非思考型Haiku);grok-4.6无法关闭隐藏推理(接口禁止),以低推理力度运行并增加max_tokens余量。所有调用通过OpenRouter路由。
关键数据发现与决策
- 生成器长度问题:xAI模型生成的困难建议回复明显短于Haiku 4.5,且更常引用规则。首次运行中,42.2%(302/716)的回复未达到700字符的最低长度要求。
- 问题定位与修复:提高隐藏推理力度会使情况恶化(单次通过率:推理关闭31%,低力度0%,高力度19%);重试失败与提示词相关,独立性假设低估失败约3倍(实测23.3%的行三次尝试全部失败,独立性预测仅为8.1%);降低长度下限无效(从500降至300,失败率仍稳定在6.7%左右,因剩余行失败源于禁用词汇或缺失标签)。最终解决方案是增加重试次数(5次)并采用不可修复提示词更少的grok-4.6模型,而非放宽合同要求。
- 最终产出:在基线未修改的合同下(min_chars 700和全部13个ban_patterns不变,提示词完全一致),产率为86.6%:草稿响应从716降至668,修订响应从668降至620,各阶段约损失7%的长度要求,损失会叠加。失败行仅略低于标准(有一个仅差5个字符,695/700)。该损失作为产率损耗被吸收(max_fail_pct 15.0),未降低下限,因此每一行都严格达到基线的标准,语料库可逐行比较。
数据集的独特背景
此数据集的创建源于全Gemini分支无法干净生成的问题:Gemini的安全层持续阻止最困难的原则4(伤害,涉及CBRN/网络相关)草稿提示词调用——即使在BLOCK_NONE设置下,26/716个场景在3.7-flash上零次成功通过六个重采样。而xAI未提供请求端安全旋钮且无需此功能:在2026-08-20的测试中,使用本仓库自身的提示词对宪法原则4进行90次调用,零次被阻止——grok-4.3在模型编写的原则4场景上返回了24/24个可用草稿提示词,对手写生物安全/化学/网络/核/制药/航空场景,grok-4.3和grok-4.6均返回了18/18个草稿提示词和6/6个完整草稿响应。
其他信息
- 生成日期:20260824_130926
- 宪法文件:constitutions/claude_distilled_12_principles_mid/constitution.md
- 来源仓库:https://github.com/Matthew-Bozoukov/Lessons_from_constituitional_AFT.git @ 734fbece81d6d382412dcdb3b50d841a87ed8798
- 构建命令:uv run scripts/data/synth/build_dataset.py --config configs/data/synth/difficult_advice_grok_716.yaml
- 标签:training-data、kind:synth、pipeline:difficult-advice、constitution:claude_distilled_12_principles_mid、backfilled-2026-08-25




