# Metadata Filtering

> A search that only looks at rows with the right tags, like a date.

**Field:** Artificial Intelligence  
**Category:** Retrieval & Search  
**Also known as:** Vector Search Filters, Filtered Vector Search

## Think of it like

Think of it like you only look in the red boxes. Then you pick the best toy from those.

## Definition

Metadata filtering limits a vector search to rows whose tags match a rule. The rule can be a date, a language or who may see the row. The tags are stored next to each vector. The filter runs before or during the search, so only matching rows can come back. It keeps results fresh and on topic. It is also how many apps stop users from seeing files they have no right to.

## Example

Emma's tool searches only notes from 2026 that belong to the sales team. Older notes and other teams' notes never reach the model.

## Why it matters

Meaning alone cannot tell old from new or yours from someone else's. Tags can.

## Common mistake

Filtering after the top 10 come back. If all 10 fail the filter, you get nothing, though good matches existed.

## Three principles

- **Tags beside vectors.** Date, team, language.
- **Filter, then rank.** Only matches compete.
- **Guards access.** Who may see what.

## Related terms

- [Vector Database](https://learn.benibix.com/term/ai/vector-database)
- [Semantic Search](https://learn.benibix.com/term/ai/semantic-search)
- [Nearest Neighbor Search](https://learn.benibix.com/term/ai/nearest-neighbor-search)
- [Qdrant](https://learn.benibix.com/term/ai/qdrant)

![Six documents with tags for year and team. A filter keeps only those from 2026 and the sales team. Only those are ranked by meaning.](https://learn.benibix.com/diagrams/rt-metadata-filtering.svg)

---

Source: https://learn.benibix.com/term/ai/metadata-filtering
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
