reason
하는 일
이 스킬은 Semantica 지식 그래프의 사실에 논리 추론을 적용해 결론을 내리거나 설명을 제안합니다. 사용자가 정의한 규칙으로 그래프가 추론하기를 원하는 사람을 위한 스킬입니다.
사용하는 경우
- ✓사실과 규칙이 있고, 그래프가 결론을 찾아내기를 원할 때.
- ✓관찰이 있고 그에 대한 가능한 설명이 필요할 때.
- ✓주장한 내용이 알려진 사실에서 따라 나오는지 확인하고 싶을 때.
스킬 링크
https://github.com/semantica-agi/semantica/blob/main/plugins/skills/reason/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“우리 공급업체에 대한 이 사실들과 이 규칙이 주어졌을 때, 입찰할 수 없는 공급업체가 어디인지 알아낼 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 사실과 규칙을 추론 엔진에 넣고 결론을 도출합니다. 각 결론과 그것을 만든 규칙을 함께 보고합니다. 진술을 증명해 보거나, 관찰을 설명할 가설을 만들 수도 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
/semantica:reason
Apply reasoning over the knowledge graph. Usage: /semantica:reason <mode> [args]
$ARGUMENTS = reasoning mode + rules/observations/query.
deductive [--facts '<json-list>'] [--rules '<rule1>|<rule2>']
Apply deductive rules to known facts to derive new conclusions.
from semantica.reasoning.deductive_reasoner import DeductiveReasoner, Premise
reasoner = DeductiveReasoner()
# Add base facts to working memory
# Facts can be strings like "Person(John)" or structured dicts
import json
facts = json.loads(facts_json) if facts_json else []
reasoner.add_facts(facts)
# Apply logic with explicit premises
# Premise objects have: statement, confidence, source
premises = [
Premise(statement=fact, confidence=1.0)
for fact in facts
]
conclusions = reasoner.apply_logic(premises=premises)
Return: | Conclusion | Triggering Premises | Confidence | Rule Applied |
If zero rules given, run reasoner.prove_theorem() on any provided theorem:
proof = reasoner.prove_theorem(theorem=theorem_text)
Output: Proof: <proof.steps> | Valid: YES / NO
prove <theorem> [--facts '<json-list>']
Prove or disprove a theorem against known facts.
from semantica.reasoning.deductive_reasoner import DeductiveReasoner
reasoner = DeductiveReasoner()
import json
reasoner.add_facts(json.loads(facts_json) if facts_json else [])
proof = reasoner.prove_theorem(theorem=theorem)
Output:
Theorem: "<theorem>"
Result: PROVED ✓ | DISPROVED ✗ | UNDECIDABLE ⚠
Proof steps:
1. <premise> — <justification>
2. ...
→ QED: <theorem>
Confidence: <proof.confidence>
abductive <observation> [--knowledge '<json-list>'] [--top N]
Generate and rank hypotheses that explain an observation.
from semantica.reasoning.abductive_reasoner import (
AbductiveReasoner, Observation
)
reasoner = AbductiveReasoner()
import json
if knowledge_json:
reasoner.add_knowledge(json.loads(knowledge_json))
obs = Observation(description=observation)
# Generate all hypotheses then rank them
hypotheses = reasoner.generate_hypotheses(observations=[obs])
ranked = reasoner.rank_hypotheses(hypotheses)
best = reasoner.get_best_explanation(obs)
# Also get full explanations with evidence
explanations = reasoner.find_explanations(observations=[obs])
Output:
Abductive Reasoning for: "<observation>"
Best explanation:
<best.description> (confidence: 0.87)
All hypotheses (ranked):
| Rank | Hypothesis | Confidence | Supporting Evidence |
| 1 | <hyp> | 0.87 | <evidence> |
| 2 | ...
Full explanations:
Explanation 1: <explanation.summary>
Evidence: <evidence items>
datalog <program>
Evaluate a Datalog program over graph facts.
from semantica.reasoning.datalog_reasoner import DatalogReasoner
from semantica.context import ContextGraph
graph = ContextGraph()
reasoner = DatalogReasoner()
# program is a string of Datalog rules and queries
results = reasoner.evaluate(program=program, graph=graph)
Return derived tuples as a relation table. Show rule derivation counts.
sparql <query>
Run a SPARQL query over the knowledge graph and return results.
from semantica.reasoning.sparql_reasoner import SPARQLReasoner
from semantica.context import ContextGraph
graph = ContextGraph()
reasoner = SPARQLReasoner()
results = reasoner.query(sparql_query=query, graph=graph)
Return as a Markdown table with bound variable columns matching the SELECT clause.
rete [--rules '<rule1>|<rule2>'] [--facts '<json-list>']
Incremental rule evaluation using the Rete network with working memory.
from semantica.reasoning.rete_engine import ReteEngine
import json
engine = ReteEngine()
rules = rules_str.split("|") if rules_str else []
facts = json.loads(facts_json) if facts_json else []
engine.load_rules(rules)
engine.process_facts(facts)
activations = engine.get_activations()
Return: | Rule Fired | Variable Bindings | Working Memory Delta | Activation Order |
hypotheses "<scenario>" [--knowledge '<json-list>'] [--top N]
Generate the top-N most probable explanations for a complex scenario.
from semantica.reasoning.abductive_reasoner import AbductiveReasoner, Observation
import json
reasoner = AbductiveReasoner()
if knowledge_json:
reasoner.add_knowledge(json.loads(knowledge_json))
obs = Observation(description=scenario)
hypotheses
자주 묻는 질문
가추 추론이란 무엇인가요?
관찰에서 가장 가능성 높은 설명으로 거슬러 올라가는 추론입니다.
진술을 증명할 수 있나요?
네. 알려진 사실에 대해 정리를 검사하고, 증명이 성립하는지 보고할 수 있습니다.
어떤 규칙 방식을 지원하나요?
Datalog 프로그램, SPARQL 쿼리, Rete 네트워크 평가 등 여러 방식을 지원합니다.
상세 정보
작성자의 원본 설명
Run reasoning over the Semantica knowledge graph — deductive logic, abductive hypothesis generation, Datalog programs, SPARQL queries, Rete network evaluation. Uses DeductiveReasoner, AbductiveReasoner, DatalogReasoner, SPARQLReasoner, ReteEngine. Sub-commands: deductive, abductive, datalog, sparql, rete, prove, hypotheses.
repo: semantica-agi/semantica
인기도
- GitHub 스타
- 14k
- 순위
- #11155
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
semantica
14k에이전트가 지식 그래프를 만들고 추론하며, 출처, 온톨로지, 정책, 내보내기까지 다루는 Semantica 도구 모음을 쓰도록 돕습니다.
causal
14k에이전트가 지식 그래프에서 원인과 결과의 연결을 추적하도록 돕습니다. 원인의 사슬, 가정 질문, 영향력 점수를 다룹니다.
change
14k에이전트가 지식 그래프의 과거 모습과, 두 날짜 또는 두 온톨로지 버전 사이에 무엇이 바뀌었는지 보여 주도록 돕습니다.
decision
14k에이전트가 지식 그래프에서 결정을 처음 메모부터 결과까지 기록하고, 검색하고, 설명하고, 검토하도록 돕습니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.