Configure the Knowledge discovery agent activity using the Static configuration
You can manually enter all configuration values directly into the Knowledge discovery agent activity. These values are fixed and do not change at runtime.
-
Add an activity to the map. See
Add an activity.
By default, the Configuration tab is open in the properties panel of the activity.
- Enter a Name for the activity.
- On the Type list, select .
- Select the Configuration mode as Static (default).
-
When you perform a search, the system by default returns the entire search results (not just chunks), including
response text. To limit execution to retrieving relevant indexed documents and references without calling a Large Language Model
(LLM) to generate a response, select
Search only. (Default: Clear).
This option helps search and retrieve documents efficiently while minimizing token usage and the cost associated with LLMs.
- On the AI Knowledge Base provider list, select a preconfigured knowledge base provider.
-
On the
Index list, select an index.
The indexes added to the selected AI knowledge base provider appear on the Index list.
-
You can provide input 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 text 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.
-
-
-
Under
Filter fields, add filters to refine the documents used in the search. You
can add multiple filters; however, the same filter type cannot be used more than once.
- Select .
-
In the
Name box, select the down arrow
to expand the list.
This list includes the Job ID, Case ID, and Case Ref system fields, and the index fields that are configured as filterable in the AI knowledge base integration.
- Select an index field.
-
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.
- 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.
-
Select
Add.
The filter field is added. Add more fields as needed.
You can modify or delete existing filters.
-
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".
-
- On the Filter operator list, select the operator as And or Or.
-
Under
Content fields, define the fields that are passed to the LLM:
- Select .
-
In the
Name box, select the down arrow
to expand the list.
This list includes the Job ID, Case ID, and Case Ref system index fields and the retrievable fields that are configured as searchable in the AI knowledge base integration.
- Select an index field (retrievable).
-
Select
Add.
The retrievable filter field is added. Add more fields as needed. You can edit or delete the fields.
-
To override the query type set in the AI knowledge base integration, select
Override query type.
The "Override query type" setting is only available only if you select "Enable query type override" in the AI knowledge base integration.
-
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. Available query types are
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.
-
To improve the relevance of semantic search results, on the
Semantic configuration list, select a semantic configuration defined for the
index. Semantic configurations provide precise control over search quality, eliminating the need for recreating the index .
By default, the Default semantic configuration is applied.
The "Semantic configuration" property is available if the query type is Semantic or Vector semantic hybrid. For more information, see Semantic configuration for search indexes. -
Under
Vectorized fields, you can add the fields that are used during the search.
This 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.
- Select .
-
In the
Name box, select the down arrow
to expand the list.
This list includes the fields configured as vectorized, searchable, and retrievable
- Select an index field.
-
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 lists of retrievable fields and vector fields are empty by default. You can configure the fields as needed.
- To override the maximum number of documents configured when configuring the AI knowledge base integration, select Override max number of matches. (Default: Clear)
-
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.
- 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.
-
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.
- Select the check box for Use seed (default: Clear), or select and select a dynamic value (form variable of type Boolean or form control).
- On the Seed list, select a form variable or form control, or select a numeric value. (Default: 0 and Maximum: 32,767).
-
To include case data for analysis when using the AI knowledge base, select
Include case data.
This option is not available when using a Custom LLM provider.
- For Case identifier, select a variable (global variable, form variable, or form control) or provide an inline value for Case ref or Case ID.
- A list of case data is displayed. By default, key case details, history (full), variables, and notes options are selected. You can select more items from the list as needed.
At runtime, the case details are included in the available search information and in the response.
-
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.
-
On the
Response list, select a Data object variable that holds the output. You can
create a new data object variable or map the "KBSearchResult" variable available under System category.
-
If "Search only" is enabled, you can map the "KBSearchOnly" data model available in the System category. The "KBSearchOnly" data model contains the DocumentChunks list field with score, rerankerScore, DocumentId, DocumentName, ReferenceId, ChunkText, and Coordinates of type Object.
-
If you create your own data model, the system will only populate fields that match names/types from the standard model.
-
-
Save the process.
When the activity is executed:
-
If "Search only" is not enabled, the prompt is processed, and the search results returned with the data object are populated accordingly. The system logs the number of tokens used during the search process. If a new data model is mapped, chunk text and scores are set to default values (0 or null), and only matching fields are displayed.
-
If "Search only" is enabled, and the variable mapped to KBSearchResult is used:
-
The search is processed, and the system retrieves relevant document chunks.
-
No LLM call is made and response is not generated. The token usage is displayed as 0.
-
-
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.
-