The brain inside a human-like head representing an LLM (large language model) ingests information represented by charts, graphs, and icons

What are LLMs (Large Language Models)?

Large language models (LLMs) underpin the growth of generative AI. See how they work, how they're being used, and why they matter for your business.

When you use generative AI to summarize a report or draft social media copy, large language models (LLMs) make it happen. LLMs are the underlying technology powering generative AI. And as they draw from more data, they can generate more accurate outputs. This is essential for businesses, which can use LLMs to give customers more relevant, personalized content.

Advancements in artificial intelligence (AI) fueled by LLMs also make it possible for companies to create and deploy AI agents. When prompted by customers or staff, these intelligent systems are capable of solving complex problems using memory, sequential reasoning, and self-reflection.

Let's dig into what makes an LLM, how these models work, and where they can benefit your business.

What are LLMs?

Large language models (LLMs) are the engines powering generative AI. LLMs can understand and respond to questions with natural language because they are trained on massive amounts of text data. These models are now used to create text and visual content, create summaries, and write new code.

Users interact with LLMs through prompts, questions and context written in natural language that are sent to the model. For example, you could ask a generative AI model to create a summary of this article. First, you would send the text of the article to your AI tool for it to ingest and analyze. Next, you'd write the prompt detailing what you were looking for. The LLM would them produce a high-level summary. The more data used to train the model, the more complete and accurate the results.

With the right data in place, there are many ways that businesses can use LLMs, such as having your sales team use AI for tasks like generating pitches — all using relevant customer data that speaks to pain points and preferences.

Enterprise AI built into CRM for business

Salesforce Artificial Intelligence

Salesforce AI delivers trusted, extensible AI grounded in the fabric of our Salesforce Platform. Utilize our AI in your customer data to create customizable, predictive, and generative AI experiences to fit all your business needs safely. Bring conversational AI to any workflow, user, department, and industry with Einstein.

How large language models work

Before you start getting too deep into your generative AI strategy, familiarize yourself with how this technology takes you from prompt to output. Large language models depend on three components: machine (and deep) learning, neural networks, and transformer models.

Machine learning and deep learning

Machine learning (ML) algorithms instruct LLMs on how to collect data, discover connections, and identify common features.

Deep learning is a subset of ML that allows LLMs to learn with less human intervention and uses a probabilistic approach to improve accuracy. Consider an LLM that analyzes 1,000 sentences. Deep learning tools determine the letters "E", "T", "A", and "O" appear most often. From there, the model extrapolates (correctly) that these are among the most-used letters in English.

Neural networks

Neural networks, also called artificial neural networks (ANNs), are groups of connected nodes that can communicate with each other. These nodes are arranged into layers including input, output, and at least one middle layer — and allow LLMs to process information quickly. These networks are loosely based on the human brain’s neural networks but are far less complex.

Transformer models

Transformer models help LLMs understand language context. Using a technique known as self-attention, these models can analyze sentence structure and word choice to understand how elements of language relate to each other. This allows LLMs to better understand and process user queries.

LLMs understand text differently based on the models they use. Encoder-only models focus on making sense of text that is provided, while decoder-only models generate text based on a prompt. When you put them together — encoder-decoder — LLMs can understand and generate text, taking on language-driven tasks such as customer service or sales. For example, an LLM-driven AI chatbot might be used to answer customer questions about shipping times, product details, or pricing changes, freeing up human representatives to work on more strategic tasks.

How are large language models trained?

There are many types of LLM agents, but no matter which one you use, training improves the accuracy and reliability of their outputs. Given that transformer-based neural networks can include billions of parameters, training is required to ensure parameters are correctly weighted and applied to queries. Different training models may be more or less effective depending on the complexity and use case of an LLM.

Zero-shot learning

Zero-shot learning sees LLMs trained on the fly. Users ask questions and LLMs sort through connected data sources to find answers. Initial accuracy is typically low but improves over time.

Few-shot learning

