Large Language Models and Where to Use Them

Large Language Models and Where to Use Them

Over the past few years, large language models (LLMs) have evolved from emerging to mainstream technology. In this blog post, we’ll explore some of the most common natural language processing (NLP) use cases that they can address. 

What is a large language model?

large language model (LLM) is a type of machine learning model that can handle a wide range of natural language processing (NLP) use cases. But due to their versatility, LLMs can be a bit overwhelming for newcomers who are trying to understand when and where to use these models.

There are seven broad categories of use cases where you can apply them.

Classify

Text classification is a widely used application of Natural Language Processing. It is a supervised learning algorithm which requires prior knowledge of the classes it needs to classify text into. It can be done using text embeddings or through “few-shot” classification.

The number of training examples needed is dependent on the task, but typically ranges from hundreds to thousands. “Few-shot” classification can work with as little as five training examples per class.

Areas where text classification can be usefu:

Generate

LLMs are pre-trained models that generate original and coherent text, and prompt engineering is a field dedicated to getting the best out of these models. Prompt engineering involves providing the model with contextual information to produce a specific type of text.

Here are some other examples:

The second use case category, which also leverages prompt engineering, is text summarization. Think about the amount of text that we deal with on a typical day, such as reports, articles, meeting notes, emails, transcripts, and so on.

Search/Similarity

LLMs are known for their text generation capabilities, but their text representation capabilities are equally powerful. Text representation is about making sense of existing text and is useful for massive amounts of unstructured data.

An example of this is similarity search, which is used in search engines to match a query with relevant results. Text representation models generate text embeddings, which are long sequences of numbers that store information about the text.

Use cases:

Summarize

We can have an LLM summarize a piece of text by prompting it with a few examples of a full document and its summary.

Here are some example documents where LLM summarization:

Cluster

Clustering is a way of organizing a set of documents into groups, based on their similarity and relevance to each other. This can be done via k-means clustering, where the number of clusters is specified.

This technique can be applied to number of different tasks, such as:

Rewrite

This is another of those tasks that we do every day and spend a lot of time on, and if we could automate them, it would free us up to work on more creative tasks.

Rewriting text can mean different things and take different forms, but one common example is text correction.

We prepare the prompt with a short bit of context about the task, followed by examples of incorrect and corrected transcriptions.

Example use cases for using an LLM to rewrite text:

Extract

Text extraction is another use case category that can leverage a generation LLM. The idea is to take a long piece of text and extract only the key information or words from it.

Use cases in this category include:

Source

Get in