Loading
Upcoming Mandatory Changes to Public Key Infrastructure (PKI)Read More
Salesforce Enforces New Security Requirements in Summer 2026Read More
Agentforce and Einstein Generative AI
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Ground with Predictive AI

          Ground with Predictive AI

          Ground your prompt templates with relevant knowledge and actionable intelligence from predictive models. Augment your LLM prompts with predictions, top predictors, and prescriptions.

          Predictive AI and Prompt Templates

          Use predictive models to improve the accuracy and contextual relevance of LLM responses. Predictive models predict future business outcomes using data from current business conditions. They’re trained on past data using machine learning and statistical modeling to detect trends and patterns. To learn more, see Key Concepts for Predictive AI and Use Outputs from Predictive Models.​​

          Note
          Note You need access to the predictive model that you want to use. If you don’t already have a predictive model set up, see Create Predictive AI Models From Scratch or Bring Your Own Model.

          Get Predictive Intelligence Using Flows

          Flows can provide prompts with on-demand predictions, prescriptions, and top factors. On-demand predictions are generated dynamically within the flow of work.

          1. In Flow Builder, create a flow, add a predict action to request outputs from a predictive model, and then store the output values. To learn more, see Get Predictions in Flows.
          2. In a prompt template, use flow merge fields to embed that data in the prompt. To learn more, see Ground with Flow Merge Fields.

          Get Predictive Intelligence Using Apex

          Apex can provide prompts with on-demand predictions, prescriptions, and top factors. On-demand predictions are generated dynamically within the flow of work.

          1. In Apex, create an invocable action to request outputs from a predictive model. To learn more, see Get Predictions in Apex.
          2. In a prompt template, use Apex merge fields to embed that data in the prompt. To learn more, see Grounding with Apex Merge Fields.

          Get Predictive Intelligence Using REST

          REST applications can provide prompts with on-demand predictions, prescriptions, and top factors. On-demand predictions are generated dynamically within the flow of work. In a REST client:

          1. Request outputs from a predictive model by calling the predict endpoint in the Salesforce Data Cloud Connect REST API. To learn more, see Get Predictions in REST Applications.
          2. Provide those outputs as inputParams when calling the generations endpoint in the Connect REST API. To learn more, see Einstein Prompt Template Generations in the Connect REST API Developer Guide.

          Get Predictive Intelligence Using Data Model Objects (DMOs)

          DMOs in Data 360 can provide prompts with batch or streamed predictions, prescriptions, and top factors.

          1. Populate the DMO with outputs from a predictive model. You can do this via batch predictions (with batch data transforms or batch predict jobs) or streaming predictions (with predict jobs). To learn more, see Get Predictions with Prediction Jobs or Use Predictions to Transform Data.
          2. In a prompt template, use DMO merge fields to embed that data in the prompt. To learn more, see Ground with Data 360 DMO Merge Fields.
           
          Loading
          Salesforce Help | Article