Creating a summary prompt template for a document class

You can create a different summary prompt template for each document class in your object store.

Before you begin

If you plan to customize summary prompt templates, you need to first create a value for the GenaiLLMDocumentSummaryPromptTemplate property of the GenaiConfiguration class. This value is used as the prompt template value for any document class that does not have a customized summary prompt template.

For more information, see the topic Editing the default prompt templates.

About this task

Sometimes, you may want to use a different summary prompt template for each document class in your object store. For example, the summary prompt template for an Invoice document contains different instructions compared to the prompt template for a Resume document.

Procedure

  1. In the Administration Console for Content Platform Engine (ACCE), choose one of the following methods to customize the summary prompt template for a document class.

    If you are using Content Platform Engine 26.0 or later, you can use either option. For earlier versions, use Option 2.

    • Option 1 (CPE 26.0 and later) - Use the Summary Generation tab for a document class
      1. Go to Data Design > Classes > Document and select the document subclass for which you want to customize the summary prompt template.
      2. Click the Summary Generation tab.
      3. Select the Enable summary generation override checkbox.
      4. Specify a value for Maximum summary words.
      5. Enter your custom summary prompt template in the Summary generation override field.
      6. Click Save.
    • Option 2 - Use the Gen AI Class Summary Generation Definition wizard.

      Working with this wizard involves three stages: first, you create an instance of the GenaiClassSummaryGenerationDefinition class. Next, you access the document subclass definition to copy its object reference. Finally, you return to the wizard to associate the document class object reference that you copied with the GenaiClassSummaryGenerationDefinition instance, enter your custom summary prompt template, and complete the wizard.

      Creating a Gen AI Class Summary Generation Definition instance

      The Content Assistant metadata includes the GenaiClassSummaryGenerationDefinition class for which you can create instances and associate them with a document class. If you specify a custom summary prompt template for a document class, it applies for that document class and the subclasses of the document class. If you want a subclass to have a summary prompt template that is different from the parent class, you need to create a separate GenaiClassSummaryGenerationDefinition instance for the subclass.

      1. Go to Data Design > Classes > Other Classes > Abstract Persistable > Gen AI Class Summary Generation Definition and open the class definition.
      2. Select Actions > Create Instance to create an instance of the class.
      Accessing the document class reference
      1. Go to Data Design > Classes > Document and open the class definition for the document subclass.
      2. Click Actions > Copy Object Reference to copy the object reference for the document subclass.
      Associating the document class reference with the Gen AI Class Summary Generation Definition instance
      1. In the Gen AI Class Summary Generation Definition wizard, paste the copied reference as the value for Gen AI Summary Prompt Class.
      2. Enter your custom summary prompt template in the Gen AI LLM Doc Summary Prompt Template field and specify a value for Gen AI Max Summary Words.
      3. Complete the wizard.
  2. Repeat the steps for each document class where you want to customize the summary prompt template.