Skip to content

RAG (Retrieval-Augmented Generation)

Retrieval-augmented generation (RAG) is an architecture pattern that connects a large language model to external knowledge sources—documents, databases, APIs—so its responses draw on real, current information rather than relying solely on what it memorized during training. The model retrieves relevant context at query time, then generates an answer grounded in that evidence. RAG is one way enterprises make general-purpose AI useful for their specific business, though the approach is not without its limitations and has been surpassed by simpler read/write/grep tools in many instances.

Related terms:

  • Token

    In large language models, a token is the basic unit of text—usually chunks of three to four characters—that the model reads and generates.

  • RLHF

    Reinforcement Learning from Human Feedback (RLHF) trains a reward model on human preference comparisons and uses reinforcement learning to align language...

  • Generative Engine Optimization

    Generative engine optimization (GEO) is the practice of structuring content so AI systems—such as ChatGPT, Perplexity, Google AI Overviews, and Bing...

RAG (Retrieval-Augmented Generation) | Alephic