Monday, 25 November 2024

Key Concepts of Prompt Builder

Hi,

The following key concepts and vocabulary are used throughout Prompt Builder.

Prompts

Generative language models are versatile and can create different types of responses. To produce a response, tell the LLM what you want in the form of a prompt. Prompts determine the quality and relevance of the LLM’s response, so it’s important to craft prompts that the model can understand and use.

Prompt Design

Prompt design is the process of creating prompts that improve the quality and accuracy of the model’s responses. Many models expect a certain prompt structure, so it’s important to test and iterate them on the model you’re using. After you understand what structure works best for a model, you can optimize your prompts for the given use case. To scale the prompt design process, create reusable prompts called prompt templates.

Prompt Templates

Behind the scenes, Einstein generative AI uses prompt templates. Prompt templates are reusable, detailed prompts that you can create and manage in Prompt Builder. These templates are use case-driven and include the information that helps the LLM generate a high-quality response, such as a goal, constraints, and brand guidelines. And to make sure that the prompts you send to the LLM are grounded in the most up-to-date data, prompt templates include placeholders for information that changes, such as customer names, contact information, and product prices.

Grounding

To help ensure high-quality responses, ground the prompt in data that’s relevant to your request. Einstein generative AI features use your Salesforce data to add context and personalization to your prompts. The LLM uses the grounding data along with the original, generic data that it was trained on. Without grounding, a model’s response can contain generic or irrelevant details. In Prompt Builder, you can easily ground prompts using merge fields that reference record fields, flows, Apex, and more.

The Einstein Trust layer masks sensitive data from the LLM by sending placeholder text instead. To see the placeholder text, look at the prompt resolution. In the response, you can see the demasked data added back in by Salesforce. You can see a summary of all masked data for the response in the Data Masking Details dialog.


Prompt Template Type

Prompt template types help you to create a prompt template for your particular use case. For example, a Sales Email prompt template helps your sales team to draft personalized emails for a contact or a lead.

Prompt Instructions

Prompt instructions are natural language instructions in a prompt template. Instructions describe a task for the LLM, such as “Write a description no longer than 500 characters.” Add instructions to a prompt template, and then relevant CRM data replaces the template’s placeholders. The prompt template is now a grounded prompt and sent to the LLM.

Reference: 








No comments:

Post a Comment

Key Concepts of Prompt Builder

Hi, The following key concepts and vocabulary are used throughout Prompt Builder. Prompts Generative language models are versatile and can c...