Skip to main content
Cloudflare Vectorize is a globally distributed vector database running directly at the edge. Combining Neosantara embeddings (nusa-embedding-0001) with Cloudflare Vectorize enables ultra-low-latency RAG architectures without maintaining self-hosted vector infrastructure.

Quickstart

RAG with ChromaDB

Local and in-memory RAG setup using ChromaDB.

Embeddings Endpoint

Specifications for vector dimensions and input parameters.

Implementation Workflow

1

Environment Prerequisites

Install required Python packages:
Export necessary credentials:
2

Create Vectorize v2 Index

The nusa-embedding-0001 model outputs 768-dimensional vectors. Initialize the index using cosine distance:
3

Vectorize & Ingest (NDJSON)

Cloudflare Vectorize v2 accepts batch ingestion via Newline Delimited JSON (NDJSON). Each record contains an ID, values array, and metadata payload:
4

Query & Grounded Generation

Retrieve semantic matches from Vectorize and pass them into Neosantara’s chat completions API:

Complete Production Script

rag_vectorize_complete.py
Because Cloudflare Vectorize stores metadata payloads alongside each vector record ("metadata": {"text": doc_text}), you do not need an external relational database to resolve vector IDs back to raw document strings.