A powerful, unified Ruby client for vector databases. Build AI-powered search, RAG applications, and recommendation systems with a single, elegant API.
Trusted by Ruby developers
Switch between Pinecone, Qdrant, Weaviate, or pgvector with a single line change. No vendor lock-in.
Built for Ruby 3.2+ with comprehensive test coverage (95%+), retry logic, and circuit breakers.
Grafana dashboard, Prometheus metrics, and native instrumentation for Datadog and New Relic. Track latency, throughput, and errors.
Seamless ActiveRecord integration with has_vector DSL and automatic migration support.
Built-in retry logic with exponential backoff, jitter, and intelligent error recovery.
Extensive YARD documentation, comprehensive examples, and detailed provider guides.
See how Vectra compares to other Ruby vector database clients
| Feature | Vectra | Langchain.rb | pgvector-ruby | qdrant-ruby |
|---|---|---|---|---|
| Multi-Provider Support | โ 5 providers | โ ๏ธ 6+ (fragmented) | โ PostgreSQL only | โ Qdrant only |
| Unified API | โ Single interface | โ Provider-specific | โ N/A | โ N/A |
| Circuit Breaker | โ Built-in | โ Manual | โ Manual | โ Manual |
| Rate Limiting | โ Token bucket | โ Manual | โ Manual | โ Manual |
| Retry Logic | โ Exponential backoff | โ Manual | โ Manual | โ ๏ธ Basic |
| Instrumentation | โ 4 backends | โ None | โ None | โ None |
| Connection Pooling | โ Built-in | โ Manual | โ ๏ธ Via pg gem | โ Manual |
| Caching Layer | โ TTL + LRU | โ Manual | โ Manual | โ Manual |
| Health Checks | โ 3 methods | โ Manual | โ Manual | โ Manual |
| Rails Integration | โ has_vector DSL | โ Via langchainrb_rails | โ ๏ธ Manual setup | โ ๏ธ Manual setup |
| Query Builder | โ Chainable API | โ None | โ None | โ None |
| Batch Operations | โ With progress | โ ๏ธ Basic | โ Manual | โ ๏ธ Basic |
| Hybrid Search | โ 4 providers | โ Not documented | โ Manual SQL | โ ๏ธ Via API |
| Vector Normalization | โ L2/L1 helpers | โ Manual | โ Manual | โ Manual |
| Testing Support | โ Mock provider | โ Manual mocking | โ Test DB | โ Test server |
| Dimension Validation | โ Automatic | โ Manual | โ Manual | โ Manual |
| Error Handling | โ 10 error types | โ ๏ธ Basic | โ ๏ธ Basic | โ ๏ธ Basic |
| Audit Logging | โ Built-in | โ Manual | โ Manual | โ Manual |
| Credential Rotation | โ Zero-downtime | โ Manual | โ Manual | โ Manual |
| Test Coverage | โ 95%+ | โ ๏ธ Not disclosed | โ ๏ธ Not disclosed | โ ๏ธ Not disclosed |
Legend: โ Full Support | โ ๏ธ Partial/Limited | โ Not Available
See the difference at a glance
Vectra scores 100% across all production readiness dimensions
What makes Vectra the best choice for Ruby developers
Find the right tool for your needs
Choose your vector database. We handle the rest.
Fully managed vector database in the cloud. Perfect for production workloads with minimal ops.
View GuideOpen-source vector database with advanced filtering. Self-host or use Qdrant Cloud.
View GuideAI-native vector database with built-in vectorizers and GraphQL API.
View GuideVector similarity search in PostgreSQL. Use your existing database infrastructure.
View GuideReal-world patterns for common use cases
Semantic product search with filters for category, price, and availability
Combine semantic understanding with exact keyword matching
Namespace isolation per tenant with a single index
Retrieve relevant context chunks for LLM integration
Zero-downtime migration between providers
Find similar items based on user behavior
Get up and running in minutes
require 'vectra'
# Initialize any provider with the same API
client = Vectra::Client.new(
provider: :pinecone, # or :qdrant, :weaviate, :pgvector
api_key: ENV['API_KEY'],
host: 'your-host.example.com'
)
# Store vectors with metadata
client.upsert(
vectors: [
{
id: 'doc-1',
values: [0.1, 0.2, 0.3, ...], # Your embedding
metadata: { title: 'Getting Started with AI' }
}
]
)
# Search by similarity
results = client.query(
vector: [0.1, 0.2, 0.3, ...],
top_k: 10,
filter: { category: 'tutorials' }
)
results.each do |match|
puts "#{match['id']}: #{match['score']}"
end
# Hybrid search (semantic + keyword)
results = client.hybrid_search(
index: 'docs',
vector: embedding,
text: 'ruby programming',
alpha: 0.7 # 70% semantic, 30% keyword
)