You are here:
Review, Revise, and Repeat: Ensure That a Prompt Template Is Effective
Generative AI uses LLMs to generate output. Because LLMs are trained by other organizations, it’s common to first receive an LLM response that isn’t quite right, even if the prompt seems clear. If the output doesn’t meet your expectations, you can generate a new output by revising your prompt template. The generated output from the previous attempt isn’t saved, and the new output replaces it. With Prompt Builder, it’s easy to edit your prompt template until you’re completely satisfied with a response.
- Add a New Input to an Existing Prompt Template
Add a new object, free text input, or data model object to an existing prompt template. - Add a New Action to a Prompt Template
Add a new action such as Flow, Apex, or Retriever to a prompt template. - Use Prompt Templates as Actions
Add a prompt template as an action within another prompt template to reuse logic and standardize how responses are generated. Invoke one prompt template from another to build more consistent, modular prompt workflows. - Configure an Action in a Prompt Template
Modify existing actions in Prompt Builder like Flows, Apex or, Retrievers and add them directly to your prompt. - Revise a Prompt Template
Perfecting a prompt template is an iterative process. You revise the prompt template, regenerate a resolved prompt and response, and then make further revisions based on that updated response. Every time you run a prompt template in Prompt Builder, you create a unique call to the LLM. That means that resolving the same prompt can produce different responses. Remember to review every response for accuracy, even if you’ve run the template before. - Preview a Resolved Prompt
In the Resolved Prompt section of your workspace, you can review a prompt that’s grounded with real Salesforce record data. - Preview a Generated Response
In the Response section of your workspace, you can review a response that’s grounded with real Salesforce record data. - Configure the Generated Response Format
Select JSON or HTML to control the format of generated responses. - Enabling Resolution to Review a Prompt Template
When you enable resolution, you can review the resolved prompt that’s generated from your prompt template. Through a process called prompt resolution, Prompt Builder replaces each merge field in the prompt template with real CRM data related to the records that you selected. - Evaluate the Quality of a Response
When you preview a generated response, evaluate how well the response meets the goals of the prompt. Make sure that the response is factually accurate and doesn’t contain harmful content or bias. - Evaluate Prompts with Performance Insights
Analyze model generation metrics and related insights directly in Prompt Builder to understand performance, token usage, and masked data when testing your prompt templates. - Harmful Content Notification in a Prompt Response
Learn how Prompt Builder alerts you to potentially harmful content in a prompt template response. - Work with Large Prompts
When a prompt is too large for the model to use, a summary is generated automatically in the Resolution panel using OpenAI models . You can decide to use the summarized prompt or create a smaller prompt.

