# 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.
## 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: 5M (Standard), more on enterprise
- Metadata filtering supported at query time
- Free tier: 30M queried vector dimensions/month
## References
- Vectorize home: https://developers.cloudflare.com/vectorize/
- RAG tutorial: https://developers.cloudflare.com/workers-ai/tutorials/
## Related
- [[Cloudflare]]
- [[Cloudflare Workers]]
- [[Cloudflare Workers AI]]
- [[Cloudflare D1]]
- [[Cloudflare R2]]
- [[Wrangler]]