
Contextual data definitions
When you want to create a Pega GenAI™ Knowledge Buddy, during the Prompt stage, you define the variables that the Contextual data definitions table uses. At run time, the values from this table replace the variables from the Information paragraph. The information variables include:
- Collection, which is a group of related data sources.
- Data sources, which the Knowledge Buddy uses to retrieve information. This information consists of an array of chunk objects.
- Response attributes, which you define in the Information variable configuration.
- Minimum similarity score, which a chunk of content must posses to be considered useful information.
The following figure shows the Contextual data definitions table in the Prompt stage:
To define a variable, click the Actions menu to the right of the variable name, and then click Edit. To add additional information variables, firms add CONTEXT, and then the name of the variable enclosed in curly brackets in the Information field.
Collection
Each data source must be associated with a collection. By default, Knowledge is the default collection for all data sources. If you do not create a collection, all data sources that you create are placed in the default collection. When you create separate collections for different use cases, data is stored in separate index tables for each collection and as a resultyou can improve search efficiency and data management.
Note: For more information about collections, see Data collections.
Data sources
A data source is a storage container for content that Knowledge Buddy uses to provide answers. If you have the Admin or DataSourceManage Access Role, you can create a new data source manually. Additionally, the system creates a data source automatically when an author creates a knowledge article in Pega Knowledge™ based on the content type of the knowledge article.
Note: For more information about data sources, see Data sources.
When you edit an information variable, you use the Data sources list to select all data sources that are contained as part of the Collection you selected as shown in the following figure. The Knowledge Buddy only uses the data sources that you select to compose answers.
Response attributes
Response attributes represent additional information that you want the Knowledge Buddy to include with the answer. Examples of response attributes are the URL and title of the article the Knowledge Buddy used to compose the answer, the ID of the article, or others.
You use the Response attributes list to select all applicable response attributes, as shown in the following figure:
The following example shows the answer that a Knowledge Buddy provides without and with the data source and similarity score response attributes.
Advanced settings
You use Advanced settings to refine search results and configure whether the Knowledge Buddy must always return an answer.
Note: You can configure advanced settings separately for each variable in the Information variables table.
When you ask a question of the Knowledge Buddy, it performs a semantic search and returns chunks of content related to the question. When you select the Must return results checkbox (which is active by default), the SEARCHRESULTS variable returns results based on the data source. If the system does not return content chunks from the semantic search, the Knowledge Buddy responds with, "I do not know the answer."
When you clear the Must return results checkbox, even though the semantic search did not return any results, the Knowledge Buddy makes a query to the AI model that it uses and returns that answer as the response.
There are three other fields that you can define in the Advanced settings to find the optimal configuration for the Knowledge Buddy:
- Maximum number of text chunks: The maximum number of text chunks you want returned in response to a question. By default, this is 5.
- Maximum total size of text chunks: The maximum number of characters in each text chunk. By default, this is 5000.
- Minimum similarity score of matches: Determine the precision or flexibility of the returned content chunks. A higher score ensures more relevant text chunks but can reduce the number of results. By default, this value is 80.
This Topic is available in the following Module:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?