Skip to content
PromptFable guideGlossary

Glossary of AI Engineering and Agent Terms

Plain-language definitions of the terms you meet when building software with AI assistants and AI agents, from tokens and context windows to prompt injection and idempotency.

For: Developers and technical leads new to LLM APIs and AI agents

How to use this glossary

Terms are grouped by topic, so related ideas sit together. Each definition is vendor-neutral: it describes the idea, not one product's implementation of it.

Models, tokens and prompts

Large language model (LLM)
A model trained on large amounts of text to predict what text comes next. Chat assistants, coding assistants and agents are applications built around one.
Token
The unit of text a model reads and writes: often a word fragment, a short word or a punctuation mark. Limits, speed and API charges are usually counted in tokens, not characters or words.
Context window
The maximum number of tokens a model can consider in one request, including instructions, history, documents and tool definitions; some providers also count the response. Anything outside it is invisible to the model.
Prompt
The input sent to a model. In an application it is usually assembled from several parts: instructions, examples, retrieved data and the user's message.
System prompt
Instructions that set the model's role, rules and output format for a whole conversation, kept separate from user messages. Also called a system instruction.
Few-shot examples
Worked input-and-output pairs included in a prompt to show the model the pattern you want, rather than only describing it.
Temperature
A sampling setting that controls how varied the output is. Lower values make responses more predictable; they do not make them more accurate.
Stop reason
A field in an API response that says why generation ended: the answer was complete, a token limit was reached, or the model requested a tool. Some providers call it a finish reason.
Structured output
Output in a machine-readable format, usually JSON matching a schema you supply. Some APIs can constrain output to the schema; your code should still validate it.
Hallucination
Fluent, confident output that is false, such as an invented function, package, citation or fact. It is a known failure mode of language models, which is why output needs checking.
Non-determinism
The same prompt can produce different outputs on different runs. Tests and evaluations must allow for this rather than expect identical text.

Tools and agents

AI agent
An application in which a model works towards a goal over several steps, choosing actions such as tool calls and using their results, within limits set by the application.
LLM workflow
A fixed sequence of steps, written in code, in which a model performs some of the steps. Your code, not the model, decides the order. Often the safer choice when the steps are known in advance.
Tool
A capability your application exposes to a model, described by a name, a description and a parameter schema; for example, 'look up an order by its ID'.
Tool calling (function calling)
The model returns a structured request to use a tool, with arguments. Your application decides whether to run it, runs it and sends back the result. The model never executes your code itself.
Tool schema
The machine-readable description of a tool's parameters, written in JSON Schema or a format closely based on it. It tells the model which arguments are valid and lets your code check them.
Agent loop
The cycle of calling the model, executing any requested tools, returning the results and calling the model again, until it gives a final answer or a limit is reached.
Orchestration
The code that controls how an agent runs: the loop, routing between steps or agents, limits, retries and hand-offs to people.
Handoff
Passing a task, with the context it needs, from one agent to another, or from an agent to a person.
Model Context Protocol (MCP)
An open protocol that lets AI applications connect to tools and data sources through a standard client-server interface, instead of a custom integration for each one.

Knowledge and retrieval

Embedding
A list of numbers (a vector) that represents the meaning of a piece of text, so that texts with similar meanings have vectors close together.
Vector search
Finding the stored items whose embeddings are closest to the embedding of a query. Also called similarity search or semantic search.
Chunking
Splitting documents into smaller passages before creating embeddings, so retrieval returns focused passages rather than whole documents.
Retrieval-augmented generation (RAG)
Retrieving relevant passages from your own sources at request time and adding them to the prompt, so the model answers from that material rather than from its training alone.
Metadata filter
A condition on stored attributes, such as product line, date or access level, applied alongside vector search to narrow what can be retrieved.
Grounding
Tying an answer to specific, supplied sources so its claims can be traced and checked. A grounded answer can show where its information came from.
Citation
A link from part of an answer to the source passage that supports it. Citations let a reader verify a claim; they do not prove the claim is correct.
Conversation state
Information carried between turns of one conversation, usually the message history. Persistent memory, which survives across conversations, is separate and needs its own retention rules.

Safety and security

Prompt injection
Text that tries to override an application's instructions. It can be direct, typed by a user, or indirect, hidden in a web page, email, file or tool result that the model reads.
Untrusted input
Any content your application did not write itself, including user messages, retrieved documents and tool results. Process it as data; never follow it as instructions.
Guardrail
A check outside the model that limits what goes in or comes out: input filtering, output validation, an allowlist of actions or a policy rule enforced in code.
Least privilege
Granting each component, credential and tool only the access its task needs, so a mistake or a successful attack can do limited damage.
Human-in-the-loop
A design in which a person reviews and approves certain actions before they happen, typically anything consequential or hard to reverse.
Excessive agency
Giving an agent more tools, permissions or autonomy than its task requires, which turns ordinary model errors into real-world damage.
Sandboxing
Running code or tools in an isolated environment with restricted access to files, network and credentials, so failures stay contained.
Secret
A credential such as an API key, password or access token. Secrets belong in environment variables or a secret manager, never in source code, prompts or logs.

Quality and operations

Evaluation (eval)
A repeatable test of how well a model-based feature does its job, run against a set of examples with defined pass criteria.
Evaluation dataset
A collection of realistic inputs, each paired with the expected behaviour or a rubric, used to score a prompt, model or agent consistently over time.
Rubric
Written criteria for judging an output that has no single correct form, such as a summary. It makes human and automated grading more consistent.
Regression test
A test that checks something that used to work still works after a change. For AI features, re-run your evaluations whenever a prompt, model, tool or retrieval setting changes.
Idempotency
The property that repeating an operation has the same effect as doing it once. It makes retries safe: an idempotent refund request cannot pay out twice.
Idempotency key
A unique value sent with a request so the receiving system can recognise a retry and avoid repeating the action.
Rate limit
A cap on how many requests or tokens you can use in a period. Exceeding it usually means 'wait and retry', not 'your request is wrong'.
Exponential backoff
A retry strategy that waits longer after each failure, usually with added randomness (jitter) so that many clients do not retry at the same moment.
Streaming
Receiving a response in pieces as it is generated, instead of waiting for all of it.
Observability
Being able to tell what a system did from its logs, metrics and traces. For an agent, that includes which tools it called, with which arguments and with what result.
Written by
PromptFable Editorial
Last updated 13 Nov 2026
Review
Not yet reviewed
All developer resources

PromptFable is independent and is not affiliated with, endorsed by or sponsored by Anthropic, Google, OpenAI or any other vendor. Claude, Gemini, Google AI Studio and other product names are trademarks of their respective owners.