Documentation Index
Fetch the complete documentation index at: https://docs.poly.ai/llms.txt
Use this file to discover all available pages before exploring further.
This page requires Python familiarity. It covers disabling Managed Topics from Python functions so they are excluded from retrieval for the rest of the conversation.
conv.disable_kb_topics() when you need to deterministically prevent the agent from matching certain topics – for example, when an upstream IVR has already handled a flow, the caller is in a context where some answers are not applicable, or a client request requires hiding a topic from the agent without editing the knowledge base.
Previously this could only be approximated through prompting. Disabling topics from a function gives you a reliable, deterministic way to scope the agent’s knowledge mid-conversation.
Set and clear disabled topics using:
conv.disable_kb_topics()– hide one or more topics from retrievalconv.clear_disabled_kb_topics()– re-enable topics that were previously disabled
How it behaves
Persists across turns
Topics disabled withconv.disable_kb_topics() stay disabled for the rest of the conversation. They continue to be excluded until you:
- call
conv.clear_disabled_kb_topics(), or - call
conv.disable_kb_topics()again with a new list (the new list replaces the previous one).
Excluded everywhere RAG runs
Disabled topics are removed from:- The list of topics shown to the LLM in the system prompt.
- Retrieval results used to ground the response.
- The function/tool list exposed to real-time (speech-to-speech) agents.
Combines with channel exclusions
Disabled topics are merged with any topics already excluded for the current channel (configured under Channels). A topic is hidden if it is excluded by either mechanism.When to use this
Useconv.disable_kb_topics() when:
- An external IVR has already handled an intent and you do not want the agent to repeat it.
- The caller’s account or segment should not see certain topics (for example, a “cancellations” topic for a non-cancellable plan).
- A client requests temporary suppression of a topic without changing the knowledge base.
- You want to scope retrieval to a subset of topics for a specific part of the conversation.
conv.disable_kb_topics()
Disables one or more Managed Topics for the current conversation.Parameters
topics (list of strings)
A list of Managed Topic names to disable. Names must match the topic names configured under Build > Knowledge > Managed Topics. Callingconv.disable_kb_topics() replaces any previously disabled list. To add to the existing list, include the previous names alongside the new ones.

