Azure Legal PLLC
Book a call

What Does an AI Model Actually Do, and Why Does It Make Things Up?

AI

How a large language model produces its answers, why it invents facts and citations, and what that means for anyone who relies on one.

Part of our AI series.

A large language model writes by predicting which words are likely to come next. It learned those patterns from the text it was trained on. It doesn't look anything up unless the product around it has been built to, and nothing inside it checks whether a sentence is true. A fake case citation comes out in the same confident tone as a real one. Courts have consistently held the person who relied on the output responsible for it. Most of the other legal questions about AI start from that point.

How a model produces an answer

A large language model, or LLM, is a statistical model trained on an enormous amount of text. Training adjusts billions of internal numbers, called parameters, until the model gets good at one narrow task. Given some text, it predicts the next small piece. That piece is called a token, and it's usually a word or part of a word. When you ask a question, the model predicts a token, adds it to what's there and predicts again, one token at a time, until it reaches an answer.

ChatGPT, Claude, Gemini and the legal AI tools built on them wrap the model in other software. Some run a search first, over the web or a set of documents, and give the results to the model along with your question. That's called retrieval-augmented generation. Some let the model call tools or run code. These features change what the model has in front of it when it answers, but it still writes the answer by predicting one token after another.

There's also a limit on how much the model can take in at once, called its context window. A document nobody attached isn't in it. In a long enough conversation, neither is the material from the start.

I find it helps to stop thinking of the model as a database. It hasn't stored your contract, or the statute, or the case. What it has are patterns, and it produces text that fits them.

Why it makes things up

Ask a model for a New York case holding that a particular clause is unenforceable. If its patterns don't contain a real one, it writes something anyway. A case name in the right format with a plausible reporter citation fits the pattern perfectly well. Nothing in the prediction step checks whether the case exists. Most people call this hallucination. NIST's Generative AI Profile uses the word confabulation and lists it among the main risks of generative AI.

Retrieval helps, though less than some vendors suggest. Researchers at Stanford tested legal research tools built on retrieval in 2024. The tools still gave incorrect or unsupported answers to a real share of the queries, though less often than general chatbots did.

Models also go out of date. They know only what was in their training data, up to a cutoff, unless the product feeds them something newer. They tend to agree with whoever is asking, and a question that assumes its own answer usually gets that answer back. The same question asked twice can get two different replies, because the model picks among likely next tokens instead of always taking the single most likely one.

Why it matters legally

Mata v. Avianca, 678 F. Supp. 3d 443 (S.D.N.Y. 2023), is the case most lawyers have heard of. Two lawyers filed a brief citing cases ChatGPT had made up and then stood by them when the court asked. The court sanctioned them and their firm. Damien Charlotin keeps a database of court decisions involving AI-fabricated material. It now has hundreds of entries, from lawyers and from people representing themselves.

None of this is special to lawyers. A business whose website chatbot tells a customer something false can be held to it, and I go through Moffatt v. Air Canada in the piece on liability. A company that tells investors or customers its product is accurate when it isn't has made a false claim, and the FTC and SEC have brought cases on exactly that. An employer that screens applicants with a model answers for who gets screened out.

Fluent writing makes the errors harder to spot. People tend to trust prose that sounds sure of itself, and a model's wrong answers sound as sure as its right ones.

What helps

The habit that does the most good is treating every fact, citation and quotation in AI output as unchecked until someone has read the source. Tools that link each statement to the document it came from make the checking quicker, though a person still has to read the source.

How you ask matters too. "What are the arguments on each side?" gets a more useful answer than "Confirm that this clause is enforceable." I also keep a note of which tool and version produced a piece of work, in case anyone asks later.

Next step

Pick one task your team already uses AI for and write down who checks the output before anyone relies on it, and how. If nobody checks it, start with that task.

If you'd like to talk through how your company checks what its AI tools produce, I'm glad to. Book a quick call

If you're a lawyer, I also write the Azure Intelligence Legal Brief, a weekly newsletter for lawyers on AI in practice: the rulings, rules and tools, in plain English. Subscribe at brief.azurelegal.xyz

Attorney advertising. For general information only; not legal advice. No attorney-client relationship is formed. Prior results do not guarantee a similar outcome.

All articles

Comments

No comments yet. Be the first to weigh in.

Comments are reviewed before they appear. By posting, you agree to the Terms.

Azure Legal PLLC
418 Broadway, STE R #11836
Albany, NY 12207
(929) 684‑1079

Attorney advertising. Prior results do not guarantee a similar outcome.