CLUSTERING

Embeddings
CLUSTERING is an embedding task type that optimizes vectors for topical grouping and is used in keyword clustering pipelines.

CLUSTERING is an embedding task type that optimizes vectors for topical grouping, used in keyword clustering pipelines. The Gemini API's task_type=CLUSTERING parameter generates vectors differently than with SEMANTIC_SIMILARITY — vectors optimized for grouping achieve better separation in vector space, producing cleaner clusters with a higher Silhouette Score. In SEO, it's used when you want to split 500+ keywords into topical groups, with each cluster becoming a potential content unit (article or page).

In the clustering pipeline, the keyword clustering skill uses this task type to generate embeddings, then the K-means algorithm splits them into clusters. When performing clustering tasks, task_type=CLUSTERING should be used rather than SEMANTIC_SIMILARITY to achieve optimal results. This distinction is mathematical: different task types produce vectors with different geometric properties.

Source: AI Semantic SEO Expert, Robert Niechciał (sensai.io)