RAG Alternative Approaches
Methods for working with large document collections that go beyond traditional Retrieval-Augmented Generation patterns. Most notably exemplified by andrej-karpathy's llm-wiki-pattern, which creates persistent, pre-synthesized knowledge structures rather than retrieving raw chunks at query time.
Traditional RAG Limitations
Rediscovery Problem: RAG systems retrieve relevant chunks and generate answers from scratch on every query. No knowledge accumulates—subtle questions requiring synthesis across multiple documents must reconstruct understanding each time.
Fragment-Based Understanding: Working with retrieved chunks rather than integrated knowledge, limiting the ability to develop sophisticated cross-source synthesis.
Stateless Operation: Each query starts fresh with no building upon previous insights or discoveries.
Pre-Synthesis Approach
The llm-wiki-pattern represents a fundamental alternative where:
Knowledge Integration: Instead of retrieving fragments, LLMs incrementally build and maintain structured knowledge representations that integrate information across sources.
Persistent Artifacts: Cross-references, contradictions, and syntheses are identified once and maintained rather than rediscovered on each query.
Compounding Intelligence: Good questions and discoveries get filed back into the knowledge base, creating compounding-artifacts that become smarter over time.
Architectural Differences
Traditional RAG
Sources → Embedding → Vector DB → Retrieval → LLM Generation
Wiki Pattern Alternative
Sources → LLM Integration → Persistent Wiki → Query → Pre-Synthesized Answers
Key Advantages
Deep Synthesis: Can develop sophisticated understanding that builds across multiple sources and interactions.
Context Preservation: Maintains full context of how understanding developed rather than working with isolated fragments.
Knowledge Evolution: The system gets smarter over time rather than remaining static.
Rich Cross-Referencing: Connections between concepts are discovered and maintained automatically.
Implementation Patterns
Incremental Integration
New sources update existing entity pages, revise concept summaries, and note contradictions rather than simply being added to a retrieval corpus.
Pre-Compiled Knowledge
Answers draw from knowledge that has already been synthesized and cross-referenced rather than being generated from raw retrieval.
Active Maintenance
Systems actively identify gaps, contradictions, and opportunities for deeper synthesis rather than passively serving queries.
Use Cases
Particularly effective for:
- Long-term research projects requiring deep synthesis
- Personal knowledge development over months/years
- Complex domains where understanding evolves with exposure
- Business intelligence requiring integrated analysis
- Any context where knowledge should compound rather than remain fragmented
Trade-offs
Computational Investment: Requires upfront processing to build integrated knowledge structures rather than simple indexing.
Maintenance Complexity: Systems must actively maintain consistency and handle contradictions rather than serving static retrievals.
Domain Specificity: Requires careful schema design and workflow definition for specific knowledge domains.
Future Directions
The success of wiki-pattern approaches suggests broader possibilities for AI systems that build persistent, evolving knowledge representations rather than operating in stateless fashion.