Large Language Models Enable Few-Shot Clustering

Vijay Viswanathan, Kiril Gashteovski, Carolin Lawrence, Tongshuang Wu, Graham Neubig
7/2/2023
cs.CL

No official code found. Best implementation: viswavi/few-shot-clustering (83 stars, MIT, last commit 2024-09-26).

Abstract

Unlike traditional unsupervised clustering, semi-supervised clustering allows users to provide meaningful structure to the data, which helps the clustering algorithm to match the user's intent. Existing approaches to semi-supervised clustering require a significant amount of feedback from an expert to improve the clusters. In this paper, we ask whether a large language model can amplify an expert's guidance to enable query-efficient, few-shot semi-supervised text clustering. We show that LLMs are surprisingly effective at improving clustering. We explore three stages where LLMs can be incorporated into clustering: before clustering (improving input features), during clustering (by providing constraints to the clusterer), and after clustering (using LLMs post-correction). We find incorporating LLMs in the first two stages can routinely provide significant improvements in cluster quality, and that LLMs enable a user to make trade-offs between cost and accuracy to produce desired clusters. We release our code and LLM prompts for the public to use.

View on arXivView PDF

Code Implementations(1)

MIT
838PythonSep 27, 20222 years agoMIT

Similar Papers

Cite this paper

@article{viswanathan2023large,
  title  = {Large Language Models Enable Few-Shot Clustering},
  author = {Vijay Viswanathan and Kiril Gashteovski and Carolin Lawrence and Tongshuang Wu and Graham Neubig},
  year   = {2023},
  eprint = {2307.00524},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.00524v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2307.00524.svg)](https://codeofpaper.com/paper/2307.00524)

Discussion