How Semantic Search Works
Embeddings on write keep your content in sync in a vector index, while each search embeds your query and runs a vector search scoped to your bucket.
How Semantic Search Works
Embeddings on write
When Content RAG is enabled for your account, Cosmic embeds each object's searchable text (title, slug, content, and text-like Metafields) into a vector index and keeps it in sync as you create, edit, publish, unpublish, and delete content. Embedding your content is free; it does not consume AI tokens.
Search at query time
Each ai/search call embeds your query and runs a vector search scoped to your bucket. Query-time usage is metered through the standard AI token system.
Getting started
Content RAG is in Beta. New projects and workspaces have it on by default. For existing ones, an admin or manager can turn it on under Settings → Semantic search (project or workspace settings); existing content is indexed automatically in the background.