# Cloudflare Vectorize
[[Cloudflare]] Vectorize is a globally-distributed vector database for embeddings, designed to pair with [[Cloudflare Workers AI]] for RAG (Retrieval-Augmented Generation) and semantic search workloads. Indexes store dense vectors with optional metadata; queries return the top-K nearest neighbors via cosine, Euclidean, or dot-product distance.
It's the "V" in Cloudflare's AI stack: ingest text → embed with Workers AI → store in Vectorize → query at request time → augment LLM prompts. Same edge-native runtime characteristics as the rest of the platform: bound directly from a Worker, no separate connection pool, no cold starts.
## Why It Matters
Building RAG without a managed vector DB means running Pinecone, Weaviate, Qdrant, or pgvector — extra infra, extra latency, extra bill. Vectorize collapses all of that into a Worker binding. For Cloudflare-native AI apps, it's the lowest-friction option.
If you'd rather not build the pipeline at all, Cloudflare's managed RAG service, [[Cloudflare AI Search|AI Search]] (formerly AutoRAG; its binding replaced the old `env.AI.autorag()` API), went GA on October 1, 2026. It handles ingestion, storage, embeddings, reranking and hybrid search (vector plus full-text, on by default) for you; usage billing starts November 1, 2026. Vectorize stays the lower-level option when you want control over the index.
## Common Use Cases
- **Semantic search** over documents, products, code
- **RAG** for chatbots and assistants (embed → retrieve → prompt)
- **Recommendations** based on embedding similarity
- **Deduplication** and clustering of unstructured content
- **Personalization** — user-preference vectors matched against item vectors
## Limits Worth Knowing
- Max vector dimensions: 1536 (covers OpenAI ada-002, BGE, most common models)
- Max vectors per index: 20M since August 4, 2026 (10M in January, 5M before that)
- topK: up to 50 results with values or metadata (since March 2026), 100 without
- Metadata filtering supported at query time (up to 10 metadata indexes per index)
- Free tier: 30M queried and 5M stored vector dimensions per month
- Paid: 50M queried dimensions included, then $0.01 per million; 10M stored dimensions included, then $0.05 per 100 million
## References
- Vectorize home: https://developers.cloudflare.com/vectorize/
- Workers AI tutorials (RAG included): https://developers.cloudflare.com/workers-ai/guides/tutorials/
- Limits: https://developers.cloudflare.com/vectorize/platform/limits/
- Pricing: https://developers.cloudflare.com/vectorize/platform/pricing/
- Changelog, topK raised to 50 (2026-03-16): https://developers.cloudflare.com/changelog/post/2026-03-16-topk-limit-increased-to-50/
- Changelog, 20 million vectors per index (2026-08-04): https://developers.cloudflare.com/changelog/post/2026-08-04-index-capacity-20-million/
- Changelog, AI Search namespace bindings replace `env.AI.autorag()` (2026-04-16): https://developers.cloudflare.com/changelog/post/2026-04-16-ai-search-namespace-binding/
- Changelog, AI Search GA (2026-10-01): https://developers.cloudflare.com/changelog/post/2026-10-01-ai-search-generally-available/
## Related
- [[Cloudflare]]
- [[Cloudflare Workers]]
- [[Cloudflare Workers AI]]
- [[Cloudflare AI Search]]
- [[Cloudflare D1]]
- [[Cloudflare R2]]
- [[Cloudflare Agents SDK]]
- [[Retrieval-Augmented Generation (RAG)]]
- [[Wrangler]]