---
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://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://pixeltable.com/learn/what-is-an-embedding).

## On this page

- [How it works](https://pixeltable.com/learn/what-is-an-embedding-index#how-it-works)
- [What it is not](https://pixeltable.com/learn/what-is-an-embedding-index#what-it-is-not)
- [Comparison](https://pixeltable.com/learn/what-is-an-embedding-index#comparison)
- [Where Pixeltable fits](https://pixeltable.com/learn/what-is-an-embedding-index#where-pixeltable-fits)
- [Questions](https://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://pixeltable.com/blog/pixeltable-vs-pinecone-vector-database-comparison)
- [Always Fresh: Pixeltable's Automatic Incremental Embedding Indexes](https://pixeltable.com/blog/pixeltable-incremental-embedding-indexes)
- [VideoRAG: Where Pixeltable Stores Frames and Indexes](https://pixeltable.com/blog/videorag-where-pixeltable-stores-indexes)
- [ClipFinder: Natural-Language Video Moment Search in One app.py](https://pixeltable.com/blog/clipfinder-semantic-video-moment-search)
- [I Vibe-Coded a Google Photos Clone in an Hour. Then I Tried Deploying It to AWS.](https://pixeltable.com/blog/i-vibe-coded-google-photos-clone-then-tried-aws)
- [Make Building Multimodal AI Apps Dead Simple: What That Actually Requires](https://pixeltable.com/blog/dead-simple-multimodal-ai-what-it-takes)

## Related

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