CafeLLM: Context-Aware Fine-Grained Semantic Clustering Using Large Language Models
摘要
Text clustering is crucial for users like researchers aiming to organize large collections of textual data. However, textual data are often unstructured and esoteric in many domains, presenting unique challenges that conventional named entity recognition (NER) or clustering methods fail to address. Here, we present CafeLLM, a Context-Aware Fine-grained clustering method that uses Large Language Models (LLMs) to cluster terms or phrases from these specialized textual datasets based on a given context. CafeLLM leverages the robustness of LLMs to generalize efficiently from textual data, enabling the clustering of semantically identical text values without the need for extensive labeled training data. The approach works in two phases: extraction and clustering. In the extraction phase, each text is reframed by extracting key information based on the user-provided context. In the clustering phase, texts are paired in an iterative process to determine if they belong in the same cluster. Overall, we empirically demonstrate that CafeLLM is effective in clustering fine-grained and specialized textual datasets, providing users with a tool to automate and streamline the organization of such data. By addressing the challenge of efficient generalization from limited resources, CafeLLM contributes to advancing real-world AI applications in natural language processing.