cheat-sheets

LLM Glossary

Short definitions of terms used across the AI sheets.

Verification: conceptual definitions; no commands.

Core Terms #

TERMMEANING
LLMLarge language model: a neural network that predicts the next token
TokenA chunk of text (a word, part of a word or punctuation); the unit of billing and limits. English averages roughly 4 characters per token (approximate)
Context windowThe maximum tokens (prompt plus output) the model handles in one request
PromptThe input text; split into system prompt (rules) and user messages
CompletionThe model’s output
InferenceRunning a trained model to get output (as opposed to training)
ParametersThe learned weights; “7B” means seven billion
EmbeddingA vector representing text meaning, used for search and clustering
HallucinationA confident but false output

Sampling #

TERMMEANING
TemperatureRandomness; low is focused, high is varied
Top-p (nucleus)Sample only from the smallest set of tokens whose probability sums to p
Top-kSample only from the k most likely tokens
Max tokensCap on output length
Stop sequenceText that ends generation
SeedFixes randomness where supported; not a guarantee of identical output

Usage Patterns #

TERMMEANING
System promptStanding instructions for a conversation
Few-shotExamples included in the prompt
Chain of thought / extended thinkingThe model reasons step by step before answering
Tool use / function callingThe model requests that your code run a function and return the result
Structured outputOutput constrained to a JSON schema
AgentAn LLM in a loop that calls tools until a goal is met
RAGRetrieval-augmented generation: fetch relevant text and add it to the prompt
Prompt cachingReusing a repeated prompt prefix at lower cost and latency
Batch APIAsynchronous bulk requests at reduced price
Fine-tuningFurther training on your data
LoRASmall adapter weights for cheap fine-tuning
MCPModel Context Protocol; see MCP
Prompt injectionUntrusted text that tries to override the model’s instructions

Running Models #

TERMMEANING
Open weightsDownloadable model weights; the licence may still restrict use
QuantisationLower-precision weights to save memory; see quantisation
GGUFQuantised single-file format for llama.cpp and Ollama
VRAMGPU memory; the usual limit on model size
KV cacheMemory that grows with context length during generation
OffloadPlacing some layers on the GPU and the rest on CPU
Tokens per secondGeneration speed
MoEMixture of experts: only some parameters are active per token
DistillationTraining a small model to imitate a larger one

See Also #

Search all sheets

Tip: / or Ctrl/Cmd+K to open, Esc to close.