Text Clustering as Classification with LLMs
<|reference_start|>Text Clustering as Classification with LLMs: Text clustering remains valuable in real-world applications where manual labeling is cost-prohibitive. It facilitates efficient organization and analysis of information by grouping similar texts based on their representations. However, implementing this approach necessitates fine-tuned embedders for downstream data and sophisticated similarity metrics. To address this issue, this study presents a novel framework for text clustering that effectively leverages the in-context learning capacity of Large Language Models (LLMs). Instead of fine-tuning embedders, we propose to transform the text clustering into a classification task via LLM. First, we prompt LLM to generate potential labels for a given dataset. Second, after integrating similar labels generated by the LLM, we prompt the LLM to assign the most appropriate label to each sample in the dataset. Our framework has been experimentally proven to achieve comparable or superior performance to state-of-the-art clustering methods that employ embeddings, without requiring complex fine-tuning or clustering algorithms. We make our code available to the public for utilization at https://anonymous.4open.science/r/Text-Clustering-via-LLM-E500.<|reference_end|>
@article{huang2024text,
    title={Text Clustering as Classification with LLMs},
    author={Chen Huang and Guoxiu He},
    journal={arXiv preprint arXiv:2410.00927},
    year={2024},
    archivePrefix={arXiv},
    eprint={2410.00927},
    primaryClass={cs.CL cs.IR}
}