← Blog

Vector search needs metadata filters before similarity, not after

Amazon S3 Vectors adds metadata pre-filtering so multi-tenant RAG and agent retrieval can enforce scope first — improving recall on selective queries without re-ingesting data.

Data EngineeringLLM OpsAI Security

Post-filter vector search has always been a quiet failure mode: the engine finds nearest neighbors globally, then discards most of them because they fail tenant, ACL, or document-type constraints — burning recall and compute together.

AWS announced immediate availability of metadata pre-filtering for Amazon S3 Vectors. Filters evaluate before similarity search, so scoped datasets — multi-tenant RAG corpora, agent knowledge partitions, regulated document classes — can be searched with higher recall on selective queries. AWS cites up to 5× better recall on those selective patterns, with no re-ingestion, no extra cost, and no query-syntax rewrite. For architects, that is the difference between “filter in the app and hope” and “isolation enforced in the retrieval plane.”

Implications for RAG and agent retrieval design:

  • Prefer engines that pre-filter on tenant, sensitivity, and document class before ANN
  • Stop proliferating one physical index per tenant when metadata constraints can enforce isolation
  • Treat retrieval policy as a security control — not a prompt instruction

Agents retrieve whatever the vector path allows. Putting authorization and tenancy ahead of similarity is how enterprises keep semantic search useful without weakening data boundaries.