docs: Misc. fixes jina-embeddings.md (#1312)

Signed-off-by: Anush008 <anushshetty90@gmail.com>
This commit is contained in:
Anush
2024-11-21 17:41:45 +05:30
committed by GitHub
parent 6fd0842e44
commit bb009e8a01
2 changed files with 14 additions and 15 deletions
@@ -2,8 +2,8 @@
title: Jina Embeddings title: Jina Embeddings
weight: 1900 weight: 1900
aliases: aliases:
- /documentation/embeddings/jina-emebddngs/ - /documentation/embeddings/jina-embeddings/
- ../integrations/jina-embeddings/ - /documentation/integrations/jina-embeddings/
--- ---
# Jina Embeddings # Jina Embeddings
@@ -38,7 +38,6 @@ Include `dimensions` in your request to select the desired dimension.
By default, **dimensions** is set to 1024, and a number between 256 and 1024 is recommended. By default, **dimensions** is set to 1024, and a number between 256 and 1024 is recommended.
You can reference the table below for hints on dimension vs. performance: You can reference the table below for hints on dimension vs. performance:
| Dimension | 32 | 64 | 128 | 256 | 512 | 768 | 1024 | | Dimension | 32 | 64 | 128 | 256 | 512 | 768 | 1024 |
|:----------------------:|:---------:|:---------:|:-----------:|:---------:|:----------:|:---------:|:---------:| |:----------------------:|:---------:|:---------:|:-----------:|:---------:|:----------:|:---------:|:---------:|
| Average Retrieval Performance (nDCG@10) | 52.54 | 58.54 | 61.64 | 62.72 | 63.16 | 63.3 | 63.35 | | Average Retrieval Performance (nDCG@10) | 52.54 | 58.54 | 61.64 | 62.72 | 63.16 | 63.3 | 63.35 |
@@ -49,8 +48,7 @@ You can reference the table below for hints on dimension vs. performance:
### Jina Embeddings v3 ### Jina Embeddings v3
The code below demonstrate how to use `jina-embeddings-v3` together with Qdrant: The code below demonstrates how to use `jina-embeddings-v3` with Qdrant:
```python ```python
import requests import requests
@@ -62,7 +60,7 @@ from qdrant_client.models import Distance, VectorParams, Batch
JINA_API_KEY = "jina_xxxxxxxxxxx" JINA_API_KEY = "jina_xxxxxxxxxxx"
MODEL = "jina-embeddings-v3" MODEL = "jina-embeddings-v3"
DIMENSIONS = 1024 # Or choose your desired output vector dimensionality. DIMENSIONS = 1024 # Or choose your desired output vector dimensionality.
TASK = 'retrieval.passage' # For indexing, or set to retrieval.query for quering TASK = 'retrieval.passage' # For indexing, or set to retrieval.query for querying
# Get embeddings from the API # Get embeddings from the API
url = "https://api.jina.ai/v1/embeddings" url = "https://api.jina.ai/v1/embeddings"
@@ -105,6 +103,7 @@ qdrant_client.upsert(
### Jina CLIP v2 ### Jina CLIP v2
The code below demonstrates how to use `jina-clip-v2` with Qdrant: The code below demonstrates how to use `jina-clip-v2` with Qdrant:
```python ```python
import requests import requests
from qdrant_client import QdrantClient from qdrant_client import QdrantClient
@@ -20,7 +20,7 @@ or [protobuf](https://github.com/qdrant/qdrant/tree/master/lib/api/src/grpc/prot
|[![python](/docs/misc/python.webp)](https://python-client.qdrant.tech/)|**[Python](https://github.com/qdrant/qdrant-client)** + **[(Client Docs)](https://python-client.qdrant.tech/)**|`pip install qdrant-client[fastembed]`|[Latest Release](https://github.com/qdrant/qdrant-client/releases)| |[![python](/docs/misc/python.webp)](https://python-client.qdrant.tech/)|**[Python](https://github.com/qdrant/qdrant-client)** + **[(Client Docs)](https://python-client.qdrant.tech/)**|`pip install qdrant-client[fastembed]`|[Latest Release](https://github.com/qdrant/qdrant-client/releases)|
|![typescript](/docs/misc/ts.webp)|**[JavaScript / Typescript](https://github.com/qdrant/qdrant-js)**|`npm install @qdrant/js-client-rest`|[Latest Release](https://github.com/qdrant/qdrant-js/releases)| |![typescript](/docs/misc/ts.webp)|**[JavaScript / Typescript](https://github.com/qdrant/qdrant-js)**|`npm install @qdrant/js-client-rest`|[Latest Release](https://github.com/qdrant/qdrant-js/releases)|
|![rust](/docs/misc/rust.png)|**[Rust](https://github.com/qdrant/rust-client)**|`cargo add qdrant-client`|[Latest Release](https://github.com/qdrant/rust-client/releases)| |![rust](/docs/misc/rust.png)|**[Rust](https://github.com/qdrant/rust-client)**|`cargo add qdrant-client`|[Latest Release](https://github.com/qdrant/rust-client/releases)|
|![golang](/docs/misc/go.webp)|**[Go](https://github.com/qdrant/go-client)**|`go get github.com/qdrant/go-client`|[Latest Release](https://github.com/qdrant/go-client)| |![golang](/docs/misc/go.webp)|**[Go](https://github.com/qdrant/go-client)**|`go get github.com/qdrant/go-client`|[Latest Release](https://github.com/qdrant/go-client/releases)|
|![.net](/docs/misc/dotnet.webp)|**[.NET](https://github.com/qdrant/qdrant-dotnet)**|`dotnet add package Qdrant.Client`|[Latest Release](https://github.com/qdrant/qdrant-dotnet/releases)| |![.net](/docs/misc/dotnet.webp)|**[.NET](https://github.com/qdrant/qdrant-dotnet)**|`dotnet add package Qdrant.Client`|[Latest Release](https://github.com/qdrant/qdrant-dotnet/releases)|
|![java](/docs/misc/java.webp)|**[Java](https://github.com/qdrant/java-client)**|[Available on Maven Central](https://central.sonatype.com/artifact/io.qdrant/client)|[Latest Release](https://github.com/qdrant/java-client/releases)| |![java](/docs/misc/java.webp)|**[Java](https://github.com/qdrant/java-client)**|[Available on Maven Central](https://central.sonatype.com/artifact/io.qdrant/client)|[Latest Release](https://github.com/qdrant/java-client/releases)|