In a large language model, what is a token?
- Exam domain
- Generative AI and large language models
- Difficulty
- Easy
- In this mock
- 5 questions on this domainPractise this domain
Why D is the answer
A small piece of text, such as a word or part of a word
A tokenizer splits text into tokens, often whole words or word pieces. Models read and write tokens, and context limits and prices are counted in tokens.
Remember: Token: a word or word piece.
In detail
- Tokens are words or parts of words.
- Limits and costs are counted in tokens.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. A password that unlocks the model API for one single requestWrong
API keys authenticate requests; they are not tokens in this sense.
B. A full sentence that the model reads as a single unitWrong
Sentences are split into many tokens.
C. A label attached to each training documentWrong
Training labels are a different idea.
D. A small piece of text, such as a word or part of a wordRight
Token: a word or word piece.
Use case
An illustrative scenario, not a real incident.
Illustrative: a team estimates the cost of summarising 10,000 tickets by counting their tokens first.
See it in different ways
flowchart LR S0["Text"] --> S1["Tokenizer"] --> S2["Token IDs"] --> S3["Model"]
How to read this chart
- Read it in order: Text, then Tokenizer, then Token IDs, then Model.
mindmap
root(("Tokens"))
n1["Units"]
n2["Words"]
n3["Word parts"]
n4["Punctuation"]
n5["Limits"]
n6["Context window"]
n7["Maximum output"]How to read this chart
- The centre is "Tokens".
- "Units" covers "Words", "Word parts", "Punctuation".
- "Limits" covers "Context window", "Maximum output".