vai logo
vai
Use CasesShared SpaceDocs
Get Started
Getting Started
Embeddings
Matryoshka

What Is an Embedding?

Start from first principles: generate a Voyage embedding, inspect its shape, and compare full-size versus Matryoshka-reduced vectors.

API key
View Source TapeOpen Docs
Prerequisites

A valid VOYAGE_API_KEY is set in the environment.

Under the hood

See the exact VAI command, the matching Voyage AI layer, and the MongoDB query shape behind the demo.

vai embed 'MongoDB Atlas makes vector search production-ready'

The demo starts with the smallest useful mental model: one sentence in, one embedding out. The follow-up dimensions example shows how you can cut storage with Matryoshka-style reduction while preserving the semantic task.

Share or copy this demo

Keep it lightweight. The prepared text stays behind the buttons.

Open canonical URL

Share

Copy

LinkedIn opens the share dialog and copies the prepared text so you can paste it in quickly.

Exact commands

The full walkthrough is included here so anyone can replay the demo exactly as published.

$vai explain embeddings
$vai embed 'MongoDB Atlas makes vector search production-ready'
$echo '=> 1024 floats. Each dimension encodes a slice of semantic meaning.'
$vai embed 'MongoDB Atlas makes vector search production-ready' --dimensions 512
$echo '=> 512 dims: same meaning, half the storage cost (Matryoshka RLR)'

Related demos

More shareable workflows from the same VAI demo library.

Embeddings
Retrieval
Document vs Query Embeddings

Show why input type matters by embedding the same sentence as both a document and a query, then validating the semantic overlap with similarity.

API key

VAI command

vai embed 'Vector search finds semantically similar content' --input-type query

Show Under the Hood

Prerequisites

A valid VOYAGE_API_KEY is set in the environment.

View DemoSource
Getting Started
Embeddings
Featured
CLI Quickstart For Embeddings

Walk through the core vai embedding commands: model discovery, embedding generation, explainers, and similarity.

API key

VAI command

vai embed "What is MongoDB Atlas?"

Show Under the Hood

Prerequisites

A valid VOYAGE_API_KEY is set in the environment.