Introduction The pool pattern is a shared infrastructure approach in which all tenants use the same Amazon Bedrock knowledge base, the same S3 bucket, and the same vector database. Instead of creating independent resources per client, resources are centralized and separation is maintained through metadata applied to each document.
Core concept In the pool pattern, everyone shares a single S3 bucket for documents, a single Knowledge Base for processing, and a single vector database such as Pinecone or AWS OpenSearch. Separation between clients is achieved exclusively through metadata filtering that identifies userId and agentId.
Step 1 Documents and metadata When uploading a document, two related files are stored in S3: the original document and an associated metadata.json file containing attributes such as userId, username, agentId, file name, and upload date. This metadata.json is essential for the system to isolate each client's information within the shared infrastructure.
Step 2 Ingestion into the Knowledge Base All documents are processed with the same Knowledge Base: they are fragmented following the same chunking criteria, embeddings are generated with the same embedding model, and they are indexed in the vector database along with the metadata. This maintains consistency in semantic search and vector storage.
Step 3 Queries with filtering When a user makes a query, semantic search applies filters in the vector database using metadata fields such as userId and agentId. This ensures that the returned result belongs only to the authorized tenant and agent, preventing User A from seeing User B's documents.
Simplified visual flow 1 Document upload creates S3 object and metadata.json 2 Ingestion by the Knowledge Base processes both files 3 Vectors stored in the vector database with userId and agentId 4 User query applies filter and only returns authorized documents.
Implementation details Agents Each user can create multiple agents with their own name and description. All agents can reference the shared Knowledge Base and the common data source, but queries and content remain isolated by metadata. This facilitates the management of personalized assistants without replicating infrastructures.
Multi-model support Although the Knowledge Base and vector index are shared, each session or agent can select different AI models for response generation, for example Claude, Mistral, Titan, or Amazon Bedrock models, allowing AI flexibility for businesses without sacrificing operational efficiency.
User registration and onboarding Onboarding is immediate: upon registration, the user receives permissions to use the shared infrastructure and limits are applied according to their plan, such as maximum number of agents, maximum number of documents, and monthly messages. This simplifies startup and reduces time-to-value for the client.
Advantages Cost efficiency by centralizing the Knowledge Base for hundreds of tenants, simple onboarding without per-client configurations, flexibility to choose artificial intelligence models, and security based on metadata filtering that provides effective isolation between clients.
Critical success factor The metadata.json file is essential. Without this file, documents cannot be filtered by tenant and data separation is compromised. It is mandatory to ensure that each document has its metadata.json with correct userId and agentId fields to maintain the integrity of the multi-tenant system.
Security and compliance considerations Implementing access control, encryption at rest and in transit, access auditing, and retention policies helps strengthen the security of the pool pattern. Complementing with cybersecurity practices and continuous monitoring reduces risks and improves client trust.
Real-world applications This approach is ideal for AI agent platforms, semantic document management, and multi-tenant RAG systems that require personalized responses per client. It allows integrating AWS and Azure cloud services, business intelligence solutions, and tools such as Power BI to enrich analysis and reporting.
About Q2BSTUDIO Q2BSTUDIO is a custom software and application development company specialized in artificial intelligence, cybersecurity, and AWS and Azure cloud services. We offer custom software, custom applications, and business intelligence services that include AI implementations for businesses, AI agent construction, and Power BI dashboards. Our experience allows us to design secure and scalable solutions that combine custom development, AI model integration, and best practices in cybersecurity.
Keywords and positioning custom applications, custom software, artificial intelligence, cybersecurity, AWS and Azure cloud services, business intelligence services, AI for businesses, AI agents, Power BI are an integral part of our solutions and of Q2BSTUDIO's approach to driving projects with high differential value.
Conclusion The pool pattern is an efficient and scalable alternative for multi-tenant RAG when designed with rigorous metadata, security controls, and good ingestion and query practices. At Q2BSTUDIO, we can help implement this architecture, optimize costs, and ensure isolation between clients while leveraging the best of artificial intelligence and cloud services.




