Discussion about this post

User's avatar
Abhishek Pan's avatar

If the vector store is pgvector, RLS on the embeddings table still works, but the policy filter runs after the HNSW scan. pgvector's README says a filter matching 10% of rows returns about 4 results on average with the default hnsw.ef_search of 40, so a small tenant's agent quietly gets near-empty context. Turn on hnsw.iterative_scan, or give your biggest tenants their own partial index.

1 more comment...

Ready for more?