Creating Prompt Templates

You can create custom prompt templates that meet your business requirements. A prompt is a set of instructions that tells an AI large language model what to do. Users require either the AI Administrator role or the Prompt Author role to create custom prompts in the Prompts Console. After creating prompts, you must activate them before they can be used in the Knowledge Console, Knowledge Intelligence, or the Advisor Desktop. You can determine whether a prompt is active or inactive by viewing the Status column on the Prompt Templates page. You can also change the language for creating prompts from the Prompt Templates page.

Check Prompts and Fix Prompts for Knowledge Intelligence

In Knowledge Intelligence, Insights check your articles for issues and, if the Insight supports it, correct those issues. Some Insights are provided out-of-the-box (OOTB). You can also create custom Insights, for example, to make sure that no article uses a former name of your company. Every Insight relies on prompts:

  • Check Prompt: Audits your articles. A Check Prompt can check readability, acronyms, specific words, and more. For example: Search for the expression 'Old Corp, Inc'. The search is case sensitive.

  • Fix Prompt: Resolves the issues found by the Check Prompt and rewrites the article. If an Insight has a Fix Prompt, a Fix button is displayed on the Article view page in Knowledge Intelligence.

Create the Check Prompt and, optionally, the Fix Prompt as prompt templates first. Then select them when you add a custom Insight. For more information, see Custom Insight in KI Settings.

To create prompt templates:
  1. From the Navigation Menu, browse to AssistGPT > Prompt Templates.

  2. From the List page toolbar, click the New new button button.

  3. The Create Prompt Template page opens. On the General tab, provide the following details:

    1. Name: Provide a descriptive name for the prompt.

    2. Description: Provide a brief description of the purpose of the prompt.

    3. Use for: From the dropdown menu, select the console for the prompt. You can select one of the following options:

      • Knowledge: Select this option when the prompt is intended for authors in the Knowledge Console.
      • Knowledge Intelligence: Select this option when the prompt is intended for use as a Check Prompt or Fix Prompt in a custom Insight. After you create and activate the prompt here, it becomes available for selection when you add a Custom Insight in KI Settings.
      • Advisor Desktop: Select this option when the prompt is intended for agents handling emails or chats in the Advisor Desktop.
      • Knowledge Orchestration (read-only): This option is used by OOTB Knowledge Orchestration prompts.
      • Custom: Select this option when the prompt is created specifically for use in the Execute Prompt API.

      The 'Generate article from transcript' prompt is an OOTB prompt used for Knowledge Orchestration to generate articles from transcripts to resolve knowledge gaps. For more information, see Reviewing Canonical Questions topic in the Knowledge Help.

    4. Applies to: Select the channel for this prompt. The options in the dropdown menu vary depending on the option selected in the Use for field. If you have selected Knowledge or Knowledge Intelligence, the following option is available: Article. If you have selected Advisor Desktop, the following options are available: Email and Chat.

    5. Display in: This field is only visible if you have selected Knowledge or Knowledge Intelligence in the Use for field. It specifies where this prompt is displayed in the console. From the dropdown menu, select one of the following options:

      • If you have selected Knowledge: Content Area or Metadata.
      • If you have selected Knowledge Intelligence: Check Prompts for a prompt that audits articles, or Fix Prompts for a prompt that rewrites articles to resolve the issues found.

      For Knowledge Intelligence, each prompt can be either a Check Prompt or a Fix Prompt. If an Insight needs both, create a separate prompt for each.

    6. Instruction: Provide detailed instructions for your prompt. Treat the instructions like any prompt you would write for an AI assistant: tell the AI model what to do, clearly and unequivocally.

      You can provide a maximum of 50000 characters for the prompt instructions.

      You can also use the following options for your instructions: Insert Attribute and Insert Macro. For more information on using these in the instructions, see Inserting Attributes in Prompt Instructions and Inserting Macros in Prompt Instructions. For Knowledge or Knowledge Intelligence, the Insert Macro option is not available.

      For Knowledge Intelligence, every prompt must contain at least one attribute, such as {{article.content}} or {{article.title}}, to tell the AI model what to work on. In a Fix Prompt, use the {{insight}} attribute to pass the results of the Check Prompt of the same Insight to the AI model so that it can apply them to the article.

      For Knowledge and Advisor Desktop prompts, custom attributes that are not listed in the Insert Attribute dropdown are not supported, even if added manually to the instructions. For Knowledge Intelligence prompts, any expression that is not a supported attribute prompts the user for an input when they run the Insight. For more information, see Inserting Attributes in Prompt Instructions.

    7. Field to Update: Specify the location where the generated content should be displayed. This field also varies depending on the Use for option. The following options are available for Advisor Desktop: Subject, Reply Area, Classification (Categorization), Notes, and Custom Attributes. The following options are available for Knowledge and Knowledge Intelligence: Title, Content, Keyword, Description, Casebase (only for Knowledge), and Summary.

      If you choose Classification in the Field to Update field, indicate in the Instruction field that the generated text must be presented as comma-separated values.

    8. Output Format: Select the format for the generated output. The following options are available: Text and HTML. For Casebase (Field to Update), select Mermaid. Selecting Casebase displays the Create Casebase button, and selecting Mermaid ensures that the Mermaid diagram is rendered within the editor. For more information, see Converting an Article to a Case Base in the Knowledge Help.

  4. On the Advanced tab, provide the following details:

    1. AI Provider: This is a read-only field and cannot be changed.

    2. AI Model: This is a read-only field and cannot be changed.

    3. Temperature: This field regulates the randomness and creativity of AI responses. The value for this field ranges from 0 to 2, with 0 indicating no randomness. Do not change the value for this field.

  5. Click the Save button.

Once the prompt is created, it is visible on the Prompt Templates page. Here, the following details for the prompt can be viewed:

  1. Name: The name of the prompt.

  2. Description: The description for the prompt.

  3. Use For: The console where this prompt is used.

  4. Created By: Indicates the user who created the prompt. This field also displays whether this is a custom or system prompt.

  5. Stage: Indicates the current stage of the workflow for the prompt.

  6. Status: Indicates whether the prompt is active or not.

Related Topics
  1. About Prompt Templates

  2. Editing Prompt Templates

  3. Prompt Authoring Best Practices

  4. Inserting Attributes in Prompt Instructions

  5. Inserting Macros in Prompt Instructions