Research Careers Contact

GlossaryLarge language model

Large language model

A large language model, or LLM, is a neural network trained on very large amounts of text to predict the next piece of text in a sequence. That simple training goal produces a model that can answer questions, summarize documents, write and read code, follow instructions and call tools.

How it works

Text is first split into tokens, small units such as words or word fragments, and each token becomes a vector of numbers. Most LLMs use the transformer architecture, introduced in the 2017 paper "Attention Is All You Need." A transformer passes those vectors through many layers. In each layer, an attention mechanism lets every token weigh information from every other token in the input, so the model can relate a word to context far away in the text.

Training has stages:

  1. Pretraining. The model learns to predict the next token across a huge, broad body of text. This is where it learns language, facts and patterns, and where most of the compute goes.
  2. Instruction tuning. The model is further trained on examples of prompts and good responses, so it follows instructions instead of only continuing text.
  3. Preference tuning and safety training. The model is adjusted using human or automated feedback on which answers are better, more helpful or safer.
  4. Reasoning training. Many models are further trained to work through problems in intermediate steps before answering. This spends more computation at inference on hard questions and produces a reasoning model.

At use time, called inference, the model reads a prompt and generates a response one token at a time, each time choosing the next token from a probability distribution. Settings such as temperature control how much randomness goes into that choice.

A 2020 paper on a large model showed that scale alone let one model perform many tasks from a few examples in the prompt, without task-specific training. Model capability has grown with model size, data and training methods since. Many models also take images and audio as input, turning them into tokens alongside text, which makes them multimodal.

LLM vs agent

An LLM is the model: it takes text in and produces text out. An agent is a system built around a model that also plans steps, calls tools, reads their results and keeps working toward a goal. The LLM provides the reasoning and language. The agent adds tools, memory, permissions and limits.

Why it matters

LLMs turn language into an interface for software. An engineer can ask for a parts comparison, a summary of a datasheet or a first draft of a test script in plain words. In manufacturing, LLMs read and write the many documents that surround every build: BOMs, work instructions, change orders, defect notes and quality reports.

They also have known limits. They can state wrong facts fluently, a problem called hallucination. They know only what was in their training data unless given current information. They can be inconsistent between runs. NIST's Generative AI Profile describes these risks and ways to manage them.

How to get it right

  • Give it the source. Supply the actual documents, data or tool results the answer should come from, through retrieval or tools, instead of relying on what the model remembers.
  • Ask for structure. Request structured output when software will read the answer.
  • Check important outputs. Use rules, tests, tools or a person to check answers that drive decisions.
  • Split the work. Use the model for language and reasoning, and use deterministic software for exact math, rule checks and records.
  • Track versions. Record which model, prompt and settings produced each output, since a model change can change results.

LLMs in robotics and drone hardware

Hardware teams use LLMs to search and summarize datasheets, draft and review requirements, write test and analysis scripts, and explain logs. In a factory, they read work orders, change orders and defect reports and turn them into structured data that other systems can act on.

For those uses, the model's output has to be tied back to sources and checked by tools, because an invented pin number or tolerance becomes a physical defect once a board is built.

Learn more