Text classification is a fundamental task in Natural Language Processing (NLP), and the advent of Large Language Models (LLMs) has revolutionized the field. This paper introduces the Smart Expert System, a novel approach that leverages LLMs as text classifiers. The system simplifies the traditional text classification workflow, eliminating the need for extensive preprocessing and domain expertise. The performance of several LLMs, machine learning (ML) algorithms, and neural network (NN) based structures is evaluated on four datasets. Results demonstrate that certain LLMs surpass traditional methods in sentiment analysis, spam SMS detection and multi-label classification. Furthermore, it is shown that the system's performance can be further enhanced through few-shot or fine-tuning strategies, making the fine-tuned model the top performer across all datasets. Source code and datasets are available in this GitHub repository: https://github.com/yeyimilk/llm-zero-shot-classifiers.
翻译:文本分类是自然语言处理(NLP)中的一项基础任务,而大型语言模型(LLMs)的出现彻底革新了这一领域。本文提出了智能专家系统这一创新方法,利用LLM作为文本分类器。该系统简化了传统文本分类流程,无需大量的预处理和领域专业知识。我们在四个数据集上评估了多种LLM、机器学习(ML)算法以及基于神经网络(NN)结构的性能。结果表明,特定LLM在情感分析、垃圾短信检测和多标签分类任务上超越了传统方法。此外,研究显示通过少样本学习或微调策略可进一步提升系统性能,使得微调后的模型在所有数据集上表现最优。源代码和数据集已开源至GitHub仓库:https://github.com/yeyimilk/llm-zero-shot-classifiers。