AI & LLMs

What is a large language model (LLM)?

A large language model (LLM) is an AI system trained on vast amounts of text to predict what comes next in a sequence, which lets it generate writing, answer questions, and produce code.

New to Bolt? Sign up free.

Technical definition

A large language model is a neural network, typically a transformer, trained on large text corpora to model the probability of the next token given preceding tokens. Training adjusts billions of parameters so the model captures statistical structure in language, including syntax, factual associations, reasoning patterns, and the conventions of programming languages.

At inference, the model receives a prompt and generates tokens one at a time, each conditioned on everything before it. It holds no database of facts and performs no lookup. Everything it produces is generated from learned patterns.

In plain terms

An LLM is a very good prediction machine for text. It read an enormous amount of writing, learned which words tend to follow which, and now continues whatever you give it.

That one property explains both its strengths and its failures. It is excellent at anything that follows a pattern. It is unreliable on anything requiring a fact it has to have right, because it is generating a likely answer rather than retrieving a true one.

Why it matters

Knowing that an LLM predicts rather than retrieves tells you when to trust it and when to check.

Trust it for structure, phrasing, and code that follows established conventions. Verify anything specific: a number, a date, a library that must exist, a name, a price. Those are the places where the likely answer and the correct answer come apart, which is what a hallucination is.

The other consequence is limits. A model can only consider what fits in its context window, and everything it reads and writes is counted in tokens. Both of those shape what building with AI costs and where it breaks down.