Salesforce Prompt Builder: Field Generation Prompt Template

What is a Prompt?

A prompt is a set of detailed instructions designed to guide a Large Language Model (LLM) in generating relevant and high-quality output. Just like chefs fine-tune their recipes through testing and adjustments, prompt design involves iterating on instructions to ensure that the LLM delivers accurate, actionable results.

Effective prompt design involves “grounding” your prompts with specific data, such as business context, product details, and customer information. By tailoring prompts to your particular needs, you help the LLM provide responses that align with your business goals.

Like a well-crafted recipe, an effective prompt consists of both ingredients and instructions that work together to produce optimal results.

A great prompt offers clear directions to the LLM, ensuring it generates output that meets your expectations. But what does an ideal prompt template look like? Here’s a breakdown:

  • Who is involved, and how are they related? (Participants, relationships, data)
  • What are you trying to accomplish? (Goal, instructions)
  • What is the context? (Setting, tone & style, language)
  • What are the constraints? (Limits, instructions)

What is a Field Generation Prompt Template?

The Field Generation Prompt Template is a tool that integrates AI-powered workflows directly into fields within Lightning record pages. This template allows users to populate fields with summaries or descriptions generated by an LLM, streamlining interactions and enhancing productivity during customer conversations.

Let’s explore how to set up a Field Generation Prompt Template by using an example: generating a summary of case comments to help customer service agents efficiently review a case.


Steps to Create a Field Generation Prompt Template

1. Create a New Rich Text Field on the Case Object

  • Create a new Rich Text Field titled “Case Summary” on the Case object.

2. Enable Einstein Setup

  • Navigate to Setup → Search and select Einstein Setup → Activate Einstein.

3. Create a Prompt Template with the Field Generation Template Type

  • Go to Setup → Search and select Prompt Builder → Click New Prompt Template.

4. Configure the Prompt Template Workspace

  • In the Prompt Template Workspace, add detailed prompt instructions and merge fields such as case comments and other relevant fields from the Resource field.
  • Select the appropriate LLM and activate the prompt.

Optional: You can also use Flow or Apex to incorporate additional merge fields.

5. Preview the LLM’s Response

Example Prompt:

Scenario:
You are a customer service representative at a company called ENForce.com, and you need a quick summary of a case’s comments.

Record Merge Fields:

  • Case Comments: {!$RelatedList.CaseComments.Records}
  • Contact Name: {!$Input.Contact.Name}
  • Case Subject: {!$Input.Subject}

Instructions:

vbnetCopy codeFollow these instructions precisely. Do not add information not provided.  
- Refer to the "contact" as "client" in the summary.  
- Use clear, concise, and straightforward language in the active voice with a friendly, informal, and informative tone.  
- Include an introductory sentence and closing sentence, along with several bullet points.  
- Use a variety of emojis as bullet points to make the list more engaging.  
- Limit the summary to no more than seven sentences.  
- Do not include any reference to missing values or incomplete data.

6. Add the “Case Summary” Field to the Lightning Record Page

  • Add the Case Summary field to the Lightning Record Page, select the prompt from the Prompt Template dropdown, and save.

7. Generate the Summary

  • Edit the Case Summary field and click the Einstein button next to the field to open a popup with the LLM’s response based on the case comments.
  • Click Use to populate the field with the generated summary.

By following these steps, you can leverage Salesforce’s Prompt Builder to enhance case management processes and improve the efficiency of customer service interactions through AI-assisted summaries.

Related Posts
Salesforce OEM AppExchange
Salesforce OEM AppExchange

Expanding its reach beyond CRM, Salesforce.com has launched a new service called AppExchange OEM Edition, aimed at non-CRM service providers. Read more

The Salesforce Story
The Salesforce Story

In Marc Benioff's own words How did salesforce.com grow from a start up in a rented apartment into the world's Read more

Salesforce Jigsaw
Salesforce Jigsaw

Salesforce.com, a prominent figure in cloud computing, has finalized a deal to acquire Jigsaw, a wiki-style business contact database, for Read more

Health Cloud Brings Healthcare Transformation
Health Cloud Brings Healthcare Transformation

Following swiftly after last week's successful launch of Financial Services Cloud, Salesforce has announced the second installment in its series Read more

author avatar
get-admin