Manage Prompts

This topic describes how to manage prompts in Prompt Studio.

Accessing Prompt Studio

You can access Prompt Studio if you're a NetSuite user with an Administrator role or with another role that has the Setup Prompts (ADMI_PROMPTS) permission.

To access Prompt Studio:

  1. Go to Setup > Company > AI > Prompt Studio. The Prompts subtab of the Prompt Studio page is displayed.

Viewing Prompts

You can view prompts and filter the prompts list by different properties.

To view prompts:

  1. Go to the Prompts tab of the Prompt Studio page. Before you filter the list, it shows all system prompts for Text Enhance actions.

  2. Find the prompt you want to view. You can search by name or use filters.

    • To search for prompts by name - Type part or all of the prompt name in the search box.

    • To filter the prompts list - Click Filters and then select one or more options to narrow the list. For more information, see Filtering the Prompt List.

      Note:

      Your filter selections are saved. You can reset the filters by clicking Clear All Filters.

  3. Click the prompt name to open its record.

Filtering the Prompt List

You can filter the prompts list with one or more of these options:

  • Type - Limits the search results to either System or Custom prompts.

    • System prompts are provided by NetSuite. They can't be changed or deleted, but you can copy them to create a custom prompt. System prompts have a negative ID number.

    • Custom prompts are created by account users or installed with SuiteApps. Custom prompts have a positive ID number.

      Custom prompts installed with SuiteApps have a status of "Locked" (shown when you view the prompt). You can't change or delete them using Prompt Studio, but you can create copies of them.

  • Prompt Type - Limits the search results to either Text Enhance or Generic prompts.

    • Text Enhance prompts match a Text Enhance action.

    • Generic prompts are standalone and can be used in SuiteScript code.

  • Record - Search by the prompt's associated record type.

  • Field - Search by the prompt's associated field. You'll need to select a record before you can select a field.

  • Language - Search by the prompt's associated language.

  • Language Variant - If a language has more than one variant, you can narrow the list to a specific variant. For example, select English (UK) to view only UK English prompts. You'll need to select a language before you can select a language variant.

  • Action - Select a Text Enhance action to view its associated prompts. You'll need to select a language before you can select an action.

Customizing Prompts

When you customize a system prompt, you're making a copy that you can edit. Customize a prompt when:

  • You want to override a system prompt with a custom prompt.

  • You want to use the same prompt for a different language.

  • You want to reuse a full Text Enhance action's prompt for a partial Text Enhance action.

To customize a prompt:

  1. Go to Setup > Company > AI > Prompt Studio. The Prompts tab of the Prompt Studio page is displayed.

  2. Find the prompt you want to customize. For more information, see Viewing Prompts.

  3. Click the prompt's Customize link to open a copy of its details.

  4. Edit the prompt details. For more information, see Entering Prompt Details.

  5. Click Save.

Copying Prompts

You can copy any prompt to create a new one. Copy a prompt when:

  • You want to use the same prompt for a different language.

  • You want to reuse a full Text Enhance action's prompt for a partial Text Enhance action.

  • You want to create a custom prompt based on a system prompt, and you don't want to override the system prompt.

  • You want to create a new custom prompt based on another custom prompt.

To copy a prompt:

  1. Go to Setup > Company > AI > Prompt Studio. The Prompts tab of the Prompt Studio page is displayed.

  2. Find the prompt you want to copy. For more information, see Viewing Prompts.

  3. Click the prompt's name to view its details.

  4. Edit the prompt details. For more information, see Entering Prompt Details.

    Note:

    If you've made a copy of a custom Text Enhance prompt, you need to change one or more target settings (record, field, language, language variant, or action) before you can save it.

  5. Click Save.

Creating New Prompts

There are two ways to create a new prompt.

To create a new prompt from outside Prompt Studio:

  1. Go to Setup > Company > AI > Prompt Studio.

  2. On the Prompt page, fill in the prompt details. For more information, see Entering Prompt Details.

  3. Click Save.

To create a new prompt within Prompt Studio:

  1. Click the Prompts tab.

  2. Click Create Prompt.

  3. On the Prompt page, fill in the prompt details. For more details, see Entering Prompt Details.

  4. Click Save.

Editing Prompts

You can edit custom prompts. You can't edit system prompts or custom prompts installed with SuiteApps, but you can edit copies of them.

To edit a prompt:

  1. Go to Setup > Company > AI > Prompt Studio. The Prompts tab of the Prompt Studio page is displayed.

  2. Find the prompt you want to edit. For more information, see Viewing Prompts.

  3. Click Edit to open the prompt on the Prompt page.

  4. Edit the prompt details. For more information, see Entering Prompt Details

    .

  5. Click Save.

Entering Prompt Details

If you're creating a new prompt, enter the details as described below. If you're editing or customizing a prompt, only update the details you want to change.

