This documentation page is also available as an interactive notebook. You can launch the notebook in
Kaggle or Colab, or download it for use with an IDE or local Jupyter installation, by clicking one of the
above links.
Pixeltable’s Jina AI integration enables you to access state-of-the-art
embedding and reranker models via the Jina AI API.
Prerequisites
Important notes
- Jina AI usage may incur costs based on your Jina AI plan.
- Be mindful of sensitive data and consider security measures when
integrating with external services.
First you’ll need to install Pixeltable and set up your Jina AI API key.
Now let’s create a Pixeltable directory to hold the tables for our demo.
Created directory ‘jina_demo’.
<pixeltable.catalog.dir.Dir at 0x1454c53d0>
Text Embeddings
Jina AI provides frontier multilingual embedding models for semantic
search and RAG applications. The jina-embeddings-v3 model supports 89+
languages and achieves state-of-the-art performance.
Created table ‘documents’.
Added 0 column values with 0 errors.
No rows affected.
Inserting rows into `documents`: 6 rows [00:00, 1394.00 rows/s]
Inserted 6 rows with 0 errors.
6 rows inserted, 12 values computed.
Multilingual Embeddings
Jina AI models excel at multilingual text. The same model can embed text
in different languages into the same semantic space.
Created table ‘multilingual’.
Added 0 column values with 0 errors.
Inserting rows into `multilingual`: 4 rows [00:00, 736.23 rows/s]
Inserted 4 rows with 0 errors.
Embedding Index for Similarity Search
You can use Jina AI embeddings with Pixeltable’s embedding index for
efficient similarity search.
Created table ‘search’.
Inserting rows into `search`: 6 rows [00:00, 565.03 rows/s]
Inserted 6 rows with 0 errors.
6 rows inserted, 12 values computed.
Reranking
Jina AI’s reranker models can improve search relevance by reordering
results based on semantic similarity to the query.
Created table ‘rerank’.
Added 0 column values with 0 errors.
Inserting rows into `rerank`: 1 rows [00:00, 543.16 rows/s]
Inserted 1 row with 0 errors.
1 row inserted, 2 values computed.
{‘usage’: {‘total_tokens’: 221},
‘results’: [{‘index’: 4,
‘document’: “Apple’s conference call to discuss fourth fiscal quarter results is scheduled for Thursday, November 2, 2023.”,
‘relevance_score’: 0.64511991},
{‘index’: 2,
‘document’: ‘20th-century innovations, from radios to smartphones, centered on electronic advancements.’,
‘relevance_score’: 0.03846619},
{‘index’: 5,
‘document’: “Shakespeare’s works, like ‘Hamlet’ and ‘A Midsummer Night’s Dream,’ endure in literature.”,
‘relevance_score’: 0.02517884}]}
Learn More