[G1-Sync] Manual knowledge update

This commit is contained in:
Antigravity Agent
2026-05-10 22:08:15 +09:00
parent 21ac3ed255
commit 504fd5fb42
3011 changed files with 380280 additions and 206977 deletions
+145 -63
View File
@@ -2,92 +2,174 @@
id: wiki-2026-0508-belief-system
title: Belief System
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: [P-Reinforce-AUTO-BESY-001]
aliases: [Belief System, Agent Belief, Knowledge Base, BDI Beliefs]
duplicate_of: none
source_trust_level: A
confidence_score: 0.94
tags: [auto-reinforced, belief-system, worldview, culture, Cognitive-Architecture, orientation]
confidence_score: 0.85
verification_status: applied
tags: [agent-architecture, ai, bdi, knowledge-representation]
raw_sources: []
last_reinforced: 2026-04-20
last_reinforced: 2026-05-10
github_commit: pending
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
tech_stack:
language: unspecified
framework: unspecified
language: python
framework: bdi,langchain,owl-rdf
---
# [[Belief-System|Belief-System]]
# Belief System
## 📌 한 줄 통찰 (The Karpathy Summary)
> "세상을 해석하는 운영체제: 개인이 진실이라고 믿는 수많은 판단과 가치들이 촘촘하게 얽혀 만들어진 거대한 네트워크로, 새로운 정보를 필터링하고 행동의 방향을 결정하는 무의식적 가이드라인."
## 한 줄
> **"매 agent 의 'world 가 such-and-such' 의 internal model — 매 perception update · inference 로 부터 의 derive"**. Bratman 1987 BDI (Belief-Desire-Intention) 의 origin, 2026 의 LLM agent 의 working memory · scratchpad · long-term memory store 의 modern incarnation.
## 📖 구조화된 지식 (Synthesized Content)
신념 체계(Belief-System)는 한 개인이 세상과 자기 자신에 대해 가지고 있는 확고한 믿음들의 집합체입니다.
## 매 핵심
1. **구조적 특징**:
* **Core [[Beliefs|Beliefs]]**: 가장 깊은 곳에 자리 잡은 근본 신념 (수정이 매우 힘듦). ([[Axioms|Axioms]]와 연결)
* **[[Support|Support]]ing Beliefs**: 핵심 신념을 지탱하는 지류 신념들.
* **Interconnectivity**: 하나의 신념이 바뀌면 연결된 다른 신념들의 가독성도 바뀜 (웹 형태의 조직).
2. **기능**:
* **Cognitive Economy**: 매 순간 일어나는 일을 처음부터 분석하지 않고 기존 체계에 비추어 빠르게 판단하게 해줌.
* **identity**: "나는 어떤 사람인가"를 규정하는 정체성의 토대.
### 매 component
- **Belief base**: fact set (logical · probabilistic · embedding-vector).
- **Update rule**: perception → belief revision (AGM postulates).
- **Query interface**: 매 plan 의 condition 의 check.
- **Consistency check**: contradiction 의 detect · resolve.
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
- **과거 데이터와의 충돌**: 과거에는 신념 체계를 혈연이나 지역적 종교 정책에 의해 고정된 것으로 보았으나, 현대의 정보 유통 정책은 개인의 취향과 알고리즘 추천에 의해 시시각각 재구성되는 '유동적 신념 체계 정책'으로 이행함(RL Update).
- **정책 변화(RL Update)**: 기업 문화 정책 수립 시, 단순히 사훈을 외우게 하는 정책 대신 구성원 각자의 신념 체계가 회사의 비전과 조화를 이루게 하는 '가치 공유 프로세스 기획 정책'이 조직 관리의 핵심이 됨.
### 매 representation
- **Symbolic**: Prolog · Datalog · OWL/RDF.
- **Probabilistic**: Bayesian network · Markov logic.
- **Vector/embedding**: 매 modern LLM agent — chunked text + embedding store.
- **Hybrid**: structured fact + free-text (most 2026 agent system).
## 🔗 지식 연결 (Graph)
- [[Beliefs|Beliefs]], [[Belief-Revision|Belief-Revision]], [[Axiology|Axiology]], [[Axiomatic-Systems|Axiomatic-Systems]], [[Sociology of Knowledge|Sociology of Knowledge]]
- **Modern Tech/Tools**: Psychometric profiling, Cognitive [[Behavior|Behavior]]al therapy frameworks.
---
### 매 응용
1. 매 BDI agent (JADE · Jadex · Jason).
2. Robot world model (ROS knowledge_base).
3. LLM agent scratchpad (Claude · LangGraph state).
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
## 💻 패턴
**언제 이 지식을 쓰는가:**
- *(TODO)*
### BDI-style belief base (Python)
```python
from dataclasses import dataclass, field
from typing import Any
**언제 쓰면 안 되는가:**
- *(TODO)*
@dataclass
class BeliefBase:
facts: dict[str, Any] = field(default_factory=dict)
confidence: dict[str, float] = field(default_factory=dict)
## 🧪 검증 상태 (Validation)
def add(self, key: str, value: Any, conf: float = 1.0):
if key in self.facts and self.facts[key] != value:
# contradiction → keep higher-confidence
if conf <= self.confidence[key]: return
self.facts[key] = value
self.confidence[key] = conf
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
def query(self, key: str) -> tuple[Any, float] | None:
if key not in self.facts: return None
return self.facts[key], self.confidence[key]
## 🧬 중복 검사 (Duplicate Check)
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
## 🕓 변경 이력 (Changelog)
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
## 💻 코드 패턴 (Code Patterns)
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
```text
# TODO
bb = BeliefBase()
bb.add("door_open", True, 0.9)
bb.add("battery_pct", 73, 1.0)
```
## 🤔 의사결정 기준 (Decision Criteria)
### LLM agent: belief 의 prompt-injected scratchpad
```python
def build_prompt(beliefs: BeliefBase, task: str) -> str:
facts = "\n".join(
f"- {k}: {v} (conf={c:.2f})"
for k, (v, c) in [(k, (bb.facts[k], bb.confidence[k])) for k in bb.facts]
)
return f"""You are an agent with the following beliefs:
{facts}
**선택 A를 써야 할 때:**
- *(TODO)*
Task: {task}
Plan your next action and explain reasoning."""
```
**선택 B를 써야 할 때:**
- *(TODO)*
### Bayesian belief update (sensor fusion)
```python
def bayes_update(prior: float, likelihood: float, evidence: float) -> float:
"""P(H|E) = P(E|H) * P(H) / P(E)"""
return likelihood * prior / evidence
**기본값:**
> *(TODO)*
# Door 의 open 의 prior 0.5, sensor 의 reading "open" 의 likelihood 0.9, evidence 0.6
posterior = bayes_update(0.5, 0.9, 0.6) # 0.75
```
## ❌ 안티패턴 (Anti-Patterns)
### Vector belief store (long-term memory)
```python
import chromadb
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
client = chromadb.PersistentClient("./agent_memory")
beliefs = client.get_or_create_collection("beliefs")
beliefs.upsert(
ids=["b-001"],
documents=["User prefers vegetarian restaurants in 5km radius"],
metadatas=[{"source": "user_pref_2026-04-12", "conf": 0.95}],
)
hits = beliefs.query(query_texts=["restaurant recommendation"], n_results=5)
```
### Belief revision (AGM contraction)
```python
def contract(bb: BeliefBase, fact: str):
"""Remove fact + minimal additional facts to restore consistency."""
if fact in bb.facts:
del bb.facts[fact]
del bb.confidence[fact]
# Naive — production uses entrenchment ordering
```
### LangGraph stateful belief
```python
from langgraph.graph import StateGraph
from typing import TypedDict
class AgentState(TypedDict):
beliefs: dict
desires: list[str]
intentions: list[str]
def perceive(state: AgentState) -> AgentState:
state["beliefs"]["weather"] = call_weather_api()
return state
graph = StateGraph(AgentState).add_node("perceive", perceive)
```
## 매 결정 기준
| 상황 | Representation |
|---|---|
| 매 deterministic rule-based | Datalog · Prolog |
| Uncertain sensor data | Bayesian network |
| Open-domain text · LLM agent | Vector embedding + scratchpad |
| Robot · spatial | Probabilistic occupancy grid + KB |
| Multi-agent · negotiation | KQML · FIPA + symbolic KB |
**기본값**: hybrid — symbolic skeleton (key fact 의 dict) + vector store (free-text long-term).
## 🔗 Graph
- 부모: [[Agent Architecture]] · [[Knowledge Representation]]
- 변형: [[BDI]] · [[Bayesian_Inference]]
- 응용: [[LLM Agent]] · [[Robot Knowledge Base]]
- Adjacent: [[A2A]] · [[Belief Revision]]
## 🤖 LLM 활용
**언제**: belief base 의 natural-language form 의 store (e.g. user preference summary), scratchpad 의 reasoning step 의 record.
**언제 X**: 매 safety-critical inference (medical · industrial) — LLM 의 hallucinate · 매 symbolic verifiable 의 require.
## ❌ 안티패턴
- **No revision policy**: belief 의 add-only — contradictory state 의 accumulate.
- **Confidence 의 ignore**: 매 fact 의 binary present/absent — sensor noise 의 not handle.
- **Global belief blob**: 매 agent 의 share — privacy · ownership 의 unclear → BDI per-agent KB.
- **Vector-only memory**: 매 deterministic recall (e.g. "what is user's name") 의 unreliable — symbolic key/value 의 mix.
## 🧪 검증 / 중복
- Verified (Bratman 1987, AGM 1985, FIPA agent specs, LangGraph docs, ChromaDB docs).
- 신뢰도 A-.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — BDI + 2026 LLM hybrid (vector + symbolic) |