Glossary Entry

What are Large Language Models (LLMs)?

Large language models are transformer networks trained on vast text to predict the next token. Learn about parameters, context windows, hallucinations, and RAG.

Written by Alex Merced

What are Large Language Models (LLMs)?

Large language models (LLMs) are neural networks, built on the Transformer architecture, that are trained on very large text corpora to predict the next token in a sequence. That single training objective, applied at scale, produces models that can answer questions, summarize documents, translate, and write code. Well-known families include OpenAI’s GPT models, Meta’s Llama models, and Anthropic’s Claude models.

Earlier natural language processing (NLP) systems were usually trained for one narrow task, such as sentiment analysis on product reviews. An LLM is a general-purpose model: the same weights handle many tasks, steered by the prompt rather than by retraining.

How LLMs Work

Parameters

What a model learns is stored in its parameters, the weights connecting its layers. Current LLMs range from a few billion parameters to hundreds of billions or more. Training at that size takes large clusters of GPUs or other accelerators, which is why most organizations use a hosted or open-weight model rather than training their own.

Next-token prediction

An LLM does not write a whole answer at once. It reads the prompt as a sequence of tokens (words or pieces of words), computes a probability distribution over the next token, picks one, appends it to the sequence, and repeats. Fluent paragraphs come out of this loop one token at a time.

Limitations in Production

Hallucinations

Because the model predicts likely text rather than looking facts up, it can produce statements that sound plausible and are false. This is called a hallucination. The common mitigation is retrieval-augmented generation (RAG): the application retrieves relevant, approved documents (often from a vector database) and places them in the prompt so the answer is grounded in that material. RAG reduces hallucinations; it does not remove them, so answers that matter still need citations and checks.

Context windows

An LLM can only consider the text that fits in its context window during a single request. Context windows have grown, but a model still cannot read a multi-terabyte table. Analytical questions work best when a query engine on the data lakehouse does the scanning and aggregation, and the LLM receives the result.

Tool Calling and Agents

Tool calling lets an LLM ask for an action it cannot perform itself. The application describes the available tools (for example, run a SQL query or call an API), the model responds with a structured request to use one, the application runs it, and the result is sent back to the model to continue its answer. The model never executes the tool directly; the application decides what runs.

Loops of reasoning and tool calls are the basis of AI agents. The ReAct pattern (Yao et al., 2022) describes this loop: the model writes a reasoning step, takes an action, reads the observation, and repeats until it can answer. For analytics, an agent that queries governed lakehouse tables through a semantic layer gets consistent metric definitions and the same access controls as human users.

Summary

LLMs are Transformer models trained to predict the next token, which makes them useful general-purpose tools for language and code. They are limited by hallucinations and context size, so production systems pair them with retrieval, tool calling, and governed data from the lakehouse.

Learn More

To learn more about the Data Lakehouse, read The Lakehouse Built for Everyone by Alex Merced. You can find this and other books by Alex Merced at books.alexmerced.com.

Related Terms

What is an AI Hallucination?

An AI hallucination is when a language model produces fluent output that is false or unsupported. Learn why it happens and how RAG grounds answers in your data.

What is Tool Calling?

Tool calling is an LLM capability where the model requests external functions or APIs and uses the results, with notes on agent loops, ReAct, and governance.

What is Retrieval-Augmented Generation (RAG)?

Retrieval-augmented generation (RAG) grounds an LLM's answers in documents retrieved at query time. See how chunking, embeddings, and vector search fit in.

What are AI Agents?

AI agents are software systems that use an LLM to reason and call external tools in a loop toward a goal, covering tool registries, ReAct, and human oversight.

What is Natural Language Processing (NLP)?

Natural language processing (NLP) is the field of AI that lets computers parse, understand, and generate human language, from sentiment to transformers.

What is Generative Pre-trained Transformer (GPT)?

GPT is a family of autoregressive language models that predict the next token. Learn what generative, pre-trained, and transformer each mean in how GPT works.

What is Generative Engine Optimization?

Generative engine optimization is the practice of shaping content so AI assistants and answer engines can find, cite, and summarize it accurately in replies.

What is Mixture of Experts (MoE)?

Mixture of Experts (MoE) is a neural network design where a router sends each token to a few expert subnetworks, so the model uses only part of its weights.

What is Return on Investment (ROI) for AI?

ROI for AI measures whether a machine learning or generative AI project returns more business value than it costs, from data engineering and GPUs to revenue.

Work with Alex