---
title: "Matryoshka embeddings"
sidebarTitle: "Matryoshka Embeddings"
description: "Nested, variable-size embeddings with LanceDB and LlamaIndex."
---
A RAG pipeline built on Matryoshka embeddings with LlamaIndex. The embeddings
nest, so one model serves several dimensionalities -- store the full vector and
retrieve with a truncated one when the cheaper comparison is good enough.
This example is a runnable notebook in the
[vectordb-recipes](https://github.com/lancedb/vectordb-recipes) repository rather than a page here.
Run it end to end in the browser.
Read the source.