---
schema_version: "1"
id: 3c7f957a70f7839ef8f58671a381b7956ade5435e81b662d7273259c293dfbf9
title: Best Practices for Building Prompt Templates
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/prompt_builder_best_practices.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.prompt_builder_best_practices.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ee35f8a2eef383f9be73faa12ab47324b7e7914810c669c0c255f4b06a2982b2
description: Learn the best practices for building effective prompt templates.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Best Practices for Building Prompt Templates

Learn the best practices for building effective prompt templates.

### 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>

- Make sure that your prompt templates are concise and easy to understand. Avoid using industry jargon or technical terms. Instead, use natural language and [conversation design best practices](https://help.salesforce.com/s/articleView?id=service.bots_service_best_practice.htm&language=en_US).
- To give the LLM more contextual information, ask it to role play as a character, such as a sales or support representative. Then define the character’s goal. For example, include language such as, “You are a marketing executive who wants to invite major customers to a live event.”
- Iterate on your prompt templates. Try achieving the same goal using different templates to see how the parts impact the model’s response. Get end-user feedback to see how well your prompt templates generate the desired response.
- Choose a style, and stick to it. When you use a consistent writing style in your prompt templates, the LLM generates consistent responses. Your writing style is shaped by your word choice, intensifiers, emojis, and punctuation.
- To help the LLM differentiate between context and instructions, create an instructions section in your prompt template. On a separate line, enter Instructions:, then surround your instructions with triple quotes (""").
- Include direct instructions for the LLM to only generate the expected type of content. For example, if you want the LLM to draft an email, add instructions such as, “Follow these instructions strictly to generate only the message to be sent to the customer.” These instructions prevent the LLM from generating a response about the process of creating content, instead of just generating the content that you want.
- Start with one of the templates in the [Example Prompt Template Library](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_example_library.htm&release=264.0.0&type=5 "This library of example prompt templates gives you a starting point for creating your own custom prompt templates."), and customize it to fit your specific needs. Study the language that the templates use, especially the text related to writing style. You can use similar phrasing in your own templates.

#### See Also

- [Ingredients of a Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_template_ingredients.htm&release=264.0.0&type=5 "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.")