Task Type (parameter)
EmbeddingsTask Type is an embedding model parameter that tells the model how to optimize the generated vectors for a specific task.
While it may seem like a simple label, Task Type actually changes how vectors are generated. Changing the task type from SEMANTIC_SIMILARITY to CLUSTERING produces different clustering and comparison results. RETRIEVAL_QUERY optimizes for search queries, RETRIEVAL_DOCUMENT for representing documents, SEMANTIC_SIMILARITY for comparing pairs (linking, duplicates), and CLUSTERING for topical grouping. Selecting the appropriate task type significantly impacts analysis quality.
The key rule: if you change the task type, you must regenerate all embeddings — you cannot mix vectors generated with different task types.
For example, clustering a dataset of 500 keywords with CLUSTERING produces cleaner clusters with a higher Silhouette Score than the same dataset with SEMANTIC_SIMILARITY.