Closest to centroids

List the documents closest to center

Centroids from your clustering algorithm describe the 'average' of each cluster. Relevance AI allows you to query for a list of documents that are closest to the centroids of each cluster.

from relevanceai import Client

client = Client(token=YOUR_API_KEY)
ds = client.Dataset("quickstart")

vector_fields = ["word_vector_"]
cluster_ops = ds.cluster(vector_fields=vector_fields)


You can also list furthest from centroid