---
title: "What is an embedding index?"
description: "An embedding index ranks nearest neighbors for a query and stays attached to the table that owns those rows."
url: "https://www.pixeltable.com/learn/what-is-an-embedding-index"
updated: "2026-09-29"
vertical: "Retrieval"
doc: "https://docs.pixeltable.com/datastore/embedding-index"
---

# What is an embedding index?

An embedding index ranks nearest neighbors for a query and stays attached to the table that owns those rows.

Updated: 2026-09-29
Part of [What is an embedding?](https://www.pixeltable.com/learn/what-is-an-embedding).

## On this page

- [How it works](https://www.pixeltable.com/learn/what-is-an-embedding-index#how-it-works)
- [What it is not](https://www.pixeltable.com/learn/what-is-an-embedding-index#what-it-is-not)
- [Comparison](https://www.pixeltable.com/learn/what-is-an-embedding-index#comparison)
- [Where Pixeltable fits](https://www.pixeltable.com/learn/what-is-an-embedding-index#where-pixeltable-fits)
- [Questions](https://www.pixeltable.com/learn/what-is-an-embedding-index#questions)

## How it works {#how-it-works}


- You name the column and the embedding function.
- New and changed rows are embedded. Unchanged rows stay as they are.
- A similarity query orders rows by distance to the question.

## What it is not {#what-it-is-not}

It is not a standalone vector database you load and sync yourself.

## embedding index: this, and the thing it is confused with {#comparison}

|  | This | Not this |
| --- | --- | --- |
| Lives on | The table that holds the pieces | A second database you copy into |
| When rows change | Those rows are re-embedded | A sync job you operate |
| Query | Nearest rows of that table | Nearest vectors with no source row |

## Where Pixeltable fits {#where-pixeltable-fits}

Pixeltable declares it as __indexes__ = [pxt.EmbeddingIndex(...)] on the class. Insert updates the index for that row.

```python
import pixeltable as pxt
from pixeltable.functions.huggingface import sentence_transformer

TableModel = pxt.model_base()
text_embed = sentence_transformer.using(model_id='all-MiniLM-L6-v2')

class Passages(TableModel, name='passages'):
    text: pxt.String

    __indexes__ = [
        pxt.EmbeddingIndex(text, string_embed=text_embed),
    ]
```

## Questions {#questions}

### How does embedding index work? {#faq-1}

You name the column and the embedding function. New and changed rows are embedded. Unchanged rows stay as they are. A similarity query orders rows by distance to the question.

### What is embedding index often confused with? {#faq-2}

It is not a standalone vector database you load and sync yourself.

## In the blog

- [Pixeltable vs Pinecone: When You Need a Vector Database vs Unified AI Infrastructure](https://www.pixeltable.com/blog/pixeltable-vs-pinecone-vector-database-comparison)
- [Always Fresh: Pixeltable's Automatic Incremental Embedding Indexes](https://www.pixeltable.com/blog/pixeltable-incremental-embedding-indexes)
- [The context architecture for an AI teammate](https://www.pixeltable.com/blog/context-architecture-ai-teammate)
- [Give a Pydantic AI agent memory and read access to your tables](https://www.pixeltable.com/blog/pydantic-ai-harness-pixeltable)
- [Build your own agent trace lake with Pixeltable](https://www.pixeltable.com/blog/build-agent-trace-lake-pixeltable)
- [Give an Agno agent a local knowledge base, with no vector database server](https://www.pixeltable.com/blog/agno-agent-pixeltable-knowledge-base-local-rag)

## How-to guides

- [How do I embed images for search in Python?](https://www.pixeltable.com/learn/how-to/embed-images-for-search)
- [How do I store images with embeddings and serve similarity search?](https://www.pixeltable.com/learn/how-to/serve-image-similarity-search)
- [How do I deduplicate a large image dataset and keep embeddings for near-duplicate search?](https://www.pixeltable.com/learn/how-to/deduplicate-images-with-embeddings)
- [How do I migrate from FAISS to an embedding index on the table?](https://www.pixeltable.com/learn/how-to/migrate-from-faiss)
- [How do I migrate from pgvector to an embedding index on the table?](https://www.pixeltable.com/learn/how-to/migrate-from-pgvector)
- [How do I switch embedding models without a reindex script?](https://www.pixeltable.com/learn/how-to/switch-embedding-models-without-a-reindex-script)

## Related

- [Documentation](https://docs.pixeltable.com/datastore/embedding-index)
- [Always Fresh: Pixeltable's Automatic Incremental Embedding Indexes](https://www.pixeltable.com/blog/pixeltable-incremental-embedding-indexes)
- [Why Your RAG Is Wrong: The Ultimate Guide to Production-Ready Embedding Management](https://www.pixeltable.com/blog/embedding-management-guide)
- [Why AI Teams Are Switching from Vector Databases to Pixeltable for Multimodal Applications](https://www.pixeltable.com/blog/teams-switching-pixeltable-vector-databases)
- [RAG at scale](https://www.pixeltable.com/use-cases/retrieval-augmented-generation-systems)
- [Pixeltable vs Pinecone](https://www.pixeltable.com/compare/pixeltable-vs-pinecone)
- [Pixeltable vs LanceDB](https://www.pixeltable.com/compare/pixeltable-vs-lancedb)
- [Pixeltable vs Weaviate](https://www.pixeltable.com/compare/pixeltable-vs-weaviate)
