深思熟虑的推理引擎(DRE)
](https://www.npmjs.com/package/deliberate-reasoning-engine)   
一种模型上下文协议(MCP)服务器,将线性AI推理转换为结构化、可审计的思维图。DRE使语言模型能够将其推理过程外部化为具有语义思维类型、依赖关系和验证的有向无环图(DAG)。
🌟 特性
- 🧠 语义思维类型:将思想分类为目标、假设、假设、问题、证据、行动、综合和批评
- 🔗 基于图的依赖关系:构建具有明确关系和依赖关系的思想DAG
- 🚨 假设跟踪:通过自动级联到依赖性思维来监控和否定假设
- 📊 假设评分:追踪支持和反驳证据(即将发布)
- 💾 会话保持:保存和加载推理会话(即将推出)
- ✅ 图形验证:检测周期、矛盾和孤立的想法
- 🎯 专注推理:通过结构化问题分解使LLM保持正轨
📦 安装
作为MCP服务器
npm install -g deliberate-reasoning-engine为了发展
git clone https://github.com/haasonsaas/deliberate-reasoning-engine.git
cd deliberate-reasoning-engine
npm install
npm run build🚀 快速开始
使用Claude Desktop进行配置
添加到您的Claude Desktop配置(~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"dre": {
"command": "npx",
"args": ["deliberate-reasoning-engine"]
}
}
}或者使用本地开发版本:
{
"mcpServers": {
"dre": {
"command": "node",
"args": ["/absolute/path/to/dre/dist/index.js"]
}
}
}重新启动Claude Desktop,您将在🔧 菜单。
🛠️ 可用工具
log_thought
用语义类型和依赖关系记录一个结构化的想法。
参数:
thought(string,必填):思想的内容thought_type(枚举,必填):以下之一:
- objective:推理任务的总体目标 - hypothesis:拟议的解释或解决方案 - assumption:这条推理路线被认为是正确的 - question:需要解决的不确定点 - sub_problem:更大问题的分解 - evidence:来自工具或先验知识的数据 - action:使用工具的计划 - synthesis:从以前的想法中得出的结论 - critique:自我纠正或缺陷识别
dependencies(string\[\],可选):这取决于思想的IDconfidence(数字0-1,可选):置信水平action_request(对象,可选):要执行的工具和参数
get_thought_graph
检索当前推理图。
参数:
format(枚举,可选):"full"或"summary"(默认值:"summary")
invalidate_assumption
将一个假设标记为无效,级联到所有依赖的想法。
参数:
thought_id(string,必填):要无效的假设的IDreason(string,必填):无效说明
📖 示例用法
以下是法学硕士如何使用DRE来分析复杂的决策:
// 1. Set the objective
const objective = await use_mcp_tool("dre", "log_thought", {
thought: "Should we acquire Company X?",
thought_type: "objective"
});
// 2. Form hypotheses
const hyp1 = await use_mcp_tool("dre", "log_thought", {
thought: "Acquiring Company X will increase our market share by 20%",
thought_type: "hypothesis",
dependencies: [objective.thought_id],
confidence: 0.7
});
// 3. Identify assumptions
const assumption = await use_mcp_tool("dre", "log_thought", {
thought: "Company X's technology is compatible with our stack",
thought_type: "assumption",
dependencies: [hyp1.thought_id],
confidence: 0.8
});
// 4. Break down into sub-problems
const subproblem = await use_mcp_tool("dre", "log_thought", {
thought: "Verify technical compatibility through due diligence",
thought_type: "sub_problem",
dependencies: [assumption.thought_id]
});
// 5. If assumption proves false, invalidate it
await use_mcp_tool("dre", "invalidate_assumption", {
thought_id: assumption.thought_id,
reason: "Technical audit revealed major incompatibilities"
});
// This automatically marks the sub-problem and any dependent thoughts as stale🏗️ 建筑
DRE将推理建模为有向无环图,其中:
- 节点 是具有语义类型的思想
- 边缘 表示思想之间的依赖关系
- 状态 跟踪(活动/过时)支持动态推理更新
- 级联失效 确保推理的一致性
🤝 用例
- 战略决策:分解复杂的业务决策
- 研究规划:结构研究问题和假设
- 问题解决:将问题分解为可管理的子问题
- 风险分析:跟踪假设及其影响
- 调试:系统的根本原因分析
- 学习:对新主题的结构化探索
🔧 发展
# Install dependencies
npm install
# Build TypeScript
npm run build
# Run in development mode
npm run dev
# Run tests
npm test📝 贡献
我们欢迎捐款!请看 贡献.md 作为指导方针。
🐛 故障排除
常见问题
- 在Claude Desktop中“找不到服务器”
- 确保配置中的路径是绝对的 - 配置更改后重新启动Claude Desktop
- “找不到模块”错误
- 跑 npm install 和 npm run build - 检查你是否在使用Node.js 18+
📄 许可证
麻省理工学院-见 许可证 了解详情。
🙏 致谢
- 建立在 模型上下文协议
- 受结构化推理系统和认知架构的启发
- 感谢人为克劳德和MCP规范
______________________________________________________________________
🚦 路线图
- \[\]基于证据的假设评分
- \[\]会话持续和恢复
- \[\]图形可视化导出
- \[\]分支之间的冲突检测
- \[\]与外部推理工具集成
- \[\]多智能体推理支持
