8 patterns

Knowledge & Memory

Pull in outside or stored knowledge, decide when to fetch it, and check what comes back.

Patterns in Knowledge & Memory

Agentic RAG

Knowledge & Memory · 7 nodes · 3 LLM calls · branch · 2 scenarios

+2 variants · No single inventor

The agent decides whether to retrieve, from which source, and with what rewritten query, and repeats until it has enough context.

Corrective RAG

Knowledge & Memory · 8 nodes · 4 LLM calls · loop · branch · 2 scenarios

+2 variants · Yan et al. 2024

Grade the retrieved documents. If they're irrelevant, rewrite the query and fall back to web search before generating.

HyDE

Knowledge & Memory · 6 nodes · 2 LLM calls · parallel · 2 scenarios

Gao et al. 2022

The LLM writes a hypothetical answer passage. That passage is embedded instead of the query, and the real documents nearest to it are retrieved.

Multi-Query RAG

Knowledge & Memory · 8 nodes · 2 LLM calls · parallel · 1 scenario

+2 variants · No single inventor

Rewrite one question into several queries, retrieve for each in parallel, then fuse the ranked lists before generating.

Retrieve-and-Rerank

Knowledge & Memory · 9 nodes · 2 LLM calls · parallel · 2 scenarios

No single inventor

Cast a wide net with cheap keyword and vector search over context-prefixed chunks, then let a reranker keep only the best few.

GraphRAG

Knowledge & Memory · 10 nodes · 1 LLM call · 2 scenarios

+1 variant · Edge et al. 2024

Index a corpus as an LLM-built entity graph with pre-written community summaries, then map-reduce over those summaries to answer whole-corpus questions.

Memory Stream

Knowledge & Memory · 7 nodes · 3 LLM calls · loop · 2 scenarios

Park et al. 2023

Log every observation with an importance score, retrieve by recency, importance and relevance, and periodically write reflections back into the stream.

Hierarchical Memory

Knowledge & Memory · 6 nodes · 1 LLM call · 2 scenarios

+2 variants · Packer et al. 2023

Treat the context window like RAM. The agent uses tool calls to page facts between core, recall and archival memory.