Back Issues/Search Home → Calendar → Archive → RSS → Subscribe → Services → Vendors → Blog → Current Issue → Popular → Newsletters (LinkedIn, Substack)

All issues › Volume 344, Issue 4 › IT News › AI

Blending Unsupervised Clustering Tasks With Scikit-LLM

KDnuggets, Friday, November 27th, 2026

A KDnuggets tutorial builds a two-stage pipeline that clusters documents with embeddings and names clusters using Scikit-LLM.

The tutorial presents a two-stage pipeline for unsupervised text clustering that also discovers readable topics for each cluster.

In the first stage, the local all-MiniLM-L6-v2 sentence-transformers model converts documents into embeddings that are grouped with k-means using k=3, and in the second, Scikit-LLM's GPTSummarizer, routed through Groq's free-tier API, names each cluster from 10 randomly sampled, truncated documents.

The example runs in Google Colab on a few hundred unlabeled 20 Newsgroups posts about space, automobiles and computer graphics, after filtering out very short documents.

Results map clusters back to the original categories with reasonable accuracy, and semantic embeddings are credited over TF-IDF for handling overlapping vocabulary.

more →  ·  More from AI →