--- title: Retrieval-Augmented Generation created: 2026-05-25
Retrieval-Augmented Generation (RAG) is an AI architectural pattern where an LLM retrieves relevant document chunks from an external database (such as a vector database) at query time to ground its final generated answer. This pattern is commonly used in traditional pkm|knowledge management tools.
Patterns like the llm-wiki-pattern address these limits by incrementally compiling knowledge once and maintaining a persistent, structured, interlinked graph.