---
title: "Build semantic search for text"
description: "Create a searchable knowledge base that finds content by meaning, not just keywords."
url: "https://www.pixeltable.com/notebooks/search-semantic-text"
updated: "2026-04-10"
---

# Build semantic search for text

Create a searchable knowledge base that finds content by meaning, not just keywords.

- **Type:** Notebook
- **Group:** Search & Embeddings

## How it works

You add an embedding index to your text column. Pixeltable automatically generates embeddings for each row and enables similarity search.

## What it covers

- Create a text table with embeddings
- Search by semantic similarity
- Combine with metadata filters

## What it uses

- **Install:** `pip install pixeltable sentence-transformers`
- **Pixeltable calls:** `pxt.create_table()`, `insert()`, `add_embedding_index()`, `similarity()`

## A look at the code

```python
# Add embedding index
kb.add_embedding_index(
    column='content',
    string_embed=sentence_transformer.using(model_id='all-MiniLM-L6-v2'),
)
```

## Open it

- **Open in Colab:** https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/howto/cookbooks/search/search-semantic-text.ipynb
- **Docs page:** https://docs.pixeltable.com/howto/cookbooks/search/search-semantic-text
- **Source on GitHub:** https://github.com/pixeltable/pixeltable/blob/release/docs/release/howto/cookbooks/search/search-semantic-text.ipynb
