Knowledge Base Metadata

Filter when searching a Knowledge Base

Metadata is additional information attached to your Knowledge Base files that you can filter on when searching, similar to filtering columns in a spreadsheet.

spinner

Types of Metadata

Standard Metadata

Automatically inherited from the source (file name, source URL, upload date, etc.). Standard metadata is read-only. To update it, make changes at the source and re-sync.

Custom Metadata

Tag Knowledge Base files with your own key-value pairs to organize and filter content by dimensions like Region, Product, Audience, or Content Type.

circle-check

Adding Metadata

Custom Metadata (UI)

  1. Click any file in your Knowledge Base to open its details

  2. In the Custom Metadata section, click Add

  3. Enter a Key (e.g., "country") and Value (e.g., "France")

  4. Click Save Changes

CSV / Google Sheets

When uploading a CSV or Google Sheet, all columns are stored as metadata. You can choose which columns are searchable. The rest are still returned as metadata but can only be used for filtering.

Other Methods

Filtering with Metadata

Use metadata filters in your Workflow Knowledge Base steps to scope your search results.

Example: If you have case studies tagged with a country key, add a filter in your Search Knowledge Base or Get Knowledge Base File step where country equals "Spain" to retrieve only Spanish case studies.

circle-info

Dynamic Filtering: Use workflow inputs for flexible filtering. Set your filter to country equals {{input.region}}, then pass different region values at runtime.

For detailed filtering examples, see the Knowledge Base Search Step documentation.

Filter Operators (Code Editor)

For complex filters, use MongoDB query operators:

Operator
Description

$eq

Equal to

$ne

Not equal to

$gt / $gte

Greater than / Greater than or equal

$lt / $lte

Less than / Less than or equal

$in / $nin

In array / Not in array

circle-info

For list metadata like "genres": ["thriller", "mystery"], the search matches any value in the list.

Filtering via API

You can also filter using the Knowledge Bases API "Search" endpoint.

spinner

Best Practices

  • Use consistent keys - Standardize key names (always "country", not sometimes "region") and value formats (always "United States", not "US" or "USA")

  • Plan your strategy - Decide what dimensions you need to filter by before tagging content

  • Custom metadata vs. Grids - Use custom metadata for file-level tagging; use Grids for row-level tagging of structured data

Last updated

Was this helpful?