Skip to main content

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 .

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 . The following example demonstrates how to filter knowledge by audience and topic.

StepWhereWhat to do
1. Tag the contentKnowledge 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 Customer Onboarding, the intents learn_basics and training, and the audience Internal.

Note: The intent tag must be named “Intent”. Other names are flexible.

2. Define the attributeMenu > Orchestration > Orchestration Assets > Conversation SchemasCreate a schema with attributes such as Topic and Audience. Only the String type is supported.
3. Fill the value at runtimeConversationSet the attribute during the interaction through an Architect flow (), 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 contextMenu > 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 filterMenu > 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.

ElementRequirementExample
Attribute value and tag valueThe 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 keyThe 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 valueThe 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 schemaThe context must reference the correct conversation schema and attribute.“Your conversation schema name”, attribute Audience.
Attribute typeThe attribute must be of the String type. Other types are not supported.Not applicable.
Dynamic and static filtersDynamic 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 filtersWhen 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 caseContextOperatorTags on content
Healthcare: answers depend on the caller’s US statestate, set by the bot/IVR or the agentSingle contextOne tag per state
Insurance: show only the right brand’s productbrand AND productMatch AllBrand and product tags
Appliances: a Siemens coffee machine, not all Siemens products are all coffee machinesbrand AND productMatch AllBrand and product tags
Intent-based filtering: “cancel order”, “address change”, “broadband slow”Active IntentSingle contextTag matches exact intent name
Channel and customer typechannel AND customer typeMatch AllChannel and customer type tags
Personal vs corporate banking: near-identical articles that retrieval alone cannot separatecustomer typeSingle contextPersonal, Corporate
Location: Florida vs Europelocation, asked by the bot or chatSingle contextLocation 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.
Note: The does not apply dynamic filters. So, a successful test does not confirm that dynamic filtering is configured correctly. To verify the configuration, test it in a live or test conversation.