~/wiki

RAG Alternative

Confiance : high
rag-alternativellm-wiki-patternpersistent-learningcompounding-artifactsknowledge-compilationretrieval-systemsandrej-karpathy

The llm-wiki-pattern represents a fundamental alternative to traditional Retrieval-Augmented Generation (RAG) approaches. Instead of retrieving and synthesizing from raw documents on each query, knowledge is compiled once into structured wikis and maintained persistently.

Traditional RAG Limitations

Repeated Rediscovery: RAG systems upload document collections, retrieve relevant chunks at query time, and generate answers from fragments. The LLM rediscovers knowledge from scratch on every question. No accumulation or learning occurs.

Fragment Synthesis: Complex questions requiring synthesis of multiple sources force the LLM to find and piece together relevant fragments repeatedly. Nothing is built up or persists between queries.

Shallow Integration: Sources exist in isolation. Cross-references, contradictions, and deeper synthesis must be discovered anew for each interaction.

Wiki Pattern Advantages

Knowledge Compilation: Information is processed once during ingestion, integrated into existing understanding, cross-referenced with related content, and maintained as living knowledge base.

Persistent Synthesis: Complex analysis is performed once and stored. Cross-references are pre-computed, contradictions are pre-identified, synthesis reflects everything previously ingested.

Compounding Value: Each new source strengthens the entire knowledge base rather than existing in isolation. Value grows exponentially rather than linearly.

Architectural Comparison

Approach Knowledge Storage Query Processing Maintenance Value Growth
RAG Raw documents + embeddings Retrieve fragments → synthesize None Linear
Wiki Pattern Structured, cross-referenced pages Read relevant pages → reference Automated by LLM Exponential

Implementation Trade-offs

RAG Advantages:

  • Simpler initial setup
  • No maintenance overhead
  • Works well for straightforward Q&A
  • Established tooling ecosystem

Wiki Pattern Advantages:

  • Knowledge compounds over time
  • Complex synthesis performed once
  • Rich cross-referencing and navigation
  • Handles contradictions systematically
  • Scales to deeper analysis

When to Use Each Approach

RAG Appropriate For:

  • Simple document search and retrieval
  • Static document collections
  • Minimal ongoing engagement
  • Straightforward Q&A scenarios

Wiki Pattern Appropriate For:

  • Long-term knowledge building projects
  • Research requiring synthesis across sources
  • Personal knowledge management
  • Complex domain understanding
  • Ongoing learning and exploration

Hybrid Possibilities

Complementary Usage: Wiki pattern for core knowledge base with RAG for supplementary document retrieval. Wiki handles synthesis and cross-referencing while RAG provides access to broader document collections.

Migration Path: Start with RAG for document exploration, migrate valuable synthesis to wiki format for persistent reference and further development.

Technical Requirements

Wiki Pattern Demands:

  • LLM capable of multi-document reasoning
  • File system access for wiki maintenance
  • Schema-driven workflow execution
  • Structured output generation (markdown, YAML)

Integration Complexity: Higher initial setup cost but lower ongoing maintenance burden compared to RAG systems that require continuous re-processing.

See also