Classification tasks are typically handled using Machine Learning (ML) models, which lack a balance between accuracy and interpretability. This paper introduces a new approach to using Large Language Models (LLMs) for classification tasks in an explainable way. Unlike ML models that rely heavily on data cleaning and feature engineering, this method streamlines the process using LLMs. This paper proposes a new concept called "Language Model Learning (LML)" powered by a new method called "Data-Augmented Prediction (DAP)". The classification is performed by LLMs using a method similar to humans manually exploring and understanding the data and deciding classifications using data as a reference. In the LML process, a dataset is summarized and evaluated to determine the features that lead to the classification of each label the most. In the process of DAP, the system uses the data summary and a row of the testing dataset to automatically generate a query, which is used to retrieve relevant rows from the dataset. A classification is generated by the LLM using data summary and relevant rows, ensuring satisfactory accuracy even with complex data using context-aware decision-making. LML and DAP unlock the possibilities of new applications. The proposed method uses the words "Act as an Explainable Machine Learning Model" in the prompt to enhance the interpretability of the predictions by allowing users to review the logic behind each prediction. In some test cases, the system scored an accuracy above 90%, proving the effectiveness of the system and its potential to outperform conventional ML models in various scenarios. The code is available at https://github.com/Pro-GenAI/LML-DAP
翻译:分类任务通常使用机器学习(ML)模型处理,这些模型在准确性和可解释性之间缺乏平衡。本文介绍了一种新方法,以可解释的方式使用大型语言模型(LLM)处理分类任务。与严重依赖数据清洗和特征工程的ML模型不同,该方法利用LLM简化了流程。本文提出了一个名为“语言模型学习(LML)”的新概念,其由一种称为“数据增强预测(DAP)”的新方法驱动。分类由LLM执行,使用类似于人类手动探索和理解数据并参考数据决定分类的方法。在LML过程中,对数据集进行总结和评估,以确定最有助于每个标签分类的特征。在DAP过程中,系统使用数据摘要和测试数据集的一行自动生成查询,用于从数据集中检索相关行。LLM使用数据摘要和相关行生成分类,通过上下文感知决策确保即使处理复杂数据也能获得令人满意的准确性。LML和DAP开启了新应用的可能性。所提出的方法在提示中使用“扮演可解释的机器学习模型”这一表述,通过允许用户审查每个预测背后的逻辑来增强预测的可解释性。在一些测试案例中,系统的准确率超过90%,证明了该系统的有效性及其在各种场景中超越传统ML模型的潜力。代码可在 https://github.com/Pro-GenAI/LML-DAP 获取。