Create a new project
From the Dashboard, go to Projects → New project. Name your project “GoRoute Support”, set the type to Webchat, and select Start from scratch.
Import driver help content
Click Knowledge Base in the left sidebar, then Add data sources. Select Sitemap and paste the URL for the driver help center:Voiceflow will crawl the sitemap and import all pages under this URL. Under the Folder dropdown, click Create folder and name it “Driver”. This keeps your driver content organized and easy to find as your knowledge base grows.Under LLM chunking strategies, enable the following three options:
This metadata tag is what allows you to filter queries later so the agent only retrieves driver-specific content when helping a driver.
- Smart chunking: splits content into logical, topic-based sections, which works well for help articles that cover multiple topics on a single page.
- FAQ optimization: generates sample questions each section could answer, improving retrieval when users phrase things differently than the source content.
- Remove HTML and noise: cleans up messy formatting from web pages so the agent processes clean text.
| Key | Value |
|---|---|
user_type | driver |
Import courier help content
Click Add data sources again. Select Sitemap and paste the courier help center URL:Create a new folder called “Courier” under the Folder dropdown. Then select the same three LLM chunking strategies as before: Smart chunking, FAQ optimization, and Remove HTML and noise. Add the metadata tag:
After both imports finish, your knowledge base will contain content from both help centers. Each article will be tagged based on
| Key | Value |
|---|---|
user_type | courier |
user_type. You can verify this by clicking on a data source and checking its metadata in the right panel. You’ll also notice that each page has been split into multiple chunks based on the sections of the page. This is the LLM chunking strategies at work, breaking content into logical, topic-based pieces so the agent can retrieve more precise answers.Set up the agent
Click the Agent tab. You’ll configure two things here: the Global prompt and the Instructions. The global prompt defines your agent’s personality and applies to every turn. Instructions tell the agent how to route requests to the right skill.In the Global prompt section, define your agent’s identity:Then in the Instructions field, add routing logic. You’ll reference the playbooks you create in the next steps, so come back here to update the skill names if needed:Finally, toggle off the Knowledge base in the System tools section of the sidebar. In this tutorial, you only want the knowledge base queried from inside playbooks where metadata filtering is configured. Leaving it on at the agent level would let the agent query all content without any filtering, which could return the wrong information for the user type.
Create the driver support playbook
In the Agent tab, click + in the Skills panel to create a new playbook. Name it “Driver Support”.Set the LLM description:Then write the playbook instructions:
Add knowledge base filtering to the driver playbook
In the System tools section on the right, enable the Knowledge base tool. Then, click on the tool to expand its settings. Open Advanced query settings, then under Metadata filtering click + to add a filter:
This ensures that when the agent runs the Driver Support playbook, it only retrieves content tagged with
| Key | Value |
|---|---|
user_type | driver |
user_type: driver. Courier content will never appear in the results.Create the courier support playbook
Create another playbook called “Courier Support”.Set the LLM description:Then write the playbook instructions:Then configure metadata filtering on this playbook’s Knowledge base tool. Open Advanced query settings, click + next to Metadata filtering, and this time set the value to
courier:| Key | Value |
|---|---|
user_type | courier |
Test with both user types
Click Run in the top-right corner to test your agent. Try sending these messages to verify routing and filtering are working correctly:Check the conversation logs to confirm:
- The correct playbook was triggered for each user type
- The knowledge base query results only contain content matching the right
user_typemetadata tag - The ambiguous test prompts the agent to ask which user type they are, unless you’ve already mentioned your user type.
Tips for building filtered knowledge bases
- Verify your filtering. Monitor the logs panel while testing and click into the logs labelled
[Agent] knowledge base search completed. You should only see chunks tagged with the correctuser_type. If you see mixed results, double-check your metadata tags on the data sources and the filter configuration in each playbook. - Combine chunking strategies for web content. Smart chunking splits pages into logical sections, FAQ optimization helps match varied user phrasing, and Remove HTML and noise cleans up web formatting. Together, they significantly improve retrieval quality for help center content.
- Scale this pattern. You can add more user types (eg:
user_type: restaurant_partner) by importing more content with new metadata values and creating additional playbooks with the corresponding filters.
What’s next?
You’ve built an agent that serves different content to different user types using metadata filtering. Explore these resources to go deeper.Querying the knowledge base
Advanced configuration for knowledge base queries, including custom queries and query re-writing.
Knowledge base API
Programatically import data into your knowledge base, ensuring it always stays up to date.