0
What is a large language model (LLM), and how does it work?
1 Answer
0
A large language model (LLM) is an AI system trained on an enormous amount of text: books, websites, articles, code and more. ChatGPT, Gemini, Claude, Llama and India's own models like those from Sarvam are all built on LLMs.
How it works, simply:
- Training: the model reads billions of sentences and repeatedly tries to predict the next word (more precisely, the next "token", a word or piece of a word). Each time it is wrong, its internal settings, called parameters, are adjusted slightly. Large models have billions of these parameters.
- Learning patterns: by doing this at massive scale, the model picks up grammar, facts, writing styles, reasoning patterns and even how to write code.
- Fine-tuning: developers then train it further on examples of helpful conversations, and use human feedback, so it answers questions properly and avoids harmful content.
- Generating: when you type a question, the model writes the answer one token at a time, each time choosing a likely next token based on everything so far.
Important limits:
- It does not "look up" facts like a database unless it is connected to search or documents. It can sound confident and still be wrong, which is called hallucination.
- Its knowledge has a cut-off date from when training ended.
- It reflects patterns, and sometimes biases, in its training data.
To get better results from an LLM, see our tips on writing good prompts.