Another method of finding the characteristics of a cluster is to examine the cluster centroid which represents the 'average' of the cluster. With RelevanceAI, it is possible to retrieve the document which is closest to the centroid of your cluster.
However, use this with caution as sometimes, the 'average' document may not be representative of its cluster.
You will need to have followed the quickstart clustering guide.
DATASET_ID = "quickstart_clustering" VECTOR_FIELD = "product_name_default_vector_" client.services.cluster.centroids.list_closest_to_center( dataset_id = DATASET_ID, vector_field = VECTOR_FIELD, cluster_ids = , # Leave this as an empty list if you want all of the clusters alias = "default" )
Updated 16 days ago