# Large Language Models for Lawyers: How LLMs Work

> Large language models for lawyers, in plain terms: how an LLM is trained, why it predicts words instead of looking up law, and what that means for legal work.

- Author: [Lucerna Law](https://lucernalaw.com)
- Published: 2026-11-05
- Category: [Getting started with legal AI](https://lucernalaw.com/blog/category/getting-started)
- Canonical: https://lucernalaw.com/blog/large-language-models-for-lawyers

Large language models are the engines inside generative legal AI tools, and for lawyers the key fact is how they work: an LLM is a very large set of numbers, tuned on huge amounts of text, that writes by predicting the next word. It does not look anything up. Whatever it seems to know, it rebuilt from patterns it learned.

> **In brief**
>
> - A large language model is trained once on a large body of text, then refined to follow instructions and behave like an assistant.
> - It writes one small piece of text at a time, choosing what is statistically likely to come next.
> - It does not store or search a copy of its training text, so a fluent sentence about the law is a prediction, not a quotation.
> - A legal tool wraps the model in software that decides what text the model is shown. Much of what separates two tools built on the same model happens there.

## What is a large language model, for a lawyer's purposes?

A large language model is a program trained on vast amounts of text so that it can produce text of its own: answers, summaries, drafts. "Large" refers to the number of internal values, called parameters, that training adjusts. For a lawyer, it is best understood as a skilled imitator of written language, not a database of legal facts.

Anthropic's [glossary of model terms](https://platform.claude.com/docs/en/about-claude/glossary) describes LLMs as language models "with many parameters" that are trained "on vast amounts of text data" and can "generate human-like text, answer questions, summarize information, and more." OpenAI's help article on [how its foundation models are developed](https://help.openai.com/en/articles/7842364-how-chatgpt-and-our-foundation-models-are-developed), read in a copy archived on October 29, 2026, explains the parameters. It says machine learning models "consist of large sets of numbers, known as 'weights' or 'parameters,' along with code that interprets and uses those numbers."

The ABA's Standing Committee on Ethics and Professional Responsibility used a similar description when it addressed generative AI in 2024. Its [Formal Opinion 512](https://www.americanbar.org/content/dam/aba/administrative/professional_responsibility/ethics-opinions/aba-formal-opinion-512.pdf) calls tools that produce text "prediction tools that generate a statistically probable output when prompted."

Three words describe nearly every legal AI product sold today:

| Term | What it names | Example of the question it answers |
| --- | --- | --- |
| Large language model | The trained set of numbers that writes text | "Which model writes this tool's answers?" |
| Assistant or chatbot | A model refined to follow instructions in a conversation | "Will it do what I asked, in the form I asked?" |
| Legal AI tool | Software that sends the model a question plus chosen text, then handles the reply | "What does it show the model, and what does it do with the answer?" |

The first two are the maker's work. The third is the vendor's, and it is where a lawyer's own documents enter the picture.

## How a large language model is trained: pretraining, then tuning

A large language model is trained in stages. First comes pretraining, in which the model reads a huge body of text and learns to predict the next word. Then fine-tuning and feedback from people shape the raw model into an assistant that follows instructions. Both stages finish before anyone asks a question.

Anthropic's glossary describes pretraining as "the initial process of training language models on a large unlabeled corpus of text," in which models learn "to predict the next word, given the previous context of text in the document." The same entry adds that such pretrained models "are not inherently good at answering questions or following instructions."

That gap is closed by two further steps the glossary defines:

1. **Fine-tuning.** The glossary calls it "the process of further training a pretrained language model using additional data," which makes the model start "mimicking the patterns and characteristics of the fine-tuning dataset."
2. **Reinforcement learning from human feedback.** People rank two or more example responses, and training "encourages the model to prefer outputs that are similar to the higher-ranked ones." This is how a model learns to act like a helpful assistant instead of a text-completion engine.

OpenAI's article describes where its training text comes from. It names three primary sources: information "publicly available on the internet," information "we partner with third parties to access," and information that "our users, human trainers, and researchers provide or generate." It also says it applies filters to remove material it does not want models to learn from.

```flow
# The stages, as the two makers' pages cited above describe them
Pretraining | The model reads a large body of text and learns to predict the next word
Fine-tuning | Further training on chosen examples shapes its habits
Human feedback | People rank sample answers, and training favours the better ones
Release | Training stops. Questions asked later do not change the model unless the maker trains it again
```

Two consequences matter for legal work. The first is a date: training stops, and the model knows nothing published after that point unless the software supplies it. The post on the [AI knowledge cutoff](https://lucernalaw.com/blog/ai-knowledge-cutoff) explains how to find that date and why recent law goes missing. The second is that the model's sense of what a good answer looks like was shaped by people ranking samples, which rewards answers that read well. Reading well and being right are not the same test.

## Why does an LLM predict words instead of looking up the law?

An LLM predicts words because that is the only thing it was trained to do. It holds no searchable copy of the cases and statutes it read. Training adjusted its parameters to reflect patterns in that text, so when it writes about a doctrine it is reconstructing likely language, which is often right and sometimes invented.

OpenAI states this directly. Its article says the model analyses "how words typically appear together in context" and uses that "to predict the next most likely word when generating a response, one word at a time." It adds that the model improved "not by storing the training sentences, but by updating its internal parameters," and that "these models do not store or retain copies of the data they are trained on."

The National Institute of Standards and Technology draws the consequence. Its [generative AI risk profile, NIST AI 600-1](https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.600-1.pdf), defines "confabulation" as generative systems confidently presenting "erroneous or false content," and calls it "a natural result of the way generative models are designed," because "LLMs predict the next token or word in a sentence or phrase." It also notes the risk is "particularly relevant" in domains "which require highly contextual and/or domain expertise." Law is one.

> **Key point.** When a large language model cites a case from memory, nothing was retrieved. The citation is the kind of text that tends to follow that kind of sentence. It may name a real case. It may not.

An analogy helps. Think of a well-read associate who has never kept notes and cannot open a book. Asked about the parol evidence rule, she can give a fluent account, because she has read hundreds of discussions of it. Asked for the pin cite to a particular holding, she produces something that sounds like a pin cite. Her fluency is real. Her recall of specifics is unreliable, and she cannot tell you which of her sentences came from where.

Opinion 512 makes the same point in the vocabulary of ethics. It says generative AI tools "lack the ability to understand the meaning of the text they generate or evaluate its context," and so "may combine otherwise accurate information in unexpected ways to yield false or inaccurate results." The kinds of invention that follow, and which of them a tool's design can reduce, are the subject of the post on [AI hallucinations in legal work](https://lucernalaw.com/blog/ai-hallucinations-in-legal-work).

## Legal tasks that suit a large language model, and tasks that do not

A large language model suits tasks where the text it needs is in front of it and the output is checked: summarizing a deposition it was given, drafting from a record, reorganizing facts. It suits poorly the tasks that depend on recalling specific authority, dates or numbers from training, where fluent language hides invented details.

The dividing line is the source of the facts, not the difficulty of the task. A model asked to summarize a transcript it was handed is working from text it can see. The same model asked for the leading case on a point is working from patterns. The table sorts common requests by that line.

| Request | Where the facts come from | How it tends to go |
| --- | --- | --- |
| "Summarize this deposition" | The transcript sent with the question | Usually useful; omissions and misreadings still happen |
| "Put these emails in date order" | The emails sent with the question | Useful, if every email was sent; a missing one leaves a silent gap |
| "Rewrite this paragraph more plainly" | The paragraph itself | A strength of the method |
| "What is the standard for summary judgment in this circuit?" | Training patterns | Often close, sometimes out of date, unsourced |
| "Give me three cases holding X" | Training patterns | The riskiest request; citations need checking one by one |
| "How many days to respond to this motion?" | Training patterns, unless the rule is supplied | A number that may be wrong or superseded |

The earlier generation of legal machine learning, the kind used to rank documents in e-discovery, worked differently: it sorted documents a lawyer had reviewed into likely relevant or not, and wrote nothing. The contrast is drawn in [how machine learning differs from generative AI in a law office](https://lucernalaw.com/blog/machine-learning-for-lawyers#how-does-machine-learning-differ-from-generative-ai-in-a-law-office).

## The software around the model: what a legal tool adds to an LLM

A legal AI tool is a large language model plus software. The software decides what text the model sees with each question, what instructions it receives, and what is done with the answer, such as checking citations or recording the exchange. Two tools on the same model can behave very differently because of that software.

The model sees only what is placed in its context window, the text sent with a single request. The post on the [AI context window](https://lucernalaw.com/blog/ai-context-window) explains its limits and what happens when a file is too large to send whole. The other pieces of the wrapper are easier to name than to inspect:

- **Instructions.** A tool can send the model standing directions with each question. These shape tone, format and whether it is told to stay within supplied documents.
- **Retrieval.** A research tool searches a database for passages; a matter tool selects passages from uploaded files. What is not selected cannot appear in the answer.
- **Checks on output.** Some tools check that a cited passage exists. A passage that exists has not thereby been shown to support the sentence it follows.
- **Records.** Whether the question, the answer and the model used are kept, and who can read them.

Lucerna Law is one example of that design, and its homepage states the limits of each piece. It says the model is given the matter's files and "told to answer only from it, to cite each statement, and to say so when the file does not answer," and adds that "those are instructions, not guarantees." It also says the server checks each citation names a passage the model was given, but "does not check that the passage supports the statement." Its [answers to common questions](https://lucernalaw.com/#faq) set out which model provider answers and what is sent.

## Which large language model does a legal tool run on?

Many legal tools run on a model made by a separate company, and some do not name it on screen. A lawyer can find out from the vendor's documentation or by asking in writing which model answers questions, who hosts it, and whether the maker may train on what is sent. Those answers matter more than the model's brand name.

Questions worth putting to a vendor, in writing:

- [ ] **Which model, and which maker?** Ask for the model family and whether it changes without notice.
- [ ] **Who runs it?** The model maker's own service and a cloud provider hosting the same model can be under different terms.
- [ ] **What is sent with each question?** The question alone, selected passages, or whole documents.
- [ ] **Is anything sent used for training?** Ask where that promise is written, not just whether it is made.
- [ ] **Is the model recorded with each answer?** If a later version answers differently, a record shows which one gave the original answer.

The question of training on client data deserves its own reading, because a no-training promise can live in several documents and mean different things in each. The post on [AI that does not train on your data](https://lucernalaw.com/blog/ai-that-does-not-train-on-your-data) goes through where that promise must be written.

None of this requires a lawyer to understand the mathematics. It requires the same habit applied to any expert source: knowing what it was built from, what it was shown for this question, and how its answer will be checked. A large language model is a capable writer with no notes. The discipline is in giving it the right pages and reading its work against them.

The next step after understanding how a model writes is understanding how a tool finds the pages to give it. Most tools no longer match words alone; the post on [semantic search for lawyers](https://lucernalaw.com/blog/semantic-search-for-lawyers) explains how matching by meaning works, and where it misses.
