Build semantic search for text
Create a searchable knowledge base that finds content by meaning, not just keywords.
Updated Open in Colab
Generate vector embeddings for text data to enable semantic search and similarity matching.
Search & Embeddings · Notebook · Updated
Colab runs it in your browser. If it calls a model provider, it asks for that provider's API key in a cell.
You add an embedding column that automatically generates vectors for new rows. The embeddings are cached and only recomputed when the source text changes.
pip install pixeltable openai
OPENAI_API_KEYopenai.embeddings()pxt.create_table()add_computed_column()insert()add_embedding_index()similarity()# Add embedding column using OpenAI's text-embedding-3-smalldocs.add_computed_column(embedding=embeddings(docs.content, model='text-embedding-3-small'))
One cell of the notebook, copied as it is. Open it in Colab for the rest.
Create a searchable knowledge base that finds content by meaning, not just keywords.
Build visual similarity search to find images that look alike using OpenAI's CLIP model.