Text Classification with Large Language Models (LLMs)
Like many individuals today, I find myself integrating AI into various aspects of my daily routine. The versatility and capabilities of AI have made it an indispensable tool in numerous applications, from automating simple tasks to providing insightful analysis. Recently, I’ve been exploring the potential of Large Language Models (LLMs) and came across an intriguing idea: using LLMs for classification tasks.
Classification, for those unfamiliar, involves labeling or categorizing data into different groups. This labeled data set is used to train AI models. It’s a basic task in NLP and has numerous applications — one of which is training these Large Language Models.
Text classification can be challenging when dealing with unstructured data. Given a general understanding of the world, I thought it was possible to do so using LLMs. To verify my theory, I conducted a small proof of concept (POC) to determine its feasibility and to identify any potential issues.
As a relevance engineer in the e-commerce sector, I decided to classify products for a search term into three categories: Relevant, Less Relevant, and Not Relevant.
For example, if you search for “Apple iPhone 15,” you’ll see results like “iPhone 15,” “iPhone 15 Pro,” and “iPhone 13.” While “iPhone 15” is relevant to the…