Step 5 of 7 in Artificial Intelligence & Machine Learning
Language Models & NLP
Tokenization, transformers, and what a language model is doing. Citation needed
The whole, before the parts
Natural language processing, or NLP, develops methods for working with human language. A language model assigns probabilities to language sequences; fluent output alone does not establish that its claims are true. Citation needed
For example, when a system continues a half-written sentence, it uses the supplied text to choose what comes next. Repeating that step produces a longer passage whose accuracy still needs checking. Citation needed
Follow generation from the units of text the model handles, through the information available for a prediction, to repeated next-unit prediction. These parts explain how a continuation is produced without treating fluency as evidence of truth. Citation needed
Terminology and core concepts
-
Token
A token is a unit of text, such as a word or word fragment, used by a model. Citation needed
- Must one token correspond to one word?
- no Citation needed
-
Context
Context is the information supplied for the current prediction or generation. Citation needed
- Can information absent from context be assumed available to the model?
- no Citation needed
-
Autoregressive generation
Autoregressive generation produces a sequence one part at a time using earlier parts. Citation needed
- What is predicted at each generation step?
- the next token’s probability distribution Citation needed
Try an example
A language model supplies a convincing quotation and a book title. What should you check before using it as evidence? Citation needed
Show the reasoning
Find the passage in a reliable copy of the source. Plausible wording and a plausible citation do not establish that the quotation exists.
Citation needed
Sources and further reading
- Artificial Intelligence: A Modern Approach — background and further study for this introduction.
Core notes reviewed .
Learning path
Continue through Artificial Intelligence & Machine Learning in order, using the concepts above to connect this topic to the next.