Metadata Filtering
Also called Filtered Search
Narrowing a vector search by plain attributes — date, author, tenant — before or during the similarity match.
Think of it like
Telling the librarian "only books from this decade" before asking which is most relevant.
Example
A support bot retrieves only docs tagged for the customer’s product tier, so a free user never sees enterprise-only answers.
How it actually works
Embeddings capture meaning but not hard facts like "belongs to org 42" or "published after 2024". Metadata filters attach those as structured fields and restrict the candidate set. The tricky part is when filtering happens: pre-filtering is precise but can starve the index, while post-filtering is fast but may throw away most of your top-k before you get enough matches.
For product teams
It is how one shared search index safely serves many customers, permissions, and freshness rules.
For engineers
Boolean predicates over payload fields, applied pre- or post-ANN; pre-filtering interacts badly with graph indexes if selectivity is high.
Related
- Vector Similarity — Combines with vector similarity inside the store.
- Vector database — Runs inside the vector database.
Read anything AI without the jargon
Look up any term in plain English, or save terms as you read with the free Chrome extension.
Open DecoderAdd to Chrome