In a few-shot approach, data scientists provide a small selection of relevant examples to help LLMs establish baseline connections. Few-shot training significantly improves accuracy in targeted areas.

Chain of thought

Chain of thought (CoT) training walks LLMs through a simple reasoning process. Instead of asking a single question, CoT breaks it down into multiple parts. Here's an example:

Standard prompt:

Steve has 20 shirts. Half of his shirts are short-sleeved, and half of those shirts are blue. How many blue shirts does he have?

CoT prompt:

Steve has 20 shirts.

Half of his shirts are short-sleeved. This means he has 10 short-sleeved shirts.

Half of these shirts are blue, which means he has 5 blue shirts.

While the prompt itself isn't particularly complicated, CoT provides a step-by-step approach to problem-solving that shows an LLM how to answer the question. This approach can then be applied to other questions.

Fine-tuning and domain-specific models

Fine-tuning and domain-specific models provide additional contextual information for targeted use cases. For example, a company looking to improve its analysis of social media sentiment might provide its LLM with detailed information about how to understand specific words and phrases within the larger context of social platforms.

Language representation model

In this type of model, rather than looking at the text itself, the model translates it into numbers — called vectors. By using numbers, computers can use machine learning to more easily analyze how words and sentences are placed together, making sense of the context and semantic meaning to identify relationships between the words.

Multimodal model

In a multimodal model, LLMs are trained to use multiple data formats for input and output. Along with text, these formats may include audio, video, or image data.

A welcome message with Astro holding up the Einstein logo.

AI Built for Business

Enterprise AI built directly into your CRM. Maximize productivity across your entire organization by bringing business AI to every app, user, and workflow. Empower users to deliver more impactful customer experiences in sales, service, commerce, and more with personalized AI assistance.

What are LLMs used for?

LLMs give AI agents the ability to converse in natural language, but that’s easier said than done.

Traditional bots require you to manually train natural language models to understand customer language and design dialogs. This process is extremely time-consuming and costly for a business, but LLMs offer simpler alternatives.

For instance, solutions like Agentforce — the agentic layer of the Salesforce platform — use pre-built skills (as well as low-code custom actions) instead of having you go through a lengthy training process. Agentforce also uses conversational AI, so interactions with agents will feel more natural than robotic.

Other common LLM use cases include:

  • Text generation: LLMs can generate text based on your data, making it more relevant to your customers. For example, marketing teams might use an LLM to draft a call to action for a new product or write a promotional email. Commerce teams can also use AI to generate promotions.
  • Content summarization: Users can also ask LLMs to summarize large blocks of text. They can also customize the output format. Summaries can be delivered as shorter paragraphs, bulleted lists, or single sentences.
  • Knowledge base answering: Many companies have employee- and customer-facing knowledge bases that contain answers to common questions. LLMs can use these knowledge bases to respond to user queries.
  • Code generation: It's also possible to use LLMs for code generation once models have been trained in a specific language. For example, teams could ask a model to generate Python code to perform a specific function.
  • Sentiment analysis: LLMs can collect and analyze data from social media posts, emails, texts, and other data sources — and then analyze this data to determine overall user sentiment. This is a great way to use marketing AI to identify customers who may be frustrated or unhappy and take action to resolve the issue.
  • Language translation: LLMs may also act as translation services, which helps your service team use AI to respond to queries in different languages than their own. Users can ask models to translate sentences or paragraphs into another language. Given the sheer amount of data available online, this is a simple task for LLMs. The caveat? Context is often absent from translations, so human oversight is recommended.
  • Classification and categorization: Using LLMs, businesses can streamline the process of data classification and categorization. First, users provide specifics: If data contains "X" element or "Y" value, it belongs in "Z" category. Then, LLMs are tasked with analyzing all data within a specific set and assigning any matching values to a designated category.
  • AI agents: Advancements in LLMs have enabled the use of AI agents. These autonomous applications can provide specialized, on-demand support for customers or staff and can be customized to meet specific business requirements.

Should you build your own LLM?

The simple answer? Probably not.

