---
schema_version: "1"
id: ba73c29401eb3feb7ed10ea11db4b2dc85d43614b230d99a5698aeba9a69f24a
title: Ingredients of a Prompt Template
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/prompt_builder_template_ingredients.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.prompt_builder_template_ingredients.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 934845f520bb411a15f9c06f4661457a756d50052e5272c5abdce2c305026c3b
description: When you start to build your own prompt templates, it can feel intimidating. Like all new skills, designing great prompts requires some experimentation and practice. To guide your prompt design, it’s helpful to start with the key components of every effective prompt template. Like a good recipe, these “ingredients” work together to help large language models (LLMs) generate accurate and consistent responses.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Ingredients of a Prompt Template

When you start to build your own prompt templates, it can feel intimidating. Like all new skills, designing great prompts requires some experimentation and practice. To guide your prompt design, it’s helpful to start with the key components of every effective prompt template. Like a good recipe, these “ingredients” work together to help large language models (LLMs) generate accurate and consistent responses.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions with the Einstein for Platform, or Einstein or Agentforce for Sales or Service add-on, or Agentforce Foundations</td></tr></tbody></table>

All prompts are different. You don’t need every ingredient in every prompt template.

## Participants

Describe who’s sending and receiving the model’s response. You can use merge fields that reference record fields, flows, Apex and more when you describe the participants.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_example.png)

Example

```
You’re a <sender.JobTitle_Merge_Field> and your
name is <sender.Name_Merge_Field> and you’re from an
organization called <sender.Company_Merge_Field>. Your
prospect is <recipient.Name_Merge_Field> from the company
<recipient.Company_Merge_Field>.
```

## Setting

Give the model contextual information, such as the communication channel or type of content that the response is for. Your prompt template type determines your setting. For example, if you choose the Field Generation template type, your setting is a record field.

## Goal

Describe what you hope to achieve with the model’s response. Make sure that you consider your users’ context, preferences, and past behavior. You can add details to your goals by using merge fields.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_example.png)

Example

```
Encourage your contact to attend the <event.Subject_Merge_Field> event in <event.Location_Merge_Field>.
```

## Relationships

Describe the relationship between the participants involved. Also mention how the model’s response relates to the participants.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_example.png)

Example

```
You are a customer service agent interacting with a customer over chat for the first time.
```

## Data

Give the model relevant CRM data to work with using merge fields.

## Instructions

Tell the LLM what type of content you want and what it must include. Surround instructions in triple quote boundaries, which helps the LLM to distinguish between prompt context and instructions.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_example.png)

Example

```
Instructions:
"""
Generate an introduction email to your prospect. Indirectly encourage the prospect to respond to your email by showing that you are willing to answer any questions they may have.
"""
```

## Guidelines

To reduce the possibility of hallucinations, give the model guidelines that it must follow.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_example.png)

Example

```
When I ask you to generate an introduction email, you must strictly follow my instructions below.
```

## Language

Tell the model which language to generate the response in. For a list of supported languages, see [Supported Languages in Prompt Template Responses](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_localize_responses.htm&release=264.0.0&type=5 "A prompt template can use any language that Prompt Builder offers. Supported languages are optimized for business-appropriate phrasing and are integrated with the Einstein Trust Layer to use its data masking and toxicity scoring features.").

## Style and Tone

Give the model style and tone guidelines to follow.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_example.png)

Example

```
Use clear, concise, and straightforward language using the active voice and strictly avoiding the use of filler words and phrases and redundant language.
```

## Questions for Effective Prompts

To contextualize these ingredients, use these questions to identify the details that your prompt template requires to be effective.

- What’s the goal of the prompt template?—By declaring the goal of the response first, you can better answer all the subsequent questions.
- Who is involved?—Describe the participants who send or receive the response, the relationship between the participants, and the relationship between the participants and the response.
- What’s the context of the prompt template and the response?—Define a setting for the model response, the CRM data to ground the prompt in, and add a command that tells the model what to generate.
- What guardrails does this prompt template need to succeed?—You can add more information, such as instructions for the response’s style and tone.

An effective prompt template answers these questions so that the LLM can generate a personalized response every time. A great prompt template is also scalable so that you can reuse it across different use cases. With Prompt Builder, it’s easy to design prompt templates that achieve these goals.

#### See Also

- [Ground Prompt Templates with Salesforce Resources](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_ground_template.htm&release=264.0.0&type=5 "With Prompt Builder, you can dynamically ground prompt templates with CRM data using merge fields.")
- [Best Practices for Building Prompt Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_best_practices.htm&release=264.0.0&type=5 "Learn the best practices for building effective prompt templates.")