
关于
从会话中的 AI 模型或通过 Ollama 的本地开源模型中提取结构化领域知识,无需 API 密钥
name: bdistill-knowledge-extraction description: "从会话中的 AI 模型或通过 Ollama 从本地开源模型中提取结构化领域知识。无需 API 密钥。" category: ai-research risk: safe source: community date_added: "2026-03-20" author: FrancyJGLisboa tags: [ai, knowledge-extraction, domain-specific, data-moat, mcp, reference-data] tools: [claude, cursor, codex, copilot]
知识提取
从任何 AI 模型中提取结构化、质量评分的领域知识 — 从闭源模型的会话中提取(无需 API 密钥),或通过 Ollama 从本地开源模型中提取。
概述
bdistill 将你的 AI 订阅会话转化为不断积累的知识库。代理回答有针对性的领域问题,bdistill 对响应进行结构化和质量评分,输出累积成可搜索、可导出的参考数据集。
对抗模式会挑战代理的声明 — 强制要求证据、更正和承认局限性 — 产生经过验证的知识条目。
何时使用此技能
- 当你需要任何领域(医学、法律、金融、网络安全)的结构化参考数据时使用
- 当构建查找表、问答数据集或研究语料库时使用
- 当为传统 ML 模型(回归、分类 — 不是竞争性 LLM)生成训练数据时使用
- 当你想要跨模型比较领域知识时使用
工作原理
步骤 1:安装
pip install bdistill
claude mcp add bdistill -- bdistill-mcp # Claude Code
步骤 2:在会话中提取知识
/distill medical cardiology # Preset domain
/distill --custom kubernetes docker helm # Custom terms
/distill --adversarial medical # With adversarial validation
步骤 3:搜索、导出、积累
bdistill kb list # Show all domains
bdistill kb search "atrial fibrillation" # Keyword search
bdistill kb export -d medical -f csv # Export as spreadsheet
bdistill kb export -d medical -f markdown # Readable knowledge document
输出格式
结构化参考 JSONL — 不是训练数据:
{
"question": "What causes myocardial infarction?",
"answer": "Myocardial infarction results from acute coronary artery occlusion...",
"domain": "medical",
"category": "cardiology",
"tags": ["mechanistic", "evidence-based"],
"quality_score": 0.73,
"confidence": 1.08,
"validated": true,
"source_model": "Claude Sonnet 4"
}
表格式 ML 数据生成
为传统 ML 模型生成结构化训练数据:
/schema sepsis | hr:float, bp:float, temp:float, wbc:float | risk:category[low,moderate,high,critical]
导出为可直接用于 pandas/sklearn 的 CSV。每行追踪 source_model 用于跨模型分析。
本地模型提取 (Ollama)
用于本地运行的开源模型:
# Install Ollama from https://ollama.com
ollama serve
ollama pull qwen3:4b
bdistill extract --domain medical --model qwen3:4b
安全与安全性说明
- 会话内提取使用你现有的订阅 — 无需额外 API 密钥
- 本地提取完全在你的机器上通过 Ollama 运行
- 不会向外部服务发送数据
- 输出是参考数据,不是 LLM 训练格式
相关技能
@bdistill-behavioral-xray- 透视模型的行为模式
限制
- 仅在任务明确匹配上述描述的范围时使用此技能。
- 不要将输出视为特定环境验证、测试或专家审查的替代品。
- 如果缺少必要的输入、权限、安全边界或成功标准,请停下来寻求澄清。
兼容工具
Claude CodeCursor
标签
AI与机器学习