[Proposal] Multi-Tenant RAG, pgvector Hybrid Search & LLM Streaming Integration #2480
Replies: 2 comments
|
I'm particularly interested in how the multi-tenant isolation is enforced at the database level. For the hybrid search, is For example, if two users have documents with very similar content, could a result from another tenant ever enter either candidate set before RRF/re-ranking? It would also be interesting to see an integration test that explicitly verifies cross-tenant isolation—for example, user A searches for a document that exists only for user B and must receive zero results. That seems especially important for a production RAG implementation because filtering after retrieval/reranking could potentially expose another tenant's document metadata or content. |
|
Hi @brians930617, thank you for the great question! Yes, multi-tenant isolation is enforced strictly at the database query level prior to candidate retrieval, Reciprocal Rank Fusion (RRF), and cross-encoder re-ranking: 1. Database-Level Query IsolationBoth search pipelines apply
|
Uh oh!
There was an error while loading. Please reload this page.
First Check
Example Code
Description
Proposing to add native multi-tenant RAG, pgvector hybrid search, and real-time LLM token streaming to the official full-stack template.
I have implemented and verified this entire pipeline with 90/90 tests passing:
https://github.com/VimalN2005/full-stack-fastapi-template
Key features added:
Operating System
Windows
Operating System Details
Windows 11
Project Version
latest (master)
Python Version
3.10+
Additional Context
All 90/90 pytest tests pass cleanly with zero external API key requirements (deterministic offline embedding fallback included).
Full working fork & architecture documentation:
https://github.com/VimalN2005/full-stack-fastapi-template
All reactions