Files
2nd/10_Wiki/Topics/Computer_Science_and_Theory/Knowledge-Structure.md
T
2026-05-10 22:08:15 +09:00

4.5 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-knowledge-structure Knowledge Structure 10_Wiki/Topics verified self
Knowledge Organization
Information Structure
none A 0.85 applied
knowledge
structure
organization
information-architecture
2026-05-10 pending
language framework
python networkx, llamaindex

Knowledge Structure

매 한 줄

"매 raw text → organized hierarchy". Knowledge Structure 는 information 을 hierarchies, taxonomies, networks, frames 로 organizing 하는 paradigm 의 study. 2026 LLM era 에서는 retrieval-augmented systems 의 indexing strategy 와 agent memory architecture 의 backbone.

매 핵심

매 Structures

  • Hierarchy / Taxonomy: tree (subClass, partOf)
  • Network / Graph: arbitrary relations (KG)
  • Faceted classification: orthogonal dimensions (Ranganathan)
  • Frames / Schemata: slots + fillers (Minsky)
  • Folksonomy: tag-based emergent

매 Properties

  • Granularity: atomic facts vs documents
  • Reasoning depth: lookup → multi-hop → analogical
  • Update frequency: static → real-time
  • Source provenance: trust chain

매 응용

  1. Wiki 의 backlinks + categories (Roam-style).
  2. RAG indexing (chunks + metadata).
  3. Agent long-term memory (MemGPT, LangMem).
  4. Personal Knowledge Management (Zettelkasten).

💻 패턴

Hierarchical taxonomy

from anytree import Node, RenderTree

ai = Node("AI")
ml = Node("ML", parent=ai)
dl = Node("DL", parent=ml)
llm = Node("LLM", parent=dl)
opus = Node("Claude Opus 4.7", parent=llm)

for pre, _, node in RenderTree(ai):
    print(f"{pre}{node.name}")

Faceted indexing

class FacetedIndex:
    def __init__(self):
        self.facets = {}  # facet_name → {value → set(doc_ids)}
    def add(self, doc_id, facets):
        for k, v in facets.items():
            self.facets.setdefault(k, {}).setdefault(v, set()).add(doc_id)
    def query(self, **constraints):
        sets = [self.facets[k][v] for k, v in constraints.items()]
        return set.intersection(*sets) if sets else set()

idx = FacetedIndex()
idx.add("doc1", {"topic":"ML", "year":"2026", "lang":"en"})
idx.query(topic="ML", year="2026")

Zettelkasten-style atomic notes

import re, hashlib
def make_zettel(title, body, tags, links):
    zid = hashlib.md5(title.encode()).hexdigest()[:8]
    return {
        "id": zid, "title": title, "body": body,
        "tags": tags, "links": links,
        "wikilinks": re.findall(r"\[\[([^\]]+)\]\]", body),
    }

Hierarchical RAG indexing (LlamaIndex)

from llama_index.core import VectorStoreIndex, Document
from llama_index.core.node_parser import HierarchicalNodeParser

parser = HierarchicalNodeParser.from_defaults(
    chunk_sizes=[2048, 512, 128]
)
nodes = parser.get_nodes_from_documents(docs)
index = VectorStoreIndex(nodes)

Frame-based knowledge

restaurant_frame = {
    "name": None,
    "cuisine": None,
    "location": {"city": None, "address": None},
    "menu": [],          # list of dish frames
    "reviews": [],
}

매 결정 기준

Use case Structure
stable domain Taxonomy
rich relations Graph (KG)
multiple dims Faceted
stereotyped events Frames
user-generated Folksonomy
LLM RAG Hierarchical chunks + metadata

기본값: Hierarchy + tags + wikilinks (hybrid).

🔗 Graph

🤖 LLM 활용

언제: agent memory design, RAG indexing strategy, large doc collection 정리. 언제 X: 매 single-doc Q&A — 매 over-engineering.

안티패턴

  • Premature taxonomy: domain 도 모르고 hierarchy 먼저 design → constant restructuring.
  • Single structure forced fit: 매 problem 이 graph 인데 tree 로 강제.
  • No update mechanism: 매 evolving knowledge 에 frozen schema.
  • Tags 없는 hierarchy: orthogonal facet 표현 불가.

🧪 검증 / 중복

  • Verified (Ranganathan 1933 colon classification, Minsky 1974 frames, Sowa 2000 KR textbook).
  • 신뢰도 A-.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — taxonomy/graph/facet/frame structures, RAG indexing