Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(embeddings): Support task type in VertexAI embeddings models #151

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

davidmigloz
Copy link
Owner

@davidmigloz davidmigloz commented Sep 4, 2023

VertexAI embeddings models released in August support a new "task type" parameter that indicates the kind of task the embeddings is going to be used for, this helps the model produce better quality embeddings.

If you are using a model that supports it, LangChain.dart will use 'RETRIEVAL_DOCUMENT' when embedding a document and 'RETRIEVAL_QUERY' when embedding a query.

Docs:
https://cloud.google.com/vertex-ai/docs/generative-ai/embeddings/get-text-embeddings#api_changes_to_models_released_in_or_after_august_2023

VertexAI embeddings models released in August support a new "task type" parameter that indicates the kind of task the embeddings is going to be used for, this helps the model produce better quality embeddings.

If you are using a model that supports it, LangChain.dart will use 'RETRIEVAL_DOCUMENT' when embedding a document and 'RETRIEVAL_QUERY' when embedding a query.
@davidmigloz davidmigloz self-assigned this Sep 4, 2023
@davidmigloz davidmigloz added c:embeddings Embeddings. t:enhancement New feature or request labels Sep 4, 2023
@davidmigloz davidmigloz added this to the v0.0.12 milestone Sep 4, 2023
@davidmigloz davidmigloz merged commit d047a56 into main Sep 4, 2023
@davidmigloz davidmigloz deleted the task-type branch September 4, 2023 13:58
davidmigloz added a commit that referenced this pull request Sep 5, 2023
VertexAI embeddings models released in August support a new "task type" parameter that indicates the kind of task the embeddings is going to be used for, this helps the model produce better quality embeddings.

If you are using a model that supports it, LangChain.dart will use 'RETRIEVAL_DOCUMENT' when embedding a document and 'RETRIEVAL_QUERY' when embedding a query.
KennethKnudsen97 pushed a commit to KennethKnudsen97/langchain_dart that referenced this pull request Sep 29, 2023
…z#151)

VertexAI embeddings models released in August support a new "task type" parameter that indicates the kind of task the embeddings is going to be used for, this helps the model produce better quality embeddings.

If you are using a model that supports it, LangChain.dart will use 'RETRIEVAL_DOCUMENT' when embedding a document and 'RETRIEVAL_QUERY' when embedding a query.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:embeddings Embeddings. t:enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant