Skip to content

Commit 1220ecc

Browse files
bilgeyucelanakin87
andauthored
Docs: change the google embedding model name (#11179)
Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
1 parent f990a75 commit 1220ecc

9 files changed

Lines changed: 29 additions & 30 deletions

File tree

docs-website/docs/pipeline-components/embedders/googlegenaidocumentembedder.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The vectors computed by this component are necessary to perform embedding retrie
1717
| **Mandatory init variables** | `api_key`: The Google API key. Can be set with `GOOGLE_API_KEY` or `GEMINI_API_KEY` env var. |
1818
| **Mandatory run variables** | `documents`: A list of documents to be embedded |
1919
| **Output variables** | `documents`: A list of documents (enriched with embeddings) <br /> <br />`meta`: A dictionary of metadata |
20-
| **API reference** | [Google AI](/reference/integrations-google-genai) |
20+
| **API reference** | [Google GenAI](/reference/integrations-google-genai) |
2121
| **GitHub link** | https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/google_genai |
2222
| **Package name** | `google-genai-haystack` |
2323

@@ -27,10 +27,9 @@ The vectors computed by this component are necessary to perform embedding retrie
2727

2828
`GoogleGenAIDocumentEmbedder` enriches the metadata of documents with an embedding of their content. To embed a string, you should use the [`GoogleGenAITextEmbedder`](googlegenaitextembedder.mdx).
2929

30-
The component supports the following Google AI models:
30+
The component supports [Google AI Embedding models](https://ai.google.dev/gemini-api/docs/embeddings#model-versions).
3131

32-
- `text-embedding-004` (default)
33-
- `text-embedding-004-v2`
32+
`gemini-embedding-001` is the default model.
3433

3534
To start using this integration with Haystack, install it with:
3635

docs-website/docs/pipeline-components/embedders/googlegenaimultimodaldocumentembedder.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ It uses Google AI multimodal embedding models with the ability to embed text, im
1717
| **Mandatory init variables** | `api_key`: The Google API key. Can be set with `GOOGLE_API_KEY` or `GEMINI_API_KEY` env var. |
1818
| **Mandatory run variables** | `documents`: A list of documents, with a meta field containing an image file path |
1919
| **Output variables** | `documents`: A list of documents (enriched with embeddings) <br /> <br />`meta`: A dictionary of metadata |
20-
| **API reference** | [Google AI](/reference/integrations-google-genai) |
20+
| **API reference** | [Google GenAI](/reference/integrations-google-genai) |
2121
| **GitHub link** | https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/google_genai |
2222
| **Package name** | `google-genai-haystack` |
2323

@@ -31,7 +31,7 @@ The embedder efficiently loads the files, computes the embeddings using a Google
3131

3232
`GoogleGenAIMultimodalDocumentEmbedder` is commonly used in indexing pipelines. At retrieval time, you need to use the same model with a `GoogleGenAITextEmbedder` to embed the query, before using an Embedding Retriever.
3333

34-
This component is compatible with Gemini multimodal models: `gemini-embedding-2-preview` and later. For a complete list of supported models, see the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings).
34+
This component is compatible with Gemini multimodal models: `gemini-embedding-2` and later. For a complete list of supported models, see the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings).
3535

3636
To embed a textual document, you should use the [`GoogleGenAIDocumentEmbedder`](googlegenaidocumentembedder.mdx).
3737
To embed a string, you should use the [`GoogleGenAITextEmbedder`](googlegenaitextembedder.mdx).
@@ -125,7 +125,7 @@ print(result["documents"][0].embedding)
125125

126126
### Setting embedding dimensions
127127

128-
Models like `gemini-embedding-2-preview` have a default embedding dimension of 3072, but, thanks to
128+
Models like `gemini-embedding-2` have a default embedding dimension of 3072, but, thanks to
129129
Matryoshka Representation Learning, it's possible to reduce embedding size while keeping similar performance.
130130

131131
Check the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings#control-embedding-size) for more information.

