2 Comments
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.

Raul Junco's avatar

I’ve seen teams blame the prompt for weeks over stuff like this. Thanks for adding it.