Configure Knowledge discovery agent activity

Use the following procedure to configure a Knowledge discovery agent.

The Knowledge discovery agent activity is available only to Enterprise tier customers. For users on the Standard and Advanced tiers, this feature is restricted and indicated by a lock icon.

  1. Add an activity to the map. See Add an activity.

    By default, the Configuration tab is open in the properties panel of the activity.

  2. Enter a Name for the activity.
  3. On the Type list, select AI Knowledge Base > Knowledge discovery agent.
  4. On the AI Knowledge Base provider list, select the knowledge base provider configured. See Integrate TotalAgility with AI Knowledge Base.

    If using the Tungsten knowledge base provider, you must have the required licenses to search the documents in the knowledge base.

  5. On the Index list, select an index.

    The indexes added to the selected AI knowlegde base provider appear on the Index list.

  6. You can provide input in either way based on the size of the prompt:
    • For a relatively smaller input prompt, in the Input box, enter a plain text or select a process or server variable.

    • For a large and detailed input prompt, such as a block of code, select . In the Editor, enter the prompt and click Save.

      • The text editor supports Markdown content, plain text, variables, or any combination of these.

      • When you use a variable in the prompt, its ID appears in the text editor within double curly brackets (such as, {{variableID}}), while the variable's value is displayed only at runtime. For example, if the variable contains the text "Hello", that text appears when the prompt is executed.

  7. Under Filter fields, you can add filters to refine the documents used in the search and modify or delete existing filters. You can add multiple filters, however, the same filter type cannot be used more than once.
    1. Click .
    2. In the Name box, click the down arrow to expand the list, and select an index field.

      In addition to the following system index fields: Job ID,Case ID, and Case Ref, the index fields that are configured as filterable in the AI knowledge base integration appear in the Name box.

    3. On the Operator list, select the field operator to use. Available operators are: Equals, Not equals, Greater than, Greater than or equal, Less than, Less than or equal, All excluding, and Any.

      "All excluding" and "Any" field operators are only available if the index field type is set to "String collection" while adding indexes in the AI knowledge base integration.

    4. In the Value box, click the down arrow and select a server or process string variable. The variables available for selection are based on the type of the field being configured.
    5. Click Add.

      The filter field is added. Add more fields an needed.

      To edit a filter field, select the field and click and modify the required fields. To delete a field, select the field and click .

      When you upgrade TotalAgility or import a process from a previous version, all filter fields are automatically set to "Equals", and the overall filter operator is set to "And".

  8. On the Filter operator list, select the operator as And or Or.
  9. Under Content fields, define the fields that are passed to the LLM:
    1. Click .
    2. In the Name box, click the down arrow to expand the list, and select an index field (retrievable).

      In addition to the following system index fields: Job ID,Case ID, and Case Ref, the fields that are configured as retrievable appear in the Name box.

      In the AI knowledge base integration, you must configure the retrievable field as searchable for it to appear in the Name box.

    3. Click Add.

      The retrievable filter field is added. Add more fields an needed. You can edit or delete the fields.

  10. To override the query type set in the AI knowledge base integration, select Override query type.

    The "Override query type" setting becomes available only if you select "Enable query type override" in the AI knowledge base integration.

  11. By default, the query type set in the AI knowledge base integration appears on the Query type list. You can select a different query type to override the one set at the integration level. The following query types are available: Simple, Semantic, Vector, Vector simple hybrid, and Vector semantic hybrid.

    At runtime, the query type defined at the activity level takes precedence over the query type set at the integration level.

  12. Under Vectorized fields, you can add the fields that are used during the search.

    The Vectorized fields section appears only if you have selected "Enable query type override" and set the query type as Vector, Vector simple hybrid, or Vector semantic hybrid in the AI knowledge base integration.

    1. Click .
    2. In the Name box, click the down arrow to expand the list, and select an index field. The fields that are configured as vectorized, searchable, and retrievable only appear in the Name box.
    3. Click Add.

      The field appears under Vectorized fields. You can add or delete the fields.

      When you import a process from an earlier version of TotalAgility or upgrade TotalAgility , the retrievable fields and vector fields lists are empty by default. You can configure the fields as needed.
  13. To override the maximum number of documents configured when configuring the AI knowledge base integration, select Override max number of matches. (Default: Clear)
  14. For Max number of matches, specify the maximum number of documents to override. (Default: 5)

    This property is available only if "Override max number of matches" is selected.

  15. To add a response profile that can be used at runtime because you may want your responses to take a specific word count or style, select Use response profile and on the Response profile list, provide an inline value, such as "Summarize the response in 20 words or less." or select a process variable or server variable.
  16. Optional. You can dynamically set the seed value when searching the knowledge base. The seed value increases the likelihood of obtaining more consistent results from the AI provider across repeated requests, though not guaranteed. Do the following:
    1. Select the check box for Use seed (default: Clear), or click and select a dynamic value (form variable of type boolean or form control).
    2. On the Seed list, select a form variable or form control or select a numeric value. (Default: 0 and Maximum: 32,767).
  17. To include case data for analysis when using AI knowledge base, select Include case data.

    The "Include case data" option is not available when using a Custom LLM provider.

    1. For Case identifier, select a variable (global variable, form variable, or form control) or provide an inline value for Case ref or Case ID.
    2. A list of case data is displayed. By default, key case details, history (full), variables, and notes options are selected. You can select the items from the list as needed.

    At runtime, the case details are included in the information available to search and also included in the response.

  18. On the Response list, select a Data object variable.

    The data model will be created as part of the installation or upgrade and will be available for use.

  19. Save the process.

    When the activity is executed,

    • The prompt is processed and the response returned with the data object is populated accordingly.

    • All content (retrievable) fields are passed to the LLM and vector fields are used in the knowledge base search.