Skip to content

large language model (LLM)

A large language model (LLM) is a neural network trained on very large text corpora using self-supervised objectives, such as next-token prediction or masked modeling. It learns to predict missing or future tokens, which enables broad language understanding and generation.

You can watch that loop run one token at a time, taking the most likely token at each step or sampling from the distribution instead:

Interactive diagram — enable JavaScript to view.

Modern LLMs are typically transformer-based and are pre-trained once on large unlabeled text corpora. They’re then adapted to downstream tasks via prompting, fine-tuning, or intermediate techniques, such as instruction tuning or reinforcement learning from human feedback.

Many current LLMs are also multimodal: the same pre-training and adaptation recipe extends beyond text, so a model can take in or produce images, audio, and other data alongside tokens of text.

They support multiple capabilities, such as text generation, summarization, question answering, translation, code generation, and tool use, where the model calls external functions or services and acts on the results.

Current LLMs also expose a reasoning mode, where the model produces intermediate reasoning tokens before its answer. That extra step improves results on multi-step math, coding, and analysis tasks, and a model built around it is called a reasoning model or large reasoning model (LRM).

They also inherit limitations from their training data and modeling process, including factual inaccuracies, biases, and failures in reasoning or coherence. Every model is bounded by a finite context window, which is large on current frontier models but still a hard ceiling.

Build an LLM RAG Chatbot With LangChain

Tutorial

Build an LLM RAG Chatbot With LangChain

Large language models (LLMs) have taken the world by storm, demonstrating unprecedented capabilities in natural language tasks. In this step-by-step tutorial, you'll leverage LLMs to build your own retrieval-augmented generation (RAG) chatbot using synthetic data with LangChain and Neo4j.

intermediate ai databases data-science

For additional information on related topics, take a look at the following resources:

Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials.


By Martin Breuss • Updated Sept. 22, 2026 • Reviewed by Leodanis Pozo Ramos