← All questions
Retrieval & EmbeddingsMedium· Post-filtering· Vector Databases· Search Performance

Why does tenant-scoped search return results for large...

Post-filtering is inefficient and prone to failure because the number of survivors scales with tenant size. If you fetch a fixed K and filter afterward, small tenants are statistically likely to have no results in the top K. Increasing K is not a viable solution as it effectively turns the search into a full scan. Pre-filtering by tenant ensures that the search is performed only within the relevant subset of data.

Code playground (Python)