Custom Prompt Templates
Custom prompt templates let you create your own prompt template with the flow and structure you want. The template includes fields you can use to customize the prompt for your needs. You use parameters within the template to indicate:
-
The type of data the prompt will process, such as a transcript or summary.
-
What fields the prompt creator can use to customize a new prompt profile. For example, you might want to give them the option to select the tone or length of the output.
Complete each of these tasks in the order given.
Create Custom Prompt Template
- Click the app selector
and select Admin.
-
Go to GenAI Manager > GenAI Prompt Editor.
-
Open Custom Prompts.
-
Click the plus icon
next to the Custom Prompts folder to create a new custom template. A new custom prompt folder appears at the bottom of the list.
-
On the Create Template page, you can give the custom prompt a new Name and enter a Description.
-
Enter System Instructions for the prompt. The data you enter here will be part of every prompt that's created using the template without customization options. System Instructions could include context or instructions. For instance, you could give the LLM
Large Language Model. A type of AI that processes, understands, and generates human language based on context. a role to adopt or an objective to meet.
-
Enter the prompt and insert parameters as needed. You can include one Special Entity parameter to indicate the type of data the prompt is processing. Other parameters become fields in the prompt profile form that the prompt creator can use to customize certain parts of the prompt for their own needs. For example, you could use parameters to enable the prompt creator to customize the tone or length of the output. To add a parameter:
-
Surround the parameter name in double curly brackets. For example, {{SummaryLength}}. The parameter name cannot contain spaces. Once created, the parameter appears in the Parameters Summary pane with settings for you to configure.
-
In the Parameters Summary pane, use the radio buttons to specify the type of parameter you're using from the following options:
-
String: Free-form text the prompt creator can enter in a text box.
-
Selection: A list of options that the prompt creator can choose from in a drop-down.
-
Special Entity: The type of data the prompt will process. You must have one of these in your prompt.
-
- For your Special Entity parameter, set the Default Value to Transcript or Summary. The prompt creator cannot change this parameter in the prompt profile creation form.
- If you create a String parameter, enter the Default Value you want it to have. For example, if the parameter specifies the format of the output, you might give it a Default Value of bulleted list.
- If you create a Selection parameter, enter the Values you want the prompt creator to be able to select from in a drop-down, including one possible value in each text field. You can add more options by clicking plus
. The value you add to the text field with the house icon
will be the default setting.
-
-
When you're satisfied with your template, click Continue to Testing. If this button is disabled, verify that your prompt includes one Special Entity parameter.
You are taken to the prompt configuration page to create a new prompt based on the template.
Customize Prompt from Custom Template
If you just created a custom template, you are immediately taken to the prompt creation form to create a new prompt with the new template. If you want to create a new prompt
-
Go to the prompt creation form:
-
If you just created a custom template, you are automatically taken to the prompt creation form. You can configure the new prompt from here.
-
If you want to create a prompt from a previously existing custom template, go to GenAI Manager > GenAI Prompt Editor, open Custom Prompts, navigate to the folder for the custom template, and click the plus icon
.
-
-
On the Prompt Configuration tab, customize the fields. These may include free-form text fields or drop-downs that the user who created the template configured.
-
Click Summaries.
Add Data for Testing
Add Transcripts for Testing
Required permissions: Launch GenAI Prompt Editor, Prompt Access Edit
Import a Transcript
-
Click the Transcript tab.
-
Under the Transcript Options area, in the Type of Transcript File field, select Segment.
-
Enter the segment ID of the transcript you want to use in the What are the segment IDs for the transcripts? text box. Click the add
icon. The new transcript appears in the table below the text box.
-
Click the paper and pencil icon
to view and edit the imported transcript. The transcript shows dialog from the agent in purple and the contact in blue.
-
Modify the transcript as needed. You can take any of the following actions:
-
Click + Agent Phrase or + Client Phrase at the top of the window to add a new dialog box of a certain type. The new agent or contact dialog box appears at the bottom of the transcript. Enter the dialog for the role you selected.
-
Add another dialog box of the same type (agent or client) by selecting the box above where you want the new box and clicking the add dialog box icon
. The new box appears below the box you selected. Enter the dialog you want and then click the save icon
.
-
Edit a dialog box by selecting the box you want to change and clicking the pencil icon
. Make the changes you need and then click the save icon
.
-
Move dialog boxes higher or lower in the transcript by selecting the box and clicking the up icon
or the down icon
until the box is where you want it.
-
Delete a dialog box by selecting the box and clicking the trash can icon
.
-
Remove all dialog by clicking Clear in the top right corner of the window.
-
-
Continue to add agent and contact dialog until you have completed the transcript.
-
Click the Back to Transcript List icon
to return to the table of transcripts.
-
Continue adding the transcripts you want to test. Testing the prompt will use all of the transcripts you've included in the table.
Manually Enter a Transcript
-
Click the Transcripts tab.
-
For the Type of Transcript File field, select New Transcript.
-
Click Create New Transcript. A new transcript appears in the table below.
-
Click the paper and pencil icon
.
-
Modify the new transcript by using the following actions as needed:
-
Click + Agent Phrase or + Client Phrase at the top of the window to add a new dialog box of a certain type. The new agent or contact dialog box appears at the bottom of the transcript. Enter the dialog for the role you selected.
-
Add another dialog box of the same type (agent or client) by selecting the box above where you want the new box and clicking the add dialog box icon
. The new box appears below the box you selected. Enter the dialog you want and then click the save icon
.
-
Edit a dialog box by selecting the box you want to change and clicking the pencil icon
. Make the changes you need and then click the save icon
.
-
Move dialog boxes higher or lower in the transcript by selecting the box and clicking the up icon
or the down icon
until the box is where you want it.
-
Delete a dialog box by selecting the box and clicking the trash can icon
.
-
Remove all dialog by clicking Clear in the top right corner of the window.
-
-
Continue to add agent and contact dialog until you have completed the transcript.
-
Click the Back to Transcript List icon
to return to the table of transcripts.
-
Continue adding the transcripts you want to test. Testing the prompt will use all of the transcripts you've included in the table.
Add Summaries for Testing
Required permissions: GenAI Prompt Editor, Prompt Access Edit
All contacts you add to the table are included in the test response.
-
Click the Summaries tab.
-
Enter the contact ID of the contact whose summaries you want to add in the What are the Contact IDs for the summaries? text box. Click the add
icon. The new contact appears in the table below the text box.
-
Click the paper and pencil icon
to view and edit the imported contact summaries.
-
Click the table icon
to return to the table of contact summaries.
-
Continue adding the contact summaries you want to test. Testing the prompt will use all of the summaries you've included in the table.
Test and Publish the Prompt
Required permissions: Launch GenAI Prompt Editor, Prompt Access Edit
After you've configured the prompt settings and added transcripts or summaries, you can test your prompt with that data. This will help you see what the AI-generated text looks like and gives you a chance to refine your settings. Publishing the prompt makes it available both for others to see and for selection.
-
When you're happy with your transcript, click Test Response.
-
Review the response generated for the customized prompt and transcripts or summaries you provided. If you're not satisfied with the result, adjust the prompt configuration settings and try again. Continue testing the response and adjusting your settings until you're satisfied with the responses your prompt is generating.
-
Click Publish Custom Prompt.
Select Custom Prompt Profile
Required permissions: Launch GenAI Prompt Editor, Prompt Access Edit, either Launch Bot Builder or Studio Scripts Create/Edit
To use a custom prompt profile, you need to copy the prompt ID and then integrate it into a bot via Bot Builder or into a script via Studio.
-
On the GenAI Prompt Editor page, go to the Profiles pane on the left. If it's closed, click the open icon
to open it.
-
Navigate to the custom prompt profile you just created. Hover over the profile name and click the options icon
. Click Copy ID.
-
Use the copied ID to incorporate the prompt profile into a Studio action with REST API. Alternatively, you can incorporate it into a Bot Builder bot.