What it is
RAG works by pulling relevant information from your own data sources — documents, knowledge bases, CRM records — right before the AI formulates its response. Instead of relying solely on what it learned during training, the AI searches your content first, then builds its answer from what it finds. Think of it as giving the AI a open-book exam rather than asking it to recall everything from memory.
Why it matters
LLMs have knowledge cutoffs and can hallucinate. RAG grounds them in your actual data - knowledge bases, documents, CRM records - so responses are accurate and current. It's how Agentforce knows about YOUR customers, not just generic information.
How it works
- User asks question
- System searches your data for relevant info
- Relevant info + question sent to LLM
- LLM generates informed response
How it connects
In Salesforce, RAG is the engine behind Agentforce agents that surface relevant case history, product documentation, or account details mid-conversation — pulling from Data Cloud, Knowledge, or external sources you've connected.
Good to know
RAG is only as good as the data behind it — if your knowledge base is outdated or your CRM records are messy, the AI will confidently repeat that mess back to your customers.
Related terms
Data 360 (formerly Data Cloud)
Salesforce's real-time data platform that unifies customer data from any source into a single customer profile. Rebranded from Data Cloud at Dreamforce 2025.
LLM (Large Language Model)
The AI technology behind ChatGPT, Claude, and the intelligence in Agentforce. Trained on massive amounts of text to understand and generate human language.
AI Agent
An autonomous AI system that can perceive its environment, make decisions, and take actions to achieve specific goals - without constant human direction.
