Optimized Algorithms for Text Clustering with LLM-Generated Constraints

Chaoqi Jia, Weihong Wu, Longkun Guo, Zhigang Lu, Chao Chen +1 more
1/16/2026
cs.LG

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Clustering is a fundamental tool that has garnered significant interest across a wide range of applications including text analysis. To improve clustering accuracy, many researchers have incorporated background knowledge, typically in the form of must-link and cannot-link constraints, to guide the clustering process. With the recent advent of large language models (LLMs), there is growing interest in improving clustering quality through LLM-based automatic constraint generation. In this paper, we propose a novel constraint-generation approach that reduces resource consumption by generating constraint sets rather than using traditional pairwise constraints. This approach improves both query efficiency and constraint accuracy compared to state-of-the-art methods. We further introduce a constrained clustering algorithm tailored to the characteristics of LLM-generated constraints. Our method incorporates a confidence threshold and a penalty mechanism to address potentially inaccurate constraints. We evaluate our approach on five text datasets, considering both the cost of constraint generation and the overall clustering performance. The results show that our method achieves clustering accuracy comparable to the state-of-the-art algorithms while reducing the number of LLM queries by more than 20 times.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{jia2026optimized,
  title  = {Optimized Algorithms for Text Clustering with LLM-Generated Constraints},
  author = {Chaoqi Jia and Weihong Wu and Longkun Guo and Zhigang Lu and Chao Chen and Kok-Leong Ong},
  year   = {2026},
  eprint = {2601.11118},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2601.11118v1}
}

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/2601.11118.svg)](https://codeofpaper.com/paper/2601.11118)

Discussion