To enter prompt details on the Prompt page:

  1. Fill in the Basic Prompt Settings:

    • Inactive - Only select this setting if you want to disable a Text Enhance action.

      For new prompts, use it if you aren't ready to release the prompt yet.

      If you're customizing a system prompt with the same "signature" (record, field, language, and action), marking the copy "Inactive" creates an override with a stronger match. In that case, neither the system prompt nor its copy will be available, so the Text Enhance action won't display in the menu.

    • Name - Enter a prompt name. This name is displayed in the prompts list, so pick a name that is different from the others.

    • 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. If you don't enter a value, the system assigns an ID number to the prompt (for example, custprompt2). The ID number is the same number that you'll see in the list view.

    • Description - Optionally, add a short description of your prompt.

  2. Fill in the Select Target section:

    • Prompt Type - Select Text Enhance if the prompt is for a Text Enhance action. Select Generic if the prompt is for other uses, such as SuiteScript code.

    • Record - Select the record where the prompt can be used. If you select All, the prompt is available to all records, but you won't be able to narrow it by field.

    • Field - Select the field where the prompt can be used. If you select All, the prompt is available to all fields in the record you selected.

    • Language - Select the language for the prompt. For Text Enhance prompts, the language needs to match the Text Enhance action's language setting.

    • Language Variant - If needed, select the language variant for the prompt.

    • Action - For Text Enhance prompts, select the Text Enhance action you want to use.

      You can choose a custom Text Enhance action or you can override a system action with your custom prompt. For example, if you want 'Make Shorter' (a system action) to also apply your company's style guidelines to the content, select the Make Shorter action and then add your requirements to the prompt template.

      If you want to create a new custom Text Enhance action, click the Create New button instead of selecting an action from the list. In the Create Text Enhance Action dialog, fill in the fields and click Save.

      Only Text Enhance actions with the same language setting as the prompt are shown in this list.

    Note:

    If you've made a copy of a custom Text Enhance prompt, you need to change one or more target settings (record, field, language, language variant, or action) before you can save it.

  3. Optionally, adjust the Model Settings.

  4. Optionally, in the Template section, enter a Preamble. A preamble can be used for entering a description of the role or persona, context, and response tone. For example: 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.

    When to use a preamble: A preamble is helpful if you plan to create several prompts by copying a single prompt. For example, you can place the part you want to be the same across your prompts in the Preamble field, and place the part you plan to change in each copy in the Template field.

  5. In the Template section, fill in the Template field. This is where you enter the instructions and variables that are used to construct the prompt that is sent to the LLM.

    1. Enter the prompt instructions in the field below the Variable selection lists.

      If your prompt type is Generic, you'll need to enter variables manually, based on what you plan to use in your code. For example, your SuiteScript code should 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.'

    2. If your prompt type is Text Enhance, you can select variables to insert. Select a variable type, select the variable of that type, and then click Insert to Template. Selectable values are based on the record type that is specified in the Record field. You can insert the following types of variables:

      • User - Select this option to add variables for user details, such as name, email address, and role.

      • Company - Select this option to add variables for company details of the NetSuite account, such as name, address, and type of business.

      • Special - Select this option to add variables for details that apply specifically to the prompt or Text Enhance and do not fit in other categories, such as Text Enhance field content, selected text in a Text Enhance field, record type, and field name.

      • Form - Select this option to add variables for fields on the form that the prompt appears on. If you select Form, you'll be prompted to select a field.

      • Sublist - Select this option to add variables for fields within a sublist of the record. If you select Sublist, select the sublist for which you want to add variables, and then select one or more sublist variables.

  6. Click Save when you're finished entering or updating the prompt details.

Testing a Prompt

For best results, test your prompt before you activate it in your account.

To test a prompt:

  1. Go to Setup > Company > AI > Prompt Studio. The Prompts tab of the Prompt Studio page is displayed.

  2. Find the prompt you want to test and click its name to open it. For more information, see Viewing Prompts.

  3. On the Prompt page, find the table below the Template field with columns called Variables in Template and Replace Variable with Value. For each variable, enter the values you want to test in the Replace Variable with Value column.

  4. If your prompt uses sublist variables, you can add sample values to test:

    1. Click the Sublist Variables tab.

      A tab is added for each sublist you added to the prompt template. On each sublist tab, there is a table with the sublist variables as column headers, and one blank row for you to add variable values.

    2. To add a sublist variable value, click the cell and type the variable value. Repeat this for each sublist variable in the row.

    3. To add more sublist variable sets to test, click Add Row, then add sublist variable values to the row.

      To remove a set of sublist variable values, select the row you want to remove, and then click Remove Row.

    4. Repeat these steps for all sublists and sublist variable values you want to test.

  5. Place your cursor in another field on the page, then verify that the Prompt to Preview field shows the prompt with the values you want to test.

  6. Click Generate Preview. You'll see the response from the large language model in the Prompt Result Preview field.

    Note:

    The first time you click Generate Preview, Prompt Studio displays a confirmation message to inform you that you're using an artificial intelligence (AI) feature. The message is as follows: "Prompt Studio is an AI feature that generates content for your use. Your data may be processed globally according to the Oracle Services Privacy Policy." Click the link if you want to view the policy. It'll open in a new web browser tab or window. Click OK to close the message and continue.

You can run multiple tests and make changes until the prompt meets your needs.

Important:

If your account has not enabled Prompt Studio to use an OCI configuration, each successful preview counts as one free use from your monthly quota. For more information, see View Prompt Studio Usage Limit and Usage

Deleting a Custom Prompt

You can delete custom prompts that your account users create, but not system prompts or custom prompts installed with SuiteApps. What happens when you delete a prompt depends on its Prompt Type setting:

  • Text Enhance prompts - Deleting a prompt doesn't affect its Text Enhance Action record. But if it was the only prompt for the Text Enhance action, users won't be able to see or use the Text Enhance action.

  • Generic prompts - Before you delete a Generic prompt, make sure it's not being used. If SuiteScript code is using the prompt, deleting it will cause that code to fail.

To delete a custom prompt:

  1. Find the prompt that you want to delete in the list and select it, or open the prompt.

  2. From the Prompt page, click Delete.

Viewing System Notes for Custom Prompts

You can view system notes for custom prompt records. Prompt records are supported by System Notes v2. For more information, see System Notes v2 Overview.

System notes update in the background, so there may be a short delay between an action occurring and its details being shown in the system notes.

To view system notes for a custom prompt:

  1. Open the prompt.

  2. Click System Notes.

    The System Notes page is displayed for the prompt record.

General Notices