docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
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 폴더 제거.
This commit is contained in:
@@ -0,0 +1,180 @@
|
||||
---
|
||||
id: wiki-2026-0508-knowledge-synthesis
|
||||
title: Knowledge Synthesis
|
||||
category: 10_Wiki/Topics
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [지식 종합, Synthesis, Information Integration]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [research, knowledge, synthesis, methodology, llm]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: python
|
||||
framework: rag
|
||||
---
|
||||
|
||||
# Knowledge Synthesis
|
||||
|
||||
## 매 한 줄
|
||||
> **"매 synthesis = 차이의 통합"**. 여러 source 의 fragmented knowledge 를 단일 coherent representation 으로 통합하는 process. 2026 LLM 시대에 RAG + structured extraction + cross-document reasoning 이 표준 toolchain.
|
||||
|
||||
## 매 핵심
|
||||
|
||||
### 매 5-step pipeline
|
||||
1. **Acquisition**: search / scrape / corpus collection.
|
||||
2. **Extraction**: structured fact / claim 추출.
|
||||
3. **Alignment**: same entity / concept matching across sources.
|
||||
4. **Integration**: conflict resolution + gap filling.
|
||||
5. **Presentation**: report / map / model.
|
||||
|
||||
### 매 synthesis types
|
||||
- **Aggregative**: meta-analysis, systematic review.
|
||||
- **Interpretive**: thematic synthesis, narrative review.
|
||||
- **Generative**: 새 framework / theory 제시.
|
||||
|
||||
### 매 응용
|
||||
1. Systematic literature review.
|
||||
2. Competitive intelligence.
|
||||
3. Wiki / knowledge graph build-out.
|
||||
4. Investigation reporting.
|
||||
|
||||
## 💻 패턴
|
||||
|
||||
### RAG synthesis pipeline
|
||||
```python
|
||||
from anthropic import Anthropic
|
||||
import chromadb
|
||||
|
||||
client = Anthropic()
|
||||
db = chromadb.Client().create_collection("docs")
|
||||
|
||||
def synthesize(question: str, k=8):
|
||||
docs = db.query(query_texts=[question], n_results=k)["documents"][0]
|
||||
context = "\n---\n".join(docs)
|
||||
return client.messages.create(
|
||||
model="claude-opus-4-7",
|
||||
max_tokens=4096,
|
||||
system="Synthesize the sources. Cite [N]. Note conflicts.",
|
||||
messages=[{"role": "user", "content": f"Q: {question}\nSources:\n{context}"}],
|
||||
).content[0].text
|
||||
```
|
||||
|
||||
### Structured extraction
|
||||
```python
|
||||
from pydantic import BaseModel
|
||||
|
||||
class Claim(BaseModel):
|
||||
statement: str
|
||||
source: str
|
||||
confidence: float
|
||||
contradicts: list[str] = []
|
||||
|
||||
def extract_claims(text: str, source: str) -> list[Claim]:
|
||||
resp = client.messages.create(
|
||||
model="claude-opus-4-7",
|
||||
max_tokens=2048,
|
||||
system="Extract atomic claims as JSON list of {statement, confidence}.",
|
||||
messages=[{"role": "user", "content": text}],
|
||||
)
|
||||
return [Claim(source=source, **c) for c in json.loads(resp.content[0].text)]
|
||||
```
|
||||
|
||||
### Entity alignment
|
||||
```python
|
||||
from sentence_transformers import SentenceTransformer
|
||||
import numpy as np
|
||||
|
||||
model = SentenceTransformer("all-MiniLM-L6-v2")
|
||||
|
||||
def align(entities_a, entities_b, threshold=0.85):
|
||||
emb_a = model.encode(entities_a)
|
||||
emb_b = model.encode(entities_b)
|
||||
sim = emb_a @ emb_b.T / (np.linalg.norm(emb_a, axis=1)[:, None] *
|
||||
np.linalg.norm(emb_b, axis=1)[None, :])
|
||||
pairs = []
|
||||
for i, j in zip(*np.where(sim > threshold)):
|
||||
pairs.append((entities_a[i], entities_b[j], sim[i, j]))
|
||||
return pairs
|
||||
```
|
||||
|
||||
### Conflict detection
|
||||
```python
|
||||
def detect_conflicts(claims: list[Claim]) -> list[tuple]:
|
||||
pairs = []
|
||||
for i, c1 in enumerate(claims):
|
||||
for c2 in claims[i+1:]:
|
||||
resp = client.messages.create(
|
||||
model="claude-haiku-4-5",
|
||||
max_tokens=10,
|
||||
messages=[{"role": "user",
|
||||
"content": f"Contradict?\nA: {c1.statement}\nB: {c2.statement}\nYes/No"}],
|
||||
)
|
||||
if "yes" in resp.content[0].text.lower():
|
||||
pairs.append((c1, c2))
|
||||
return pairs
|
||||
```
|
||||
|
||||
### Hierarchical summarization
|
||||
```python
|
||||
def hier_summarize(docs: list[str], chunk=4) -> str:
|
||||
if len(docs) <= 1:
|
||||
return docs[0] if docs else ""
|
||||
summaries = []
|
||||
for i in range(0, len(docs), chunk):
|
||||
merged = "\n".join(docs[i:i+chunk])
|
||||
s = spawn_summarize(merged)
|
||||
summaries.append(s)
|
||||
return hier_summarize(summaries, chunk)
|
||||
```
|
||||
|
||||
### Citation graph build
|
||||
```python
|
||||
import networkx as nx
|
||||
|
||||
def build_graph(claims: list[Claim]) -> nx.DiGraph:
|
||||
g = nx.DiGraph()
|
||||
for c in claims:
|
||||
g.add_node(c.statement, source=c.source, conf=c.confidence)
|
||||
for contra in c.contradicts:
|
||||
g.add_edge(c.statement, contra, type="contradicts")
|
||||
return g
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| 수십 개 sources | RAG + hierarchical summarize |
|
||||
| Conflicting claims | Structured extraction + LLM judge |
|
||||
| Novel framework needed | Generative synthesis |
|
||||
| Quantitative pooling | Meta-analysis stats |
|
||||
|
||||
**기본값**: RAG + structured extraction + claim graph.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Research Methodology]] · [[Information Retrieval]]
|
||||
- 응용: [[RAG]] · [[Knowledge Graph]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: literature review, competitive analysis, contradictory source reconciliation.
|
||||
**언제 X**: domain-novel concept invention without grounding — hallucination 위험.
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Cherry-picking**: 매 confirming source 만 select.
|
||||
- **Source-blind synthesis**: citation 없이 claim 통합 → traceability 상실.
|
||||
- **Premature consensus**: conflict 무시하고 단일 narrative.
|
||||
- **Hallucinated alignment**: LLM 이 entity 임의 동일시.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (PRISMA 2020, Cochrane Handbook 6.4, Anthropic RAG cookbook).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — 5-step pipeline + RAG/extraction 패턴 |
|
||||
Reference in New Issue
Block a user