Prompt Engineering Flashcards
What are the four prompt template types?
- Sales Email: Help draft personalized emails based on record data.
- Field Generation: Connect AI workflows to custom fields within records.
- Record Summary: Create rich-text summaries based on record data.
- Flex: Generate content for other business purposes with custom resources.
An Agentforce Specialist wants to ensure a prompt template dynamically generates personalized summaries of open cases for each account, using the most current data available in Salesforce. The prompt template must access and incorporate real-time account and case data.
Which grounding technique should the specialist use?
A. Ground with Apex Merge Fields
B. Ground with Flow Merge Fields
C. Ground with Record Merge Fields
B. Ground with Flow Merge Fields
Correct. Flow Merge Fields allow you to incorporate complex logic and real-time data into the prompt template.
What is a key benefit of grounding prompt templates with CRM data in Prompt Builder?
A. It scores content on toxicity to prevent unintended or harmful outputs by the LLM.
B. It provides the large language model (LLM) with context to create personalized responses.
C. It automatically updates Salesforce records based on AI-generated responses.
B. It provides the large language model (LLM) with context to create personalized responses.
A company’s marketing team wants to create a Flex prompt template that generates personalized event invitations based on the contact’s interests and previous interactions with the company.
How should the team ensure that the prompt template generates personalized invitations for each contact?
A. Include instructions in the prompt template to use the contact’s name and interests when generating an invitation.
B. Manually input each contact’s details into the prompt template before generating an invitation.
C. Integrate the template with dynamic CRM data fields for automatic customization.
A. Include instructions in the prompt template to use the contact’s name and interests when generating an invitation.
What are the four key questions to consider when designing a prompt template?
The four key questions are:
- Who is involved, and how are they related? Define participants and their relationships using data.
- What are you trying to accomplish? Specify the goal and provide clear instructions.
- What is the context? Describe the setting, tone, style, and language of the output.
- What are the constraints? Set limits on length and ensure responses avoid unsupported guesses.
How can Salesforce CRM data be integrated into prompt templates?
Salesforce CRM data can be integrated into prompt templates using merge fields that link record-specific information (e.g., customer names, product details). Additionally, Flow Builder can add dynamic logic to prompts, enabling complex data-driven customization for more tailored outputs.
What are the key components of an effective prompt? (3)
Ingredients: Specific data relevant to the request.
Instructions: Clear directions for the LLM to follow.
Details or Constraints: Limits, style guidelines, and other specifications to customize the response.
How can Apex be used to enhance prompt templates in Prompt Builder?
Apex can be used to incorporate logic and external data into prompt templates. For example, an Apex class can query Salesforce records or external APIs, filter data programmatically, and return structured information like JSON. This allows templates to dynamically include relevant details, such as event information tailored to specific contacts.
What is a Prompt Template Manager permission set?
Permission that must be assigned in order to allow a user to create a prompt template in Prompt Builder.
What is a Prompt Resolution?
Replaces each merge field in the prompt template with CRM data to help refine AI prompts.