用途:把 bdistill 知识库中的规则与上下文导出到不同下游,使 AI 工具或确定性智能体获得领域可靠性,同时支持复盘、审计和微调。
主要能力:支持 6 种格式。prompt 生成 Markdown(## Rules 采用 IF-THEN,## Context 采用问答),并按平台加头部;harness-json 输出含 metadata、rules、context 数组的 JSON;harness-python 输出 RULES 列表与 build_prompt();excel 按质量着色;checklist 输出含空状态/证据/负责人列的 CSV;training-jsonl 输出指令/输出对并按 80/20 划分训练与验证。
输入:必填 domain(知识库域名,如 aml-compliance)与 format(prompt | harness-json | harness-python | excel | checklist | training-jsonl)。可选 platform(claude-project | cursor-rules | copilot-instructions | chatgpt-custom | generic)、training_format(alpaca | sharegpt | openai)、min_quality(默认 0.7)、max_rules(默认 50)、max_context(默认 20)。
使用方式:有 MCP 时可调用 bdistill_export_prompt、bdistill_export_harness、bdistill_export_excel、bdistill_export_checklist、bdistill_training_export。独立运行时从 data/knowledge/base/{domain}.jsonl 与 data/rules/base/{domain}.jsonl 读取,按 min_quality 过滤并按置信度降序,把含 IF/THEN/WHEN/THRESHOLD 的归为规则、其余归为上下文,再按上限截断后输出。导出文件路径依格式不同,返回 path、format、entries_exported 及含 rules_count、context_count、quality_distribution 的 stats。
平台粘贴:Claude Project 贴入 Custom Instructions;Cursor 存为 .cursor/rules/{domain}.mdc;Copilot 追加到 .github/copilot-instructions.md;ChatGPT 贴入 Custom GPT Builder Instructions(8K 字符限制,导出会截断)。
限制与边界:域名无条目时报错 No entries found for domain: {domain};全部低于 min_quality 时降到 0.5 并告警;训练导出少于 50 条时提示 LoRA 微调建议 200 条以上。harness-json 可与 bdistill-operationalize 的 rules_path 组合,prompt 输出可贴入任意 AI 工具。收费、价格、平台支持范围等未在资料中提供。