causal
它能做什么
这项技能分析 Semantica 知识图谱中的因果关系,例如哪个决定导致了哪个结果。适合想了解是什么推动了某个结果、以及某项改变可能带来什么影响的人。
适用场景
- ✓当你想知道是什么导致了某个特定决定或结果的时候。
- ✓当你想看一个决定之后影响了哪些决定的时候。
- ✓当你想针对另一个行动提出假设性问题的时候。
技能链接
https://github.com/semantica-agi/semantica/blob/main/plugins/skills/causal/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我看看我们上次供应商批准决定是由什么引起的,以及它之后影响了哪些决定?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会沿图谱中的关联向上追溯原因,向下追溯结果。然后它会为某个决定对其他决定的影响力打分,并给出步骤链和摘要。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
/semantica:causal
Analyze causal relationships and infer impacts. Usage: /semantica:causal <task> [args]
$ARGUMENTS = task + optional target entity, filter, or intervention.
chain [--subject <node>] [--depth N]
Build and inspect causal chains for a subject or category.
from semantica.context.causal_analyzer import CausalChainAnalyzer
from semantica.context import AgentContext
# Option 1: Use an existing AgentContext decision backend
chain = ctx.get_causal_chain(
decision_id=decision_id,
direction="upstream",
max_depth=depth,
)
# Option 2: Use CausalChainAnalyzer directly
analyzer = CausalChainAnalyzer(graph_store=ctx.knowledge_graph)
downstream = analyzer.get_causal_chain(
decision_id=decision_id,
direction="downstream",
max_depth=depth,
)
Output: chain steps, cause strength, effect reach, and summary graph.
intervene <node> <action> [--scenario <json>]
Analyze decision impact and influenced decisions (current causal API).
analyzer = CausalChainAnalyzer(graph_store=ctx.knowledge_graph)
impact_score = analyzer.get_causal_impact_score(decision_id=decision_id)
influenced = analyzer.get_influenced_decisions(
decision_id=decision_id,
max_depth=depth,
)
Return: impact score, influenced decisions, and downstream scope.
counterfactual <fact> [--weight N]
Trace root causes and temporal causal paths.
analyzer = CausalChainAnalyzer(graph_store=ctx.knowledge_graph)
roots = analyzer.find_root_causes(decision_id=decision_id, max_depth=depth)
historical_chain = analyzer.trace_at_time(
event_id=decision_id,
at_time="2026-01-01T00:00:00Z",
direction="upstream",
max_depth=depth,
)
Output: root decision lineage and time-bounded causal context.
常见问题
什么是因果链?
它是一系列相互关联的步骤,展示一个事件如何引出下一个事件。
它能预测未来吗?
不能。它只根据图谱中已记录的关联来衡量影响力。
它能测试假设情景吗?
能。它可以探讨反事实问题,但答案取决于已存储的关联。
详情
作者的原始描述
Analyze cause-and-effect relationships in the Semantica knowledge graph — causal chains, interventions, counterfactuals, and causal influence scores.
repo: semantica-agi/semantica
热度
- GitHub 星标
- 14k
- 排名
- #11142
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …