Large Language Model (LLM)
A large language model is a neural network trained on vast amounts of language data. A generative LLM uses patterns learned during training and the context you supply to produce text one token at a time.
What changes when you ask a question?
Imagine a message that says, “The lift is out of order until Friday.” A writing assistant can turn it into a shorter notice. Two different processes make that possible.
During training
The model sees many examples of language. Predictions are compared with training targets, and the model’s numerical weights are adjusted. Repeated updates help it learn patterns such as how a service notice is worded.
During inference
You supply the lift message and ask for a sign. The model uses its existing weights and that message to generate “Lift closed until Friday.” The date comes from the text you supplied.
How training gives a model its range
Many language models use a transformer architecture. Tokenization turns text into a sequence the model can process. A generative model can practice by predicting the next token across large collections of text. The patterns it learns can later help it finish a sentence, translate a request, or summarize a report.
After pretraining, developers can use fine-tuning with examples of tasks and responses. Methods such as reinforcement learning from human feedback can use people’s preferences to shape how the model responds.
Which part belongs to the application?
If you ask, “Is the lift running now?”, the model needs a current source. An application might retrieve a maintenance notice using RAG, or query a building system through a tool. The model can then use the returned information to phrase an answer. The application controls which records it can access.
This distinction helps when reading a product claim. Drafting a sign is a language task. Looking up a repair time needs access to a record. Checking that the record is current takes another step. A fluent time estimate without supporting evidence can be a hallucination.
Follow the idea
Context window explains which messages and documents can inform a response.
Tool use shows how an application can let a model request information or an action.
Related concepts
Source · Hugging Face’s guide to transformer models and training
Return to Large Language Model in the A–Z glossary