Filter knowledge dynamically by conversation context
About knowledge fabric configuration
A knowledge configuration defines which sources are queried and how knowledge is presented in touchpoints such as Agent Copilot. Filters on the configuration are the same for every conversation, while dynamic filtering adds a filter that changes with each one. For more information, see Create a knowledge configuration.
What is dynamic filtering?
Dynamic filtering narrows the knowledge that a touchpoint uses to what fits the live conversation. The admin does not fix the filter value. The touchpoint reads it at runtime from the customer’s active intent or from a conversation attribute, and sends it to knowledge as a tag filter.
The dynamic filter is combined with the filters already set on the knowledge configuration. It can only narrow the results, never widen them.
Set up dynamic filtering for Agent Copilot
Dynamic filtering requires tagged content, a conversation schema, a runtime attribute value, and a filter configured in Agent Copilot. The following example demonstrates how to filter knowledge by audience and topic.
| Step | Where | What to do |
|---|---|---|
| 1. Tag the content | Knowledge sources (for example, SharePoint managed metadata) | Create term sets (for example, Intent, Topic, Audience) and add managed-metadata columns intent, topic, and audience. Tag each file. For example, tag the file Training Guide.pptx with the topic Note: The intent tag must be named “Intent”. Other names are flexible. |
| 2. Define the attribute | Menu > Orchestration > Orchestration Assets > Conversation Schemas | Create a schema with attributes such as Topic and Audience. Only the String type is supported. |
| 3. Fill the value at runtime | Conversation | Set the attribute during the interaction through an Architect flow (Create Conversation Attribute action), a data action that calls the conversation custom attributes API, a Script (agent drop-down), or a bot question. Agent Copilot loads the value at the start of the conversation and follows later changes. |
| 4. Define the context | Menu > Orchestration > AI Studio > Agent Copilots | Under Context settings, define a context definition. Enter a unique name, set the source type to Conversation Attribute, then select the attribute schema and attribute name. Active Intent is always available once intents exist. |
| 5. Apply the filter | Menu > Orchestration > AI Studio > Agent Copilots | Under Knowledge settings, select a knowledge configuration. Use the Filter option to select the contexts to use, then enable the Match All filters toggle (enabled by default). |
Runtime result: The flow sets Audience = Internal. Copilot queries the knowledge configuration with the extra filter audience Internal. Only content tagged that way is suggested or used for answers.
Match All vs Match Any
This setting applies only between the selected dynamic contexts.
- Match All filters (default): The content must carry the tag of every selected context. This suits combinations such as brand and product.
- Match Any filter: At least one context’s tag is enough. This is useful when a value is sometimes missing.
Requirements for matching
For dynamic filtering to return content, the values and settings in the following table must match exactly.
| Element | Requirement | Example |
| Attribute value and tag value | The value of the conversation attribute at runtime must be identical to the tag value assigned to the content. | Attribute Audience = Internal matches the tag audience Internal. |
| Context name and tag key | The name of the context is used as the tag key. The context name must be identical to the tag key defined in the knowledge source. | Context Audience matches the column or key audience. |
| Active intent and tag value | The exact name of the intent, as defined in the natural language understanding (NLU) model, must exist as a tag value on the content. | Intent learn_basics matches the term learn_basics in the Intent term set. |
| Context and schema | The context must reference the correct conversation schema and attribute. | “Your conversation schema name”, attribute Audience. |
| Attribute type | The attribute must be of the String type. Other types are not supported. | Not applicable. |
| Dynamic and static filters | Dynamic filters are always combined with the filters in the knowledge configuration by using the AND operator. This behavior cannot be changed. | Knowledge configuration filter AND dynamic filter. |
| Match All filters | When Match All filters is enabled, each selected context must have a value at runtime, and the content must carry a matching tag for each context. | Brand AND product. |
Use cases
| Use case | Context | Operator | Tags on content |
|---|---|---|---|
| Healthcare: answers depend on the caller’s US state | state, set by the bot/IVR or the agent | Single context | One tag per state |
| Insurance: show only the right brand’s product | brand AND product | Match All | Brand and product tags |
| Appliances: a Siemens coffee machine, not all Siemens products are all coffee machines | brand AND product | Match All | Brand and product tags |
| Intent-based filtering: “cancel order”, “address change”, “broadband slow” | Active Intent | Single context | Tag matches exact intent name |
| Channel and customer type | channel AND customer type | Match All | Channel and customer type tags |
| Personal vs corporate banking: near-identical articles that retrieval alone cannot separate | customer type | Single context | Personal, Corporate |
| Location: Florida vs Europe | location, asked by the bot or chat | Single context | Location tags |
Limitations and troubleshooting
Dynamic filtering does not return content, or is not supported, in the following situations.
- Case mismatch: Matching is case-sensitive. For example, Florida does not match florida, and Internal does not match internal. If the runtime value differs from the tag value only in case, the content is not returned. Context names are also case-sensitive and must be unique.
- Other value mismatches: The content is not returned if the runtime value and the tag value differ in any other way. This includes typographical errors, abbreviations (for example, NY instead of New York), a different spelling of the intent name, or a different tag key.
- Empty the attribute value with Match All filters enabled: If a selected context has no value at runtime, no content is returned. For example, the interactive voice response (IVR) system might not have captured the brand. To resolve this issue, populate the value by using an agent script drop-down or a bot question, or disable Match All filters.
- Untagged content: When a dynamic filter is active, content that does not have the corresponding tag is excluded from the results.
- Multiple contexts with Match All filters enabled: If any selected context has no value or no matching tag, no content is returned. Genesys recommends using no more than two contexts with this setting.
- Unsupported attribute types and sources: Dynamic filtering supports only attributes of the String type. Participant data is no longer supported as a source. The only supported sources are conversation attributes and the active intent.
- Renaming a context that is used in a knowledge filter: After you rename the context, delete the filter and create it again.
[NEXT] Was this article helpful?
Get user feedback about articles.