docs-website/docs/pipeline-components/embedders/googlegenaitextembedder.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This component transforms a string into a vector that captures its semantics usi
1717
| **Mandatory init variables** | `api_key`: The Google API key. Can be set with `GOOGLE_API_KEY` or `GEMINI_API_KEY` env var. |
1818
| **Mandatory run variables** | `text`: A string |
1919
| **Output variables** | `embedding`: A list of float numbers <br /> <br />`meta`: A dictionary of metadata |
20-
| **API reference** | [Google AI](/reference/integrations-google-genai) |
20+
| **API reference** | [Google GenAI](/reference/integrations-google-genai) |
2121
| **GitHub link** | https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/google_genai |
2222
| **Package name** | `google-genai-haystack` |
2323

@@ -27,10 +27,9 @@ This component transforms a string into a vector that captures its semantics usi
2727

2828
`GoogleGenAITextEmbedder` embeds a simple string (such as a query) into a vector. For embedding lists of documents, use the [`GoogleGenAIDocumentEmbedder`](googlegenaidocumentembedder.mdx), which enriches the document with the computed embedding, also known as vector.
2929

30-
The component supports the following Google AI models:
30+
The component supports [Google AI Embedding models](https://ai.google.dev/gemini-api/docs/embeddings#model-versions).
3131

32-
- `text-embedding-004` (default)
33-
- `text-embedding-004-v2`
32+
`gemini-embedding-001` is the default model.
3433

3534
To start using this integration with Haystack, install it with:
3635

@@ -107,7 +106,7 @@ text_embedder = GoogleGenAITextEmbedder()
107106

108107
print(text_embedder.run(text_to_embed))
109108
## {'embedding': [0.017020374536514282, -0.023255806416273117, ...],
110-
## 'meta': {'model': 'text-embedding-004',
109+
## 'meta': {'model': 'gemini-embedding-001',
111110
## 'usage': {'prompt_tokens': 4, 'total_tokens': 4}}}
112111
```
113112

docs-website/versioned_docs/version-2.25/pipeline-components/embedders/googlegenaimultimodaldocumentembedder.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The embedder efficiently loads the files, computes the embeddings using a Google
3030

3131
`GoogleGenAIMultimodalDocumentEmbedder` is commonly used in indexing pipelines. At retrieval time, you need to use the same model with a `GoogleGenAITextEmbedder` to embed the query, before using an Embedding Retriever.
3232

33-
This component is compatible with Gemini multimodal models: `gemini-embedding-2-preview` and later. For a complete list of supported models, see the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings).
33+
This component is compatible with Gemini multimodal models: `gemini-embedding-2` and later. For a complete list of supported models, see the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings).
3434

3535
To embed a textual document, you should use the [`GoogleGenAIDocumentEmbedder`](googlegenaidocumentembedder.mdx).
3636
To embed a string, you should use the [`GoogleGenAITextEmbedder`](googlegenaitextembedder.mdx).
@@ -124,7 +124,7 @@ print(result["documents"][0].embedding)
124124

125125
### Setting embedding dimensions
126126

127-
Models like `gemini-embedding-2-preview` have a default embedding dimension of 3072, but, thanks to
127+
Models like `gemini-embedding-2` have a default embedding dimension of 3072, but, thanks to
128128
Matryoshka Representation Learning, it's possible to reduce embedding size while keeping similar performance.
129129

130130
Check the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings#control-embedding-size) for more information.

docs-website/versioned_docs/version-2.26/pipeline-components/embedders/googlegenaimultimodaldocumentembedder.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The embedder efficiently loads the files, computes the embeddings using a Google
3030

3131
`GoogleGenAIMultimodalDocumentEmbedder` is commonly used in indexing pipelines. At retrieval time, you need to use the same model with a `GoogleGenAITextEmbedder` to embed the query, before using an Embedding Retriever.
3232

33-
This component is compatible with Gemini multimodal models: `gemini-embedding-2-preview` and later. For a complete list of supported models, see the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings).
33+
This component is compatible with Gemini multimodal models: `gemini-embedding-2` and later. For a complete list of supported models, see the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings).
3434

3535
To embed a textual document, you should use the [`GoogleGenAIDocumentEmbedder`](googlegenaidocumentembedder.mdx).
3636
To embed a string, you should use the [`GoogleGenAITextEmbedder`](googlegenaitextembedder.mdx).
@@ -124,7 +124,7 @@ print(result["documents"][0].embedding)
124124

125125
### Setting embedding dimensions
126126

127-
Models like `gemini-embedding-2-preview` have a default embedding dimension of 3072, but, thanks to
127+
Models like `gemini-embedding-2` have a default embedding dimension of 3072, but, thanks to
128128
Matryoshka Representation Learning, it's possible to reduce embedding size while keeping similar performance.
129129

130130
Check the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings#control-embedding-size) for more information.

docs-website/versioned_docs/version-2.27/pipeline-components/embedders/googlegenaimultimodaldocumentembedder.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The embedder efficiently loads the files, computes the embeddings using a Google
3030

3131
`GoogleGenAIMultimodalDocumentEmbedder` is commonly used in indexing pipelines. At retrieval time, you need to use the same model with a `GoogleGenAITextEmbedder` to embed the query, before using an Embedding Retriever.
3232

33-
This component is compatible with Gemini multimodal models: `gemini-embedding-2-preview` and later. For a complete list of supported models, see the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings).
33+
This component is compatible with Gemini multimodal models: `gemini-embedding-2` and later. For a complete list of supported models, see the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings).
3434

3535
To embed a textual document, you should use the [`GoogleGenAIDocumentEmbedder`](googlegenaidocumentembedder.mdx).
3636
To embed a string, you should use the [`GoogleGenAITextEmbedder`](googlegenaitextembedder.mdx).
@@ -124,7 +124,7 @@ print(result["documents"][0].embedding)
124124

125125
### Setting embedding dimensions
126126

127-
Models like `gemini-embedding-2-preview` have a default embedding dimension of 3072, but, thanks to
127+
Models like `gemini-embedding-2` have a default embedding dimension of 3072, but, thanks to
128128
Matryoshka Representation Learning, it's possible to reduce embedding size while keeping similar performance.
129129

130130
Check the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings#control-embedding-size) for more information.

docs-website/versioned_docs/version-2.28/pipeline-components/embedders/googlegenaidocumentembedder.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ The vectors computed by this component are necessary to perform embedding retrie
1717
| **Mandatory init variables** | `api_key`: The Google API key. Can be set with `GOOGLE_API_KEY` or `GEMINI_API_KEY` env var. |
1818
| **Mandatory run variables** | `documents`: A list of documents to be embedded |
1919
| **Output variables** | `documents`: A list of documents (enriched with embeddings) <br /> <br />`meta`: A dictionary of metadata |
20-
| **API reference** | [Google AI](/reference/integrations-google-genai) |
20+
| **API reference** | [Google GenAI](/reference/integrations-google-genai) |
2121
| **GitHub link** | https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/google_genai |
22+
| **Package name** | `google-genai-haystack` |
2223

2324
</div>
2425

2526
## Overview
2627

2728
`GoogleGenAIDocumentEmbedder` enriches the metadata of documents with an embedding of their content. To embed a string, you should use the [`GoogleGenAITextEmbedder`](googlegenaitextembedder.mdx).
2829

29-
The component supports the following Google AI models:
30+
The component supports [Google AI Embedding models](https://ai.google.dev/gemini-api/docs/embeddings#model-versions).
3031

31-
- `text-embedding-004` (default)
32-
- `text-embedding-004-v2`
32+
`gemini-embedding-001` is the default model.
3333

3434
To start using this integration with Haystack, install it with:
3535

docs-website/versioned_docs/version-2.28/pipeline-components/embedders/googlegenaimultimodaldocumentembedder.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ It uses Google AI multimodal embedding models with the ability to embed text, im
1717
| **Mandatory init variables** | `api_key`: The Google API key. Can be set with `GOOGLE_API_KEY` or `GEMINI_API_KEY` env var. |
1818
| **Mandatory run variables** | `documents`: A list of documents, with a meta field containing an image file path |
1919
| **Output variables** | `documents`: A list of documents (enriched with embeddings) <br /> <br />`meta`: A dictionary of metadata |
20-
| **API reference** | [Google AI](/reference/integrations-google-genai) |
20+
| **API reference** | [Google GenAI](/reference/integrations-google-genai) |
2121
| **GitHub link** | https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/google_genai |
22+
| **Package name** | `google-genai-haystack` |
2223

2324
</div>
2425

@@ -30,7 +31,7 @@ The embedder efficiently loads the files, computes the embeddings using a Google
3031

3132
`GoogleGenAIMultimodalDocumentEmbedder` is commonly used in indexing pipelines. At retrieval time, you need to use the same model with a `GoogleGenAITextEmbedder` to embed the query, before using an Embedding Retriever.
3233

33-
This component is compatible with Gemini multimodal models: `gemini-embedding-2-preview` and later. For a complete list of supported models, see the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings).
34+
This component is compatible with Gemini multimodal models: `gemini-embedding-2` and later. For a complete list of supported models, see the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings).
3435

3536
To embed a textual document, you should use the [`GoogleGenAIDocumentEmbedder`](googlegenaidocumentembedder.mdx).
3637
To embed a string, you should use the [`GoogleGenAITextEmbedder`](googlegenaitextembedder.mdx).
@@ -124,7 +125,7 @@ print(result["documents"][0].embedding)
124125

125126
### Setting embedding dimensions
126127

127-
Models like `gemini-embedding-2-preview` have a default embedding dimension of 3072, but, thanks to
128+
Models like `gemini-embedding-2` have a default embedding dimension of 3072, but, thanks to
128129
Matryoshka Representation Learning, it's possible to reduce embedding size while keeping similar performance.
129130

130131
Check the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings#control-embedding-size) for more information.

docs-website/versioned_docs/version-2.28/pipeline-components/embedders/googlegenaitextembedder.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ This component transforms a string into a vector that captures its semantics usi
1717
| **Mandatory init variables** | `api_key`: The Google API key. Can be set with `GOOGLE_API_KEY` or `GEMINI_API_KEY` env var. |
1818
| **Mandatory run variables** | `text`: A string |
1919
| **Output variables** | `embedding`: A list of float numbers <br /> <br />`meta`: A dictionary of metadata |
20-
| **API reference** | [Google AI](/reference/integrations-google-genai) |
20+
| **API reference** | [Google GenAI](/reference/integrations-google-genai) |
2121
| **GitHub link** | https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/google_genai |
22+
| **Package name** | `google-genai-haystack` |
2223

2324
</div>
2425

2526
## Overview
2627

2728
`GoogleGenAITextEmbedder` embeds a simple string (such as a query) into a vector. For embedding lists of documents, use the [`GoogleGenAIDocumentEmbedder`](googlegenaidocumentembedder.mdx), which enriches the document with the computed embedding, also known as vector.
2829

29-
The component supports the following Google AI models:
30+
The component supports [Google AI Embedding models](https://ai.google.dev/gemini-api/docs/embeddings#model-versions).
3031

31-
- `text-embedding-004` (default)
32-
- `text-embedding-004-v2`
32+
`gemini-embedding-001` is the default model.
3333

3434
To start using this integration with Haystack, install it with:
3535

@@ -106,7 +106,7 @@ text_embedder = GoogleGenAITextEmbedder()
106106

107107
print(text_embedder.run(text_to_embed))
108108
## {'embedding': [0.017020374536514282, -0.023255806416273117, ...],
109-
## 'meta': {'model': 'text-embedding-004',
109+
## 'meta': {'model': 'gemini-embedding-001',
110110
## 'usage': {'prompt_tokens': 4, 'total_tokens': 4}}}
111111
```
112112

0 commit comments

Comments
 (0)