google.ai.generativelanguage.TaskType

Type of task for which the embedding will be used.

TASK_TYPE_UNSPECIFIED 0

Unset value, which will default to one of the other enum values.

RETRIEVAL_QUERY 1

Specifies the given text is a query in a search/retrieval setting.

RETRIEVAL_DOCUMENT 2

Specifies the given text is a document from the corpus being searched.

SEMANTIC_SIMILARITY 3

Specifies the given text will be used for STS.

CLASSIFICATION 4

Specifies that the given text will be classified.

CLUSTERING 5

Specifies that the embeddings will be used for clustering.

CLASSIFICATION <TaskType.CLASSIFICATION: 4>
CLUSTERING <TaskType.CLUSTERING: 5>
RETRIEVAL_DOCUMENT <TaskType.RETRIEVAL_DOCUMENT: 2>
RETRIEVAL_QUERY <TaskType.RETRIEVAL_QUERY: 1>
SEMANTIC_SIMILARITY <TaskType.SEMANTIC_SIMILARITY: 3>
TASK_TYPE_UNSPECIFIED <TaskType.TASK_TYPE_UNSPECIFIED: 0>