Manage Prompts
This topic describes how to manage prompts in Prompt Studio.
Access Prompt Studio
NetSuite users with an Administrator role or with another role that has the Setup Prompts (ADMIN_PROMPTS) permission can access Prompt Studio.
To access Prompt Studio:
-
Go to Setup > Company > AI > Prompts. The Prompts subtab of the Prompt Studio page is displayed.
View Prompts
You can view prompts and filter the prompt list by various properties.
To view prompts:
-
Go to the Prompts tab of the Prompt Studio page. By default, the prompts list shows all system prompts for Text Enhance actions.
-
Locate the prompt you want to view. You can search by name or search by using filters.
-
Search for prompts by name: Optionally, you can narrow the list scope by typing part of or all of the prompt name in the search box.
-
Search for prompts using filters: Optionally, you can use filters to narrow the list scope. Click Filters and then select one or more filters. For more information about prompt list filters, see Prompt List Filters.
-
-
Click the prompt name. The prompt record is displayed.
Prompt List Filters
You can filter the prompts list using one or more of the following filters:
-
Type: Limits the search results to either System or Custom prompts
-
System prompts are prompts provided by NetSuite and can't be changed or deleted. System prompts can be copied to create a custom prompt. System prompts have a negative ID number.
-
Custom prompts are prompts created by account users. Custom prompts have a positive ID number.
-
-
Prompt Type: Limits the search results to either Text Enhance or Custom prompts.
-
Text Enhance prompts are matched to a Text Enhance action.
-
Custom prompts are standalone prompts that can be used in SuiteScript code.
-
-
Record: Search by the record type associated with each prompt.
-
Field: Search by the field associated with each prompt. You must select a record before you can select a field.
-
Language: Search by the language associated with each prompt.
-
Language Variant: For languages that have more than one variant, you can narrow your scope to the language variant. For example, select English (UK) to view a list of only UK English prompts. You must select a language before you can select a language variant.
-
Action: Select a Text Enhance action to view prompts associated with that action. You must select a language before you can select a Text Enhance action.
Customize Prompts
When you customize a prompt, you create a copy of the prompt that you can edit. Customize a prompt when:
-
You want to customize a system prompt.
-
You want to create the same prompt but for a different language.
-
You want to re-use a prompt of a Text Enhance action for a partial Text Enhance action.
To customize a prompt:
-
Go to Setup > Company > AI > Prompts. The Prompts tab of the Prompt Studio page is displayed.
-
Locate the prompt you want to customize. For more information, see View Prompts.
-
Click the prompt’s Customize link. The Prompt page displays a copy of the prompt’s details.
-
Edit the prompt details. For more information, see Enter Prompt Details for a Prompt.
-
Click Save.
Create New Prompts
There are two ways to create a new prompt.
To create a new prompt from outside Prompt Studio:
-
Go to Setup > Company > AI > Prompts > New.
-
On the Prompt page, complete the prompt details. For more information, see Enter Prompt Details for a Prompt.
-
Click Save.
To create a new prompt from within Prompt Studio:
-
Click the Prompts tab.
-
Click Create Prompt.
-
On the Prompt page, complete the prompt details. For more details, see Enter Prompt Details for a Prompt.
-
Click Save.
Edit Prompts
You can edit custom prompts. You cannot edit system prompts, but when you customize a system prompt, you create a custom copy that you can edit.
To edit a prompt:
-
Go to Setup > Company > AI > Prompts. The Prompts tab of the Prompt Studio page is displayed.
-
Locate the prompt you want to edit. For more information, see View Prompts.
-
Click Edit. The prompt is displayed in the Prompt page.
-
Edit the prompt by changing prompt details. For more information, see Enter Prompt Details for a Prompt
.
-
Click Save.
Enter Prompt Details for a Prompt
If you are creating a new prompt, enter the prompt details as described below. If you are editing or customizing a prompt, you can modify desired prompt details.
To enter prompt details on the Prompt page:
-
Complete the Basic Prompt Settings:
-
Inactive: Only choose this setting if you want to disable a Text Enhance action. For new prompts, this setting can be used to if you are not ready to release the prompt yet. However, if you are customizing a system prompt by creating a copy with the same "signature" (record, field, language, and action), marking custom prompt "Inactive" creates an override with a stronger match. That is, neither the custom prompt nor the system prompt will be available, which causes the Text Enhance action to not be available in the Text Enhance menu.
-
Name: Enter a prompt name. This name is displayed in the prompts list, so use a name that distinguishes this prompt from other prompts.
-
Script ID: Enter a unique ID to reference the prompt in scripts. When you save, the prefix custprompt is added to the script ID you entered.
-
Description: Optionally, enter a brief description of your prompt.
-
-
Complete the Select Target section:
-
Prompt Type: Choose Text Enhance if the prompt is for a Text Enhance action. Choose Custom if the prompt is for other purposes, such as use in SuiteScript code.
-
Record: Select the record for which the prompt can be used. Selecting All makes the prompt available to all records, and reduces your ability to narrow the prompt scope by field.
-
Field: Select the field for which the prompt can be used. Selecting All makes the prompt available to all fields in the selected record.
-
Language: Select the language for which the prompt can be used. If the prompt is a Text Enhance prompt, the language must match the language setting for the Text Enhance action.
-
Language Variant: If applicable, select the language variant for which the prompt can be used.
-
Action: If the prompt type is Text Enhance, select the Text Enhance action to use this prompt. You can choose a custom Text Enhance action or you can override a system action with your custom prompt. For example, if your organization wants to define “Make Shorter” to be 120 characters or fewer, you would select the Make Shorter action and then incorporate your requirements into the prompt template. Note that the only Text Enhance actions displayed in this list are those with the same language setting as the prompt.
-
-
Optionally, modify the Model Settings.
-
Complete the Template section. The template section is where you enter the prompt itself.
-
Preamble: Optional and available only if you are using the Cohere model family. A preamble enables you to specify a role or persona, context, and the response tone. Here is an example preamble: You’re a sales professional with a deep understanding of your customers and of your company’s products. Answer in a friendly and professional tone.
-
Template: Enter the prompt that you want to use.
If your prompt type is Text Enhance, you can select variables to insert.
If your prompt type is Custom, you need to enter variables manually, based on what you plan to use in your code. For example, your SuiteScript code would need to set the value for
${purchaseDescription}
if your prompt is “Please clean up typos in the following text:${purchaseDescription}
and return only the corrected text. Return the text as is if there's no typo or you don't understand the text.”
-
-
Click Save when you have finished entering or changing the prompt details.
Test a Prompt
For best results, test your prompt before activating it in your account.
To test a prompt:
-
Go to Setup > Company > AI > Prompts. The Prompts tab of the Prompt Studio page is displayed.
-
Locate the prompt you want to test and click the name of the prompt to open it. For more information, see View Prompts.
-
From the Prompt page, locate the table (below the Template field) with columns labeled Variables in Template and Replace Variable with Value. For each variable in the table, enter the values you want to test in the Replace Variable with Value column.
-
Place your cursor in another field on the page and then verify that the Prompt to Preview field shows the prompt using the values you want to test.
-
Click Generate Preview. The response from the large language model is displayed in the Prompt Result Preview field.
You can run multiple tests and make changes to the prompt to ensure that it meets your needs.
If your account has not enabled Prompt Studio to use an OCI configuration for your account, each generated preview counts toward one free use of your monthly quota. For more information, see View Prompt Studio Usage Limit and Usage