Configure Knowledge discovery agent activity

Use the following procedure to configure a Knowledge discovery agent activity.

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. Select the Configuration mode as Static (default) or Dynamic.
  5. 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.

  6. On the Index list, select an index.

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

  7. 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 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 select 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 appears only at runtime. For example, if the variable contains the text "Hello", that text appears when the prompt is executed.

  8. 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. Select .
    2. In the Name box, select 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 when the index field type is set to "String collection" while adding indexes in the AI knowledge base integration.

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

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

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

      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".

  9. On the Filter operator list, select the operator as And or Or.
  10. Under Content fields, define the fields that are passed to the LLM:
    1. Select .
    2. In the Name box, select 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. Select Add.

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

  11. 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.

  12. 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.

  13. To improve the relevance of semantic search results, on the Semantic configuration list, select a semantic configuration defined for the index.

    By default, the Default semantic configuration is applied.

    The "Semantic configuration" property is only available if the query type is set to Semantic or Vector semantic hybrid. For more information, see Semantic configuration for search indexes.

  14. 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. Select .
    2. In the Name box, select the down arrow to expand the list, and select an index field. Only the fields configured as vectorized, searchable, and retrievable appear in the Name box.
    3. Select 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 list of retrievable fields and vector fields are empty by default. You can configure the fields as needed.
  15. To override the maximum number of documents configured when configuring the AI knowledge base integration, select Override max number of matches. (Default: Clear)
  16. 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.

  17. 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.
  18. 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 select 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).
  19. To include case data for analysis when using the 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 available search information and in the response.

  20. To enable a one-time automatic retry when the knowledge base search returns an empty response, select Retry if response empty. (Default: Clear)

    Retrying helps ensure a valid search result is obtained without requiring manual intervention.

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

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

  22. Save the process.

    When the activity is executed,

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

    • When an empty response is returned and "Retry if response empty" is selected, the system immediately performs a single retry of the search using same input parameters.

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

    • The semantic configuration is used in the search. Semantic configurations provide precise control over search quality, eliminating the need for index re-creation.