What is Retrieval-Augmented Generation (RAG)?
Last updated:
Last updated:
Retrieval-augmented generation (RAG) is an AI pattern that retrieves relevant information from external data sources before a language model generates an answer. In commerce, RAG can ground assistants in product, policy, order, support, and account-specific data.
A RAG workflow separates knowledge retrieval from answer generation. When a user asks a question, the system searches an approved knowledge source, selects relevant passages or records, and includes that context in the model request. The language model then generates an answer grounded in the retrieved material instead of relying only on what it learned during training.
In ecommerce, RAG can ground an assistant in:
• Product specifications, compatibility information, manuals, and catalog content.
• Shipping, return, warranty, and support policies that change more often than model training data.
• Customer or account information when access controls allow personalized answers.
• Internal operational knowledge used by service agents or sales representatives.
RAG reduces hallucination but does not guarantee correctness. Retrieval can return the wrong passage, stale content can still be authoritative to the model, and access controls must prevent one customer’s data from entering another user’s context. Strong implementations evaluate retrieval quality separately from answer quality and keep transactional decisions such as price, stock, and order state tied to live APIs rather than static documents.
Example: A support assistant can retrieve the latest warranty policy and the exact product manual before answering a customer, instead of relying on an older policy that may have been present in model training data.