The more complete answer? In most cases, building your own LLM is expensive, time-consuming, and unnecessary.

It's expensive because you need to invest in the expertise and infrastructure to develop a bespoke language model. It's time-consuming because you need to provide a wealth of training data, and ensure the training results in accurate outcomes. And it's unnecessary because, in most cases, you're reinventing the wheel.

Using pre-trained, open-source LLMs that come with built-in security guardrails often provides the best balance of performance and protection. Businesses can leverage the power of models trained using trillions of data points, without worrying that issues in code may lead to inadvertent compromise. You can supplement the LLM model’s information by using a RAG (retrieval-augmented generation), which combines your company’s most relevant and proprietary data.

Two robots (Astro and Einstein) stand beside a digital interface labeled "Agentforce," with options for Service Agent, Sales Coach, and Sales Development Representative.

Imagine a workforce with no limits.

Transform the way work gets done across every role, workflow, and industry with autonomous AI agents.

What are the advantages and disadvantages of LLMs?

LLMs offer a host of advantages for organizations. These include the reduction or elimination of manual processes and the ability to discover new trends and insights using available data sources. However, to use LLMs effectively, businesses must recognize where they excel and where they may struggle.

Here's a look at some of the top advantages of LLMs, and the potential disadvantages of LLMs:

Advantages of LLMs

  • Adaptability: Since LLMs use the transformer architecture model, instead of explicit rules that are "hard coded," it can adapt to dynamic and unpredictable prompts it may receive.
  • Flexibility: There's no single way to use LLMs. Businesses can customize these tools to act as AI assistants, copilots, or autonomous agents.
  • Performance: As LLMs analyze and incorporate more data, their performance improves, reducing the time between query and answer.
  • Efficiency: Because much of LLM learning happens independently of human oversight, staff are free to take on other strategic tasks.

Disadvantages of LLMs

  • Development and operational costs: The development process can be time- and cost-intensive. Common costs include writing and testing code, finding and incorporating data sets, and ensuring LLMs are correctly responding to training data.
  • Ethical concerns: If data used to make decisions is collected without user consent, companies may be subject to legal challenges. Bias is another concern. If data sets are incorrectly weighted or contain inaccurate data, this may lead to answers that appear accurate but are biased against a particular group or outcome.
  • Explainability: The nature of LLM decision-making is hard to explain. This can undermine confidence in LLM outputs and decision-making. To offset this, use a trust layer that provides you with insight into how decisions were made.
  • Hallucinations/glitch tokens: Hallucinations occur when users ask LLMs to "imagine" they can perform actions they are otherwise barred from completing. For example, a cybercriminal might ask an LLM to provide the contact information of everyone at a company. The LLM denies the request based on its security ruleset. Then, the attacker asks the model to imagine it can accomplish the action. In doing so, the LLM actually completes the requested function. Glitch tokens, meanwhile, are strings of characters that produce unexpected results. Both the tokens themselves and the outputs appear largely random, making it difficult to determine when or how they happen.
  • Security risks: Models may also present security risks. For example, if business LLMs are trained on public and private data, there is a potential for LLMs to be compromised, or for protected data to be exposed.

What is the future of LLMs?

Two paths are likely for the future of LLMs: bigger, and smaller.

As deep learning algorithms improve and processors become more powerful, large language models will be capable of handling larger data volumes faster and more accurately than ever.

At the same time, expect to see the development of small language models that apply the same level of performance to smaller, more tightly controlled datasets. These smaller models offer a way for companies to define highly specialized parameters and receive high-accuracy outputs.

Tap into the power of LLMs with Agentforce

Large language models are inching ever closer to a complete, contextual understanding of communication. While oversight remains a critical component in LLM use, these models offer a way to bridge the gap between human insight and IT operations by allowing us to speak the same language.

Now that you have a deeper understanding of AI, as well as LLMs, you can take a tour of Agentforce. With Agentforce you can build autonomous AI agents using the LLM of your choice, helping your company get more done — offering a boost in ROI and productivity.