Skip to contentGlossary
- Token
- a chunk of text, often part of a word, that a model reads or writes. Limits and prices are counted in tokens.
- Tokenizer
- the code that splits text into tokens. Each vendor's is different, so counts differ between models.
- Context window
- the most tokens a model can handle in one request, counting input and usually the reply.
- Input tokens
- the tokens you send: system prompt, history, documents, tool results and the user message.
- Output tokens
- the tokens the model writes back. Often priced higher than input.
- Max output tokens
- a cap you set on reply length. Hitting it cuts the reply off.
- Finish reason
- the field in an API response that says why the model stopped, such as done or length.
- Truncation
- text cut off because it did not fit, either from the input or the reply.
- System prompt
- the standing instructions sent at the start of each request.
- Chat history
- past turns re-sent with each call so the model can follow the conversation.
- Prompt caching
- a provider feature that reuses a recently sent prompt prefix, usually cheaper and faster.
- Cache hit
- a request whose prefix matched cached text. Change the prefix and you lose it.
- Rate limit
- a cap on requests or tokens per minute. Going over returns an error, often 429.
- Retry
- sending a failed request again. Each retry is billed again.
- Backoff
- waiting longer after each failed try before retrying.
- Jitter
- random extra wait added to backoff so clients do not retry at once.
- Idempotency key
- an ID that lets a server ignore a repeated request it already handled.
- Tool call
- when the model asks your code to run a function, such as a search or a database lookup.
- Tool result
- the output of that function, pasted back into the context as text.
- Stale result
- a tool result that was true when fetched but is out of date now.
- Agent
- a loop where the model plans, calls tools and reads results until a task is done.
- Retrieval (RAG)
- fetching relevant documents and adding them to the prompt before the model answers.
- Chunk
- a piece of a document cut to a set size for retrieval.
- Embedding
- a list of numbers that represents text, used to find similar chunks.
- Summarization
- replacing old turns or long text with a shorter version to save tokens.
- Drift
- a long session slowly losing early facts, rules or the goal.
- Hallucination
- a confident answer that is not supported by the input or by fact.
- Cost per task
- what one finished, correct result costs, including retries and extra calls.