top of page
Writer's pictureImplementology io

Salesforce Spring’24 Key Component of Prompt Builder



A Prompt is a set of Questions or instructions that tell a Large Language Model (LLM) so you can create Relevant content. These prompts can help salesforce professionals to automate their tasks and save time. In this blog, we’ll focus on Salesforce Prompt Builder, a groundbreaking generative AI tool admins can use to activate prompts in the flow of work to augment business tasks.


Let’s start with learning some terms that can help to dive into Salesforce Prompt Builder:


Prompt: It is a set of detailed instructions that you give an LLM. A relevant prompt provides specific contextual information, data, instructions, and constraints that help the model generate accurate and personalized output.


Response: the output that an LLM generates. The more context and background you provide the LLM with your use case, the better quality response you receive back.


Grounding: Grounding is an essential step in leveraging an LLM effectively. It involves furnishing the model with specific domain knowledge and context relevant to your use case, such as CRM data. This contextual input enables the model to generate responses that are tailored to your needs, avoiding generic or irrelevant details.


Hallucination: Hallucination is a potential pitfall in utilizing an LLM. It occurs when the model produces responses that appear plausible but lack accuracy or factual basis. This often arises due to the inability of the model to access real-time or factual data.


Key components of Prompt Builder:


1. Grounding the Data:


Admins using Prompt Builder will be able to dynamically ground prompt templates with Salesforce or Data Cloud data. This connection enables the LLM to understand the context, allowing it to generate personalized responses using your current and precise information.

In Salesforce Spring ’24, Prompt Builder has a few different types of resources that can be used for grounding data:


A. Merge Fields:

Merge fields establish connections between prompt templates and Salesforce object fields. The availability of merge fields depends on the prompt template type and associated objects.


B. Flows:

Admins can enhance prompt templates' utility by leveraging flows, going beyond record merge fields. For instance, admins can ground prompts with data related to other records (e.g., Related Lists) for which the prompt is created, such as retrieving details of cases or opportunities related to an Account. A new flow type, Template-Triggered Prompt Flow, will enable admins to construct such flows, similar to existing flows, with the exception of writing back the grounded data to a designated element called Create Prompt Instructions. Flows can source data from two origins:


Salesforce: Admins can reference standard and custom objects within their Salesforce org.

Data Cloud: By referencing Data Cloud data, admins can access real-time information consolidated across multiple data sources.


C. Apex:

Apex can be utilized in Prompt Builder to retrieve data from a Salesforce Object Query Language (SOQL) query or an external application programming interface (API). It is particularly effective for real-time data retrieval from external systems when Data Cloud implementation is unavailable. Additionally, Apex can facilitate well-formatted JSON generation or programmatic data filtering. For example, Apex grounding might be necessary to obtain real-time data from an external system without Data Cloud implementation.



2. Prompt Templates:


In Spring '24, Prompt Builder offers three types of prompt templates:

Sales Email Prompt: Allows admins to automate email creation for users with Sales email permissions.


  • Sales Email Prompt: Allows admins to automate email creation for users with Sales email permissions.

  • Field Generation Prompt: This enables users to populate a field with a summary generated by an LLM.


  • Flex Prompt: Customizable templates for integrating records from multiple objects.



Admins can add grounding to prompt instructions using the Resource dropdown.


3. Testing and refining prompt template


Testing and refining prompt templates in Prompt Builder is essential to ensure responses meet your criteria and objectives. Here's how admins can effectively test responses from an LLM using data from their organization:



1. Review generated responses to assess if they meet set objectives and stakeholder expectations. Consider dimensions such as:


  • Goal completion: Does the response fulfill the prompt's objectives comprehensively?

  • Style and tone: Is the response's style, voice, and tone suitable, with correct vocabulary and punctuation?

  • Toxicity: Is the response free from potentially harmful content, such as offensive or disrespectful language?

  • Relevance: Does the response fit the context and align with the surrounding conversation or content?

  • Consistency: How consistent is the response across different generations and data contexts?

  • Bias: Does the response demonstrate fairness and inclusivity, avoiding assumptions or perpetuating biases?

  • Factual accuracy: Is the response grounded in accurate data, presenting complete and precise information without errors?


2. Refine prompt templates iteratively by adjusting the template, generating a resolved response, and refining further based on the updated response. Each execution triggers a distinct request to the LLM, potentially resulting in varied responses for the same prompt.


3. Verify the accuracy of each response, even if the template has been previously executed. It's advisable to build and test in a Sandbox environment to mitigate potential risks before deploying across the organization.


To edit a prompt template, modify the text directly within the Prompt Template Workspace and regenerate the response by selecting Save & Preview.


4. Deploying prompts


Deploying prompts to Salesforce users as an admin involves several steps to ensure smooth integration and usability. Here's how you can deploy custom prompts:


Sales Email Prompt Templates:

  • Make these templates available on Lead, Contact, or Person Account Lightning record pages.

  • Activate the Einstein for Sales feature in Setup.

  • Assign the Einstein Sales Emails permission set to users requiring this capability.

  • When users access the Email Composer on a Lightning record page, they should find the custom prompt template under the Custom section.


Field Generation Prompt Templates:


  • If not done already, migrate existing Lightning record pages onto Dynamic Forms.


  • Edit the Lightning record page and click into the field where the prompt will be initiated.

  • In the Einstein Generative AI section of the right-side panel, select the prompt template that was aligned to this field.

  • Save and Activate the Lightning record page.



  • Now when users access this field in their flow of work, they can click into the sparkle icon and launch Einstein.



  • Within the Einstein modal, review the drafted responses coming back from the LLM.



  • To add the drafted response to the field, click the Use button. Alternatively, if the user is unsatisfied with the initial response, they can use natural language to converse back with Einstein to have the response regenerated.



  • Save the record.


By following these steps, admins can effectively deploy custom prompts to Salesforce users, enhancing productivity and efficiency in their workflows.


In conclusion, Salesforce's Prompt Builder in Spring '24 is a game-changer for task automation. Powered by generative AI and guided by prompts, it delivers personalized responses. Grounding data, creating prompt templates, testing, refining, and deploying prompts are key components. With this tool, users can streamline workflows efficiently, driving business success. Implementology Salesforce Admin on Demand service offers flexible support for your sporadic needs. Whether your regular admin is transitioning, you're navigating a special event, or you need occasional help with Salesforce tasks, we're here to fill the gap. Book a 30-minute free consultation now!



27 views0 comments

Comments


bottom of page