Memory Retrieval Patterns vs Wiki Query
Setup
This page compares the Memory Retrieval Patterns pipeline from the agent-memory ecosystem with this vault’s wiki query approach. Both are hybrid retrieval systems that fuse multiple signals; they differ in when synthesis happens and what the persistent unit is.
The Two Approaches
| Dimension | Memory Retrieval Patterns | LLM Wiki Query |
|---|---|---|
| Persistent unit | Memory entries (embeddings + keywords) | Linked Markdown wiki pages |
| When synthesis happens | Query time — each question runs the full multi-stage pipeline | Ingest time — wiki pages are compiled ahead of queries, then extended over time |
| Retrieval pipeline | Semantic search → BM25 → RRF fusion → cross-encoder re-rank → MMR diversity | BM25 → vector search → PageRank boost → RRF fusion → typed-graph traversal |
| What compounds | The memory store (no accumulated human-readable layer) | The synthesized wiki itself — links, provenance, corrections compound over time |
| Latency | 200–500ms per query (cross-encoder + HyDE) | ~20–50ms (pre-compiled pages, no per-query LLM calls) |
| Human inspectability | Partial — retrieval traces and indices exist | Full — pages are readable Markdown files |
| Tunable parameters | Many: RRF k, MMR lambda, candidate counts, re-ranker thresholds | Fewer: BM25 weight, vector weight, PageRank decay |
| Best fit | Multi-session agents with large opaque memory stores | Personal second brain, research vault, durable knowledge base |
Where They Converge
Both reject single-method retrieval. Both use Reciprocal Rank Fusion to combine ranking signals. Both acknowledge the latency/quality trade-off as the core design tension.
The deeper convergence is on the same principle: no single retrieval method dominates across all queries, so fusing multiple signals catches what each method individually misses.
Where They Diverge
Runtime vs Compile-time
Memory Retrieval Patterns pays the retrieval cost on every query — the agent runs semantic search, BM25, re-ranking, and MMR fresh each time, because it is querying a live memory store that changes continuously.
LLM Wiki pays the cost at ingest — an agent reads sources and writes wiki pages once, then queries navigate precomputed, linked, edited, and audited Markdown. The cost is amortized across every subsequent query.
Transparency vs flexibility
Memory stores are by nature partial and continuously changing — the agent cannot present them as a stable human-readable artifact. The vault’s wiki pages are stable, inspectable, and correctable by the owner. The trade-off is flexibility: if a memory changes, the vault must re-ingest and extend the page, whereas the memory store reflects changes immediately.
Implications
For a personal second brain, the artifact-first model wins on long-term durability and auditability. The runtime pipeline wins for multi-session agents that cannot afford a human-in-the-loop at ingest time. The two are complementary: Memory Retrieval Patterns describes how to retrieve well from a live memory store; LLM Wiki describes how to make retrieval unnecessary by pre-compiling knowledge into a navigable graph.
Graph Traversal: PageRank vs Personalized PageRank
The two approaches also differ in their graph signal. The vault’s wiki query uses standard PageRank (via hybrid_query_helper.py) — a global authority score over the wikilink graph that treats all pages equally. Memory Retrieval’s related technique (HippoRAG) uses Personalized PageRank seeded by query entities, which explores graph neighborhoods relative to the question rather than measuring global importance
The contrast maps to the broader architectural difference: the vault’s graph is static and human-curated (wikilinks are written by an agent), so a global signal is stable and query-agnostic. A memory store’s graph is dynamically built by an LLM at ingest time, so a query-relative signal (Personalized PageRank) is necessary to compensate for noisier extraction.
LightRAG’s dual-level retrieval — low-level (entities/relations) and high-level (topics/themes) — adds another dimension: the vault’s compile-time model collapses this distinction by writing both entity pages and concept pages as separate wikilinks during ingest, so the query-time pipeline needs only one retrieval level
Related
- agent-memory-systems — the three families (artifact-first, memory-first, graph/retrieval-first)
- memory-retrieval-patterns — the technique itself
- query — this vault’s fusion implementation (BM25 + vector + PageRank + graph traversal)
- llm-wiki-vs-memory-and-graph-rag — broader family comparison
- lightrag — dual-level graph + vector retrieval (low-level entities + high-level topics)
- hipporag — Personalized PageRank for multi-hop retrieval
Sources
^[raw/external/github-com-20-memory-retrieval-patterns-4f3658d2.md]— Memory Retrieval Patterns README (NirDiamant/Agent_Memory_Techniques, 847 stars)^[raw/papers/hipporag-neurobiologically-inspired-long-term-memory.md]— HippoRAG: Personalized PageRank for graph-traversal retrieval^[raw/papers/lightrag-simple-and-fast-rag.md]— LightRAG: dual-level entity/topic hybrid retrieval