Home / AI Architecture & System Design / Glossary
Glossary of LLM system terms
Plain-language definitions of the 52 terms used throughout the system design answers, each linked to the page that covers it in depth.
- ACL / permission filtering
- Access-control lists recording who may see each document. Retrieval must filter by them before results reach the model. Learn more →
- Agent and agent loop
- A model that decides its own next steps in a loop: think, call a tool, read the result, repeat, until done or a limit is hit. Learn more →
- ANN search / HNSW
- Approximate nearest-neighbour search trades a little recall for large speedups. HNSW, a layered graph, is the most common index. Learn more →
- ASR and TTS
- Automatic speech recognition (speech to text) and text-to-speech. Streaming versions process audio in small frames for low latency. Learn more →
- Autoscaling and cold start
- Adding or removing replicas based on load. For self-hosted LLMs a cold start (allocate GPUs, load tens of GB of weights, warm up) takes tens of seconds to minutes, so warm spares matter.
- BM25 (keyword search)
- The classic keyword-ranking function behind full-text search. It's strong on exact terms such as product names, error codes and IDs that embeddings can miss.
- Chunking
- Splitting documents into passages (often a few hundred tokens, by heading) that are embedded and retrieved individually. Learn more →
- Circuit breaker and fallback
- Stop calling a failing dependency for a while and use a fallback (another provider, a smaller model, or a non-LLM path) instead of piling up timeouts.
- Context compaction
- Replacing older parts of a long agent or chat context with a summary so it fits the window. Breaks the prompt cache once, so it's done rarely.
- Context window
- The maximum number of tokens (prompt plus output) a model can attend to in one request.
- Continuous batching
- A serving technique that adds and removes requests from the running batch at every decode step, keeping GPUs busy. Learn more →
- Embedding
- A vector (e.g. 1,024 numbers) that represents the meaning of a piece of text, so that similar texts have nearby vectors.
- Fill-in-the-middle (FIM)
- A training and prompting format where the model sees the code before and after a gap and generates the middle. The basis of inline code completion. Learn more →
- Fine-tuning / LoRA
- Further training a model on task examples to change its behaviour. LoRA trains a small low-rank add-on instead of all weights. Learn more →
- Golden set / eval set
- A fixed, labelled set of representative inputs used to compare versions of a system before shipping. Learn more →
- Groundedness / faithfulness
- Whether every claim in an answer is supported by the provided sources. Checked with an entailment model or an LLM judge.
- Guardrails
- Checks before and after the model: input classifiers (abuse, injection, PII) and output checks (policy, groundedness, format). Learn more →
- Hallucination
- Fluent output that is false or unsupported. Learn more →
- Harness
- Everything around the model that turns it into a working product: the loop, tool definitions, context management, permissions, sandboxing and logging. Learn more →
- Human in the loop
- Requiring a person to review or confirm risky actions before the system performs them.
- Hybrid search and RRF
- Running keyword (BM25) and vector search together and merging the ranked lists, commonly with Reciprocal Rank Fusion: score = Σ 1/(k + rank). Learn more →
- Idempotency key
- A unique key sent with an action so that retrying it never performs it twice (e.g. never refund twice).
- KV cache
- Stored attention keys and values for tokens already processed, so each new token doesn't recompute them. Its memory size limits how many requests a GPU can serve at once. Learn more →
- LLM-as-judge
- Using a strong model with a rubric to grade outputs that have no single correct answer. Must be validated against human labels. Learn more →
- MCP (Model Context Protocol)
- An open protocol for connecting AI applications to tools and data sources through standard servers. Learn more →
- Message queue / async worker
- A buffer between producers and workers so that bursts and slow jobs don't block requests. Failed jobs go to a dead-letter queue for inspection.
- Model router / cascade
- Sending each request to the cheapest model likely to handle it well, or trying a small model first and escalating when it's unsure. Learn more →
- Orchestrator
- The service that runs the steps of a request (guardrails, retrieval, model calls, tools) in order and holds the state between them.
- p95 / p99 latency
- The latency that 95% (or 99%) of requests beat. Targets are set on percentiles, not averages, because slow outliers are what users remember.
- PII redaction
- Detecting and masking personal data (names, emails, card numbers) before logging or sending it to third parties.
- Prefill and decode
- The two phases of generation. Prefill processes the whole prompt in parallel (compute-bound, sets TTFT); decode produces one token at a time (memory-bandwidth-bound, sets TPOT). Learn more →
- Prompt caching
- Reusing the computed state of a prompt prefix (system prompt, tools, documents) across requests that start with exactly the same tokens. Cuts cost and TTFT; requires byte-identical prefixes.
- Prompt injection
- Text in user input or retrieved content that tries to override the system's instructions. Can't be fully filtered, so limit what a compromised model can do. Learn more →
- Quantization
- Storing weights (and sometimes activations or the KV cache) in fewer bits, e.g. int8, fp8 or int4, to use less memory and speed up memory-bound decoding. Learn more →
- RAG (retrieval-augmented generation)
- Retrieving relevant documents at request time and putting them in the prompt so the model answers from them, with citations, instead of from memory. Learn more →
- Rate limit / token bucket
- Caps on requests or tokens per minute. Token buckets refill at a fixed rate and allow short bursts. Learn more →
- Recall@k / nDCG / MRR
- Retrieval metrics. Recall@k: did the right document appear in the top k? nDCG and MRR also reward ranking it higher. Learn more →
- Reranker / cross-encoder
- A model that reads the query and each candidate passage together and scores relevance precisely. Too slow for millions of documents, so it reorders the top ~50 from a fast first stage. Learn more →
- Sandbox / microVM
- An isolated environment (often a lightweight virtual machine) where agent-generated code runs without access to secrets, other tenants or production. Learn more →
- Semantic cache
- Reusing a previous answer when a new question is close in embedding space to a cached one. Higher hit rate than exact matching, with a risk of wrong matches. Learn more →
- Shadow mode and canary
- Shadow: run the new version on real traffic without showing its output. Canary: show it to a small share of users first, with automatic rollback.
- Speculative decoding
- A small draft model proposes several tokens and the large model verifies them in one pass; same output distribution, lower latency. Learn more →
- Streaming / SSE
- Sending tokens to the client as they're generated instead of waiting for the full answer. Server-Sent Events (SSE) is the usual HTTP mechanism: one long response carrying many small events. Learn more →
- Structured output / constrained decoding
- Forcing the model's output to match a schema, either by masking invalid tokens during decoding or by validating and repairing afterwards. Learn more →
- Temperature and sampling
- Settings that control randomness when picking the next token. Low temperature for extraction and code; higher for creative tasks. Learn more →
- Token
- The unit LLMs read and write: a word piece of roughly 3–4 characters of English. Prices, context limits and latency are all counted in tokens. Learn more →
- Tool calling / function calling
- The model returns a structured request to call a function (name and JSON arguments); your code runs it and sends the result back. Learn more →
- TPOT / inter-token latency
- Time between consecutive output tokens once generation has started; sets streaming speed. 25–40 ms per token reads faster than people do. Learn more →
- Traces and spans
- A trace records one request end to end; spans are its timed steps (retrieval, model call, tool call). The basis for debugging latency and cost. Learn more →
- TTFT (time to first token)
- Time from sending a request until the first output token arrives. Dominated by queueing and prefill. It's what users feel as 'responsiveness' when output is streamed. Learn more →
- VAD, end of turn and barge-in
- Voice activity detection finds speech in audio; end-of-turn detection decides the speaker has finished; barge-in is the caller interrupting, which must stop the agent's audio. Learn more →
- Vector index / vector database
- A store that finds the vectors nearest to a query vector, usually approximately, for semantic search.