Working with Jina AI in Pixeltable

Pixeltable's Jina AI integration enables you to access state-of-the-art embedding and reranker models via the Jina AI API.

Providers · 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.

What it covers

  • Text Embeddings
  • Multilingual Embeddings
  • Embedding Index for Similarity Search
  • Reranking
  • Learn More

What it uses

Install
terminal
pip install pixeltable
Environment variables it names
JINA_API_KEY
Pixeltable calls
jina.embeddings()jina.rerank()pxt.create_table()add_computed_column()insert()add_embedding_index()similarity()

A look at the code

working-with-jina.ipynb
from pixeltable.functions import jina
# Create a table for document embeddings
docs_t = pxt.create_table('jina_demo.documents', {'text': pxt.String})
# Add computed column with Jina embeddings
# task='retrieval.passage' optimizes embeddings for documents to be searched
docs_t.add_computed_column(
embedding=jina.embeddings(
docs_t.text, model='jina-embeddings-v3', task='retrieval.passage'
)
)

One cell of the notebook, copied as it is. Open it in Colab for the rest.

Browse all 103