Skip to main content

Use RAG to Bring Unstructured Data to Agentforce

Learning Objectives

After completing this unit, you’ll be able to:

  • Define retrieval augmented generation (RAG).
  • Explain how RAG grounds LLM responses in trusted, up-to-date data.
  • Describe the benefits of using RAG for accuracy, transparency, and trust.

Enhance AI Responses with RAG

Retrieval augmented generation (RAG) is a framework that makes generative AI more accurate and trustworthy. It works by retrieving the most relevant customer or enterprise data from trusted sources and adding that context into the large language model (LLM) before generating a response.

With RAG, you get:

  • Greater accuracy and relevance: AI responses are grounded in real data, which reduces the chance of incorrect answers.
  • Up-to-date information: The AI can access the latest data without retraining large models.
  • Trust and transparency: Citations show where the information came from, so users can verify responses.

How RAG Works

RAG follows three steps.

  1. Retrieval: The system searches unstructured knowledge that Data Cloud processed to find the most relevant data for the user’s query.
  2. Augmentation: The retrieved data is added to the LLM prompt, giving the model more context.

Generation: The prompt, now enriched with customer data, is sent to the LLM to produce an accurate, contextual, and trustworthy response.

Northern Trail Outfitters: Apply RAG

Northern Trail Outfitters (NTO) is a retail company that sells outdoor gear, apparel, and equipment. NTO sales reps use Agentforce frequently while working on sales opportunities to quickly access customer insights and performance data.

For example, an NTO sales rep asks Agentforce, “What is my customer’s Q2 revenue for Product X in North America?”

Behind the scenes, RAG searches the customer’s financial PDF reports and finds the answer: $12.4 million in Q2 revenue, an 8% increase over Q1. This trusted data is added into the large language model prompt so the AI has the exact figures and context it needs.

The model then responds with: “In Q2, Product X generated $12.4 million in revenue in North America, reflecting an 8% growth from Q1.”

With RAG, the sales rep gets a response that is accurate, grounded in real customer data, and immediately useful in the flow of work.

Fine-Tune RAG

You can customize how much and what kind of content to include by adjusting retriever settings such as search criteria and result limits to fine-tune what gets pulled in.

RAG runtime flow: LLM prompt augmented with relevant information to instruct LLM response generation.

Learn more in the Retrieval Augmented Generation: Quick Look module.

In this unit, you explored how retrieval augmented generation builds on processed and indexed data to deliver fact-based, verifiable responses. With RAG, Agentforce and other AI applications can provide users with answers they can trust, grounded in the right data at the right time. Together, these resources will help you put knowledge-powered, AI-enhanced data strategies into action.

Take the next step by exploring how to use unified data to create meaningful audience groups. Next up, learn how to build and refine queries using the Data Cloud: Query and Segment module to target the right customers and drive personalized engagement.

Resources

Condividi il tuo feedback su Trailhead dalla Guida di Salesforce.

Conoscere la tua esperienza su Trailhead è importante per noi. Ora puoi accedere al modulo per l'invio di feedback in qualsiasi momento dal sito della Guida di Salesforce.

Scopri di più Continua a condividere il tuo feedback