9148c358d0
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
5.7 KiB
5.7 KiB
id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
| id | title | category | status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | verification_status | tags | raw_sources | last_reinforced | github_commit | tech_stack | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| wiki-2026-0508-description-logics | Description Logics | 10_Wiki/Topics | verified | self |
|
none | A | 0.92 | applied |
|
2026-05-10 | pending |
|
Description Logics
매 한 줄
"매 decidable fragment of first-order logic". 매 Description Logics (DL) 은 concept (class), role (property), individual 을 formal language 로 표현하여 ontology reasoning 의 mathematical foundation. 매 OWL 2 (Web Ontology Language) 는 SROIQ(D) DL 의 syntactic dialect — 매 2026 의 Knowledge Graph + LLM grounding 의 backbone.
매 핵심
매 DL family (expressivity)
- AL (Attributive Language): atomic concept, conjunction, universal restriction.
- ALC: AL + full negation. 매 baseline.
- ALCN: ALC + cardinality.
- SHIQ: + role hierarchy, inverse role, qualified cardinality.
- SROIQ: SHIQ + role chain, self-restriction, nominal — OWL 2 DL 의 base.
매 reasoning task
- Subsumption: C ⊑ D (concept inclusion).
- Consistency: ontology 의 모순 검증.
- Instance check: a ∈ C.
- Classification: 전체 concept hierarchy 의 compute.
- Realization: 매 individual 의 most-specific class.
매 응용
- Biomedical ontology (SNOMED CT, GO) — drug-disease reasoning.
- Knowledge graph 의 schema validation (Wikidata, Schema.org).
- LLM grounding — RAG 의 ontology-constrained retrieval.
- Configuration management — feature compatibility reasoning.
💻 패턴
패턴 1: ALC concept 정의 (Owlready2)
from owlready2 import *
onto = get_ontology("http://example.org/family.owl")
with onto:
class Person(Thing): pass
class Parent(Person): pass
class hasChild(Person >> Person): pass
class Mother(Parent):
equivalent_to = [Parent & ~onto.search(is_a=onto.Male)[0]]
# ALC: Mother ≡ Parent ⊓ ¬Male
패턴 2: SROIQ role chain (grandparent)
with onto:
class hasGrandchild(Person >> Person):
# role chain: hasChild ∘ hasChild ⊑ hasGrandchild
property_chain = [[hasChild, hasChild]]
패턴 3: Reasoner 실행 (HermiT)
from owlready2 import sync_reasoner_hermit
with onto:
sync_reasoner_hermit(infer_property_values=True)
# inferred axioms inspect
for cls in onto.classes():
print(cls, "⊑", cls.is_a)
패턴 4: Tableau algorithm (mini ALC)
def alc_satisfiable(concept, world=None):
"""Naive tableau for ALC C ⊓ ¬C unsatisfiability check."""
world = world or {"individuals": {}, "constraints": []}
if concept[0] == "AND":
for sub in concept[1:]:
if not alc_satisfiable(sub, world):
return False
return True
if concept[0] == "NOT":
atom = concept[1]
if ("ATOM", atom) in world["constraints"]:
return False # clash
world["constraints"].append(("NOT_ATOM", atom))
return True
if concept[0] == "ATOM":
if ("NOT_ATOM", concept[1]) in world["constraints"]:
return False
world["constraints"].append(("ATOM", concept[1]))
return True
# ∃R.C, ∀R.C handled by spawning fresh individual ...
패턴 5: SPARQL over OWL inference
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX : <http://example.org/family#>
SELECT ?gp ?gc WHERE {
?gp :hasGrandchild ?gc . # inferred via property_chain
}
패턴 6: LLM-grounded ontology query
import anthropic
from owlready2 import get_ontology
client = anthropic.Anthropic()
onto = get_ontology("./family.owl").load()
def grounded_answer(question: str) -> str:
classes = [c.name for c in onto.classes()]
response = client.messages.create(
model="claude-opus-4-7-20260301",
max_tokens=512,
system=f"Use only these ontology classes: {classes}. Answer with class names.",
messages=[{"role": "user", "content": question}]
)
return response.content[0].text
매 결정 기준
| 상황 | Approach |
|---|---|
| Web ontology / Linked Data | OWL 2 DL (SROIQ) + Protégé |
| Lightweight inference | OWL 2 EL (medical) or RL (rule-based) |
| Real-time reasoning | RDFS + custom rules (avoid full DL) |
| Research / proof-of-concept | ALC + custom tableau |
| Fact-heavy KG (Wikidata) | SHACL validation > full DL reasoning |
| LLM grounding | EL/RL profile + SPARQL |
기본값: OWL 2 EL (tractable PTIME) + HermiT/ELK reasoner.
🔗 Graph
- 부모: Logic · Knowledge Representation
- Adjacent: Knowledge-Graphs
🤖 LLM 활용
언제: ontology design review, axiom suggestion, SPARQL 생성, RAG 의 ontology-grounded prompt. 언제 X: 매 reasoning soundness 의 결정 — DL reasoner (HermiT, ELK) 의 영역. LLM 은 hint only.
❌ 안티패턴
- Open-world misunderstanding: 매 absent fact 가 false 라 가정 — DL 은 OWA (open world).
- Unique Name Assumption 가정: 매 individual a ≠ b 자동 아님 —
differentFrom명시 필요. - Undecidable extension: 매 SROIQ 의 추가 expressivity (full datatype reasoning) → 결정불가.
- Reasoner 없이 inference: 매 axiom 만 작성 + 매 reasoner 미실행 → no inferred triples.
🧪 검증 / 중복
- Verified (Baader et al. "DL Handbook", W3C OWL 2 spec, Owlready2 docs).
- 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — substantive content + 2026 stack (Owlready2, HermiT, LLM grounding) |