codbeast420
codbeast4205w ago

VoiceFlow Knowledge Base Tagging

Does anyone know how to tag documents in the knowledge base on Voiceflow, so that different agent steps on the canvas only retrieve information from specific knowledge base documents?
1 Reply
Tico | Voiceflow Assistant
How to tag KB documents 1. Create the tag (once)
POST https://api.voiceflow.com/v3alpha/knowledge-base/tags
{
"label": "billing"
}
POST https://api.voiceflow.com/v3alpha/knowledge-base/tags
{
"label": "billing"
}
The response returns tagID you’ll use next. 2. Add the tag when you upload a file (fastest way)
POST /v3alpha/knowledge-base/docs/upload
{
"name": "Refund-Policy.pdf",
"type": "file",
"tags": ["billing"] // <-- add one or several labels here
}
POST /v3alpha/knowledge-base/docs/upload
{
"name": "Refund-Policy.pdf",
"type": "file",
"tags": ["billing"] // <-- add one or several labels here
}
…or attach it later:
POST /v3alpha/knowledge-base/docs/{documentID}/tags/attach
{
"tags": ["billing"]
}
POST /v3alpha/knowledge-base/docs/{documentID}/tags/attach
{
"tags": ["billing"]
}
(Use /detach to remove a label.)
July 2025: the standalone Tags API is being sunset. The same filters keep working, you just add your labels in the metadata field when you upload a document.
--- Making an Agent step look at only those tagged docs 1. Drop an Agent step on the canvas → toggle Knowledge Base ON. 2. Open AdvancedFilters (right panel). 3. In Include tags add billing (or whatever labels you used). You can list several and choose the operator AND/OR. 4. (Optional) put anything you don’t want in Exclude tags. At runtime the agent’s KB query will now be equivalent to:
{
"query": "user question …",
"filters": {
"tags": { "include": {"items": ["billing"], "operator": "or"} }
}
}
{
"query": "user question …",
"filters": {
"tags": { "include": {"items": ["billing"], "operator": "or"} }
}
}
Repeat with different labels/filters for each Agent step. This lets one assistant share a single Knowledge Base while separate steps retrieve only the chunks you intend. Docs: https://docs.voiceflow.com (→ Knowledge Base › Tags & Filtering)

Did you find this page helpful?