Skip to main content

Embedding-based semantic clustering for LLM responses using KMedoids + Davies-Bouldin

Project description

Embedding Clusterer

A semantic clustering library for grouping LLM responses using embedding-based methods with KMedoids and Davies-Bouldin Index for cluster evaluation.

Installation

pip install embedding-clusterer

Features

  • Embedding-based Clustering: Use sentence embeddings to group similar responses
  • KMedoids Algorithm: Robust clustering with actual representative samples
  • Davies-Bouldin Index: Automatic cluster evaluation and quality assessment
  • Transformer Models: Compatible with Hugging Face sentence-transformers

Usage

from embedding_clusterer import SemanticClusterer

clusterer = SemanticClusterer()
clusters = clusterer.cluster(texts, num_clusters=3)

Dependencies

  • numpy
  • scikit-learn
  • sentence-transformers

License

See LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

embedding_clusterer-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

embedding_clusterer-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file embedding_clusterer-0.1.0.tar.gz.

File metadata

  • Download URL: embedding_clusterer-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for embedding_clusterer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dd112f9820c20d900cb031d8b9ad145cd25a59ee8a4b680917947ff763b001c9
MD5 7eec3b929275eb426a5d6a2686dec3c4
BLAKE2b-256 2dd31377f878b77128e914bf2fb1d4966d810cb89e2c66d71d1dedd635ced1e0

See more details on using hashes here.

File details

Details for the file embedding_clusterer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for embedding_clusterer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84162b923d06f8066ff60814eb4f2e55d890d82dd214d5a5ca3697b7352931e3
MD5 ee1bc0598a9b3b1bb19680cad19ea571
BLAKE2b-256 0a69dbe16e8fa6b47df7576f3fe36d67120cca177e846131efb2e61a701bd8d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page