In this article
The problem
We need an embedding model for our RAG pipeline. The model determines retrieval quality, vector dimensions (affects storage), and API cost.
What we weighed
OpenAI text-embedding-3-small (1536d)
Pros
- +Cheapest OpenAI option ($0.02/1M tokens)
- +Good quality for general text
- +Configurable dimensions (512-1536)
Cons
- โNot best-in-class on MTEB benchmarks
- โVendor lock-in to OpenAI
OpenAI text-embedding-3-large (3072d)
Pros
- +Top-tier quality on MTEB
- +Configurable dimensions
Cons
- โ6.5x more expensive than small variant
- โHigher storage cost (2x dimensions)
Cohere embed-v3
Pros
- +Best multilingual support
- +Input type parameter (search_document vs search_query)
- +Competitive MTEB scores
Cons
- โAdditional vendor dependency
- โLess ecosystem tooling
BGE-large-en-v1.5 (open source)
Pros
- +Free โ self-hosted
- +Strong MTEB benchmarks
- +No vendor dependency
Cons
- โMust host GPU infrastructure
- โOperational overhead for scaling
What we chose
We chose OpenAI text-embedding-3-small with 1536 dimensions. The cost is negligible at our scale (<$5/month), quality is sufficient for our document types (technical articles), and it integrates seamlessly with our existing OpenAI API key. We'll set dimensions to 1024 to reduce storage while maintaining quality.
What it committed us to
- โขVector dimensions set to 1024 in pgvector schema
- โขLocked to OpenAI for embeddings (acceptable โ easy to migrate)
- โขMust re-embed all documents if we switch models
- โขBatch embedding for new content via background job

