Adding Metadata to Files in Agent KB
Is there a way to add metadata to a file when uploading to the knowledgebase in the agent settings instead of going to the docs and making a curl request?
1 Reply
At the moment the Creator UI (Agent > Knowledge Base) only lets you drag-and-drop or select a file/URL – it doesn’t expose the metadata field.
If you want the document’s chunks to carry metadata (so you can filter them later in a KB Query) you need to upload the file through one of the external options: • REST API – POST /v1/knowledge-base/docs/upload with a multipart part named metadata. • voiceflow-cli – the
If you want the document’s chunks to carry metadata (so you can filter them later in a KB Query) you need to upload the file through one of the external options: • REST API – POST /v1/knowledge-base/docs/upload with a multipart part named metadata. • voiceflow-cli – the
voiceflow kb upload
command accepts a --metadata
flag so you can script it in CI.
Once the file is re-uploaded with metadata, those key–value pairs are stored on every resulting chunk and can be used in the filters
object of a KB Query.
Docs for reference:
https://developer.voiceflow.com/v2.0/docs/advanced-knowledge-base#inserting-metadata-to-data-sources
https://developer.voiceflow.com/reference/post_v1-knowledge-base-docs-upload