Infrastructure Setup
Set up your cloud infrastructure to power your RAG applications with RAGaaS.
Overview
RAGaaS follows a privacy-focused architecture where you maintain complete control over your data infrastructure. This guide will help you set up and configure the required components:
- Document Storage: Where your processed documents and content are stored
- Vector Database: Where embeddings are stored for semantic search and hybrid search
- Embedding Model: Which model to use for generating embeddings
While the setup process requires some initial configuration, RAGaaS handles all the operational complexity once configured.
File Storage Setup
Your file storage is where RAGaaS stores processed content, chunks, and metadata. We support any S3-compatible storage service, giving you flexibility in your choice of provider.
Choosing a File Storage Provider
Here's a comparison of supported providers to help you choose:
- Name
Cloudflare R2 (Recommended)
- Description
- Free egress (no data transfer costs) - Simple setup process - Global availability - S3-compatible API
- Name
AWS S3
- Description
- Extensive features - Global infrastructure - Integration with AWS services
- Pay for egress
- Name
Google Cloud Storage
- Description
- Strong performance - Global infrastructure - Integration with GCP - Pay for egress
- Name
MinIO
- Description
- Self-hosted option - Complete control - Open-source - Requires maintenance
Setting Up Cloudflare R2 (Recommended)
Follow these steps to set up your storage with Cloudflare R2:
-
Create a Bucket
- Log in to your Cloudflare Dashboard
- Navigate to R2 from the sidebar
- Click "Create Bucket"
- Choose a unique name (e.g., "ragaas-docs-acmecorp")
- Select your preferred region
-
Generate API Credentials
- Go to R2 > API > Manage API Tokens
- Click "Create API Token"
- Select "Object Read & Write" permissions
- Click "Create API Token"
- Note down the endpoint URL, Access Key ID, and Secret Access Key
-
Configure Your Namespace
{ "fileStorageConfig": { "provider": "S3_COMPATIBLE", "bucket": "your-bucket-name", "endpoint": "your-endpoint-url", "credentials": { "accessKeyId": "your-access-key-id", "secretAccessKey": "your-secret-access-key" }, "region": "auto" } }
Alternative File Storage Setup
If using a different S3-compatible provider:
- Create a bucket in your chosen provider
- Generate API credentials with read/write permissions
- Use the same configuration structure, updating:
endpoint
with your provider's S3 endpointregion
with your chosen regioncredentials
with your provider's keys
Vector Database
The vector database stores embeddings for semantic search or hybrid search. Currently, we support Pinecone, with more options coming soon like Qdrant, Chroma, and more.
Pinecone Setup Guide
-
Create a Pinecone Account
- Sign up at Pinecone
- Free tier available for development
- Choose Starter plan for production
-
Create an Index
- Click "Create Index"
- Choose a descriptive name (e.g., "ragaas-acmecorp")
- Select "Serverless" for automatic scaling
- Choose your preferred cloud provider and region
-
Configure Index Settings Choose dimensions based on your embedding model:
Model Dimensions Best For OpenAI text-embedding-3-small 1536 Most use cases, good balance OpenAI text-embedding-3-large 3072 Highest accuracy, higher cost Cohere embed-english-v3.0 1024 English-focused, cost-effective Cohere embed-multilingual-v3.0 1024 Multilingual, best for non-English Jina jina-embeddings-v3 1024 Best for long documents -
Choose Metric Type
- Use "dotproduct" if you need hybrid search (recommended)
- Use "cosine" if you only need semantic search
The metric type cannot be changed after creation. Choose "dotproduct" if unsure, as it supports both search types.
-
Get Your Credentials
- Save your index host URL
- Create an API key from "API Keys" section
- Store both securely
-
Configure Your Namespace
{ "vectorStorageConfig": { "provider": "PINECONE", "apiKey": "your-pinecone-api-key", "indexHost": "your-index-host" } }
Troubleshooting
Common Storage Issues
Access Denied
- Verify API token has correct permissions
- Check bucket name matches exactly
- Confirm endpoint URL is correct
- Validate credentials are active
Vector Database Issues
Dimension Mismatch
- Verify index dimensions match model dimensions
- Check embedding model configuration
- Note: Cannot change after creation
- Create new index if needed
Hybrid Search Not Working
- Verify index uses "dotproduct" metric type
- Note: "cosine" metric type only supports semantic search
- Cannot change metric type after creation
- Create new index with "dotproduct" if needed
Getting Help
You can contact support at [email protected] and we'll help you get set up.