Vector Stores
Configure where RAGaaS stores your document embeddings for semantic search and hybrid search.
Overview
Vector stores are specialized databases that enable semantic search or hybrid search in RAGaaS by storing and searching through document embeddings. They allow you to:
- Find semantically similar content quickly
- Support hybrid search (combining semantic and keyword matching)
- Filter results using metadata
In RAGaaS, vector stores are configured at the namespace level. Currently, we support Pinecone Serverless as the vector store provider.
How They Work
When you use RAGaaS, the vector store plays a key role in the search process:
-
Document Processing
- Your documents are split into chunks
- Each chunk is converted into a vector (embedding) that captures its meaning
- Vectors and metadata are stored in your vector database
-
Search Flow
- When you search, your query is converted to a vector
- The vector store finds chunks with similar vectors
- For hybrid search, it also looks for keyword matches
- Results are ranked by similarity and returned
This process enables RAGaaS to:
- Find content based on meaning, not just exact matches
- Return relevant results even with different wording
- Combine semantic understanding with keyword precision
- Scale efficiently as your content grows
Setup & Configuration
Index Requirements
-
Metric Type
- Must use
dotproduct
metric type for hybrid search - Can use any metric type like
cosine
,dotproduct
, etc. for semantic search - Must be set during index creation
- Cannot be changed after creation
- Must use
-
Vector Dimensions Must match your chosen embedding model:
- OpenAI
text-embedding-3-small
: 1536 dimensions - OpenAI
text-embedding-3-large
: 3072 dimensions - OpenAI
text-embedding-ada-002
: 1536 dimensions - Cohere
embed-multilingual-v3.0
: 1024 dimensions - Cohere
embed-english-light-v3.0
: 384 dimensions - Cohere
embed-multilingual-light-v3.0
: 384 dimensions - Jina
jina-embeddings-v3
: 1024 dimensions
- OpenAI
Namespace Configuration
Configure your vector store when creating a namespace:
{
"vectorStorageConfig": {
"provider": "PINECONE",
"apiKey": "your-pinecone-api-key",
"indexHost": "your-index-host"
}
}
The index dimensions and metric type cannot be changed after creation. Choose carefully based on your needs.
Hybrid Search
Hybrid search combines semantic search with keyword matching for better results.
Configuration
{
"searchConfig": {
"type": "HYBRID",
"hybridConfig": {
"semanticWeight": 0.7, // Range: 0.0 to 1.0
"keywordWeight": 0.3 // Range: 0.0 to 1.0
},
"minScore": 0.7, // Minimum similarity score
"limit": 10 // Number of results to return
}
}
The semanticWeight
controls the balance between semantic and keyword matching:
- 0.7 = 70% semantic + 30% keyword matching
- Higher values favor semantic search
- Lower values favor keyword matching
- Default is 0.7 which works well for most cases
Common Errors
- Dimension Mismatch
{
"error": "DIMENSION_MISMATCH",
"message": "Vector dimensions (1024) do not match index dimensions (1536)",
"details": {
"expected": 1536,
"received": 1024
}
}
- Invalid Configuration
{
"error": "INVALID_CONFIG",
"message": "Index metric type must be 'dotproduct' for hybrid search",
"details": {
"current": "cosine",
"required": "dotproduct"
}
}