Prompt Engineering
The practice of designing inputs to LLMs to reliably produce useful outputs — through structure, examples, role-setting and constraints.
Prompt engineering is how you control an LLM without changing its weights. Effective techniques include explicit role and task definition, few-shot examples, output schemas (JSON, XML), step-by-step reasoning prompts, and clear acceptance criteria.
Modern systems combine prompting with structured tools: function calling, JSON mode, and constrained decoding force the model into machine-readable output. Inside agents, prompts are layered — a system prompt, a task prompt, retrieved context, and tool descriptions are stitched together for each step.
As models get stronger, the centre of gravity is shifting from clever phrasing to good context engineering: giving the model the right information, tools and examples for the task.
Related terms
- Large Language Model (LLM)
A neural network trained on massive text corpora to predict the next token, used for chat, coding, reasoning and as the brain inside AI agents.
- AI Agent
An LLM-based system that can plan, use tools and take multi-step actions toward a goal — not just answer a single prompt.
- Retrieval-Augmented Generation (RAG)
A technique that retrieves relevant documents at query time and feeds them into the LLM's prompt, so the model can answer from your data instead of memorising it.
More to explore
Other wiki entries that touch on Prompt Engineering.
- Tokens
The atomic units that LLMs read and write — sub-word pieces produced by a tokenizer. Pricing and context limits are measured in tokens, not words.
- Context Window
The maximum number of tokens an LLM can read in a single request, including the prompt, retrieved documents and the model's own reply.
- Multimodal AI
AI models that natively accept and/or produce more than one modality — text, image, audio, video — in a single model.
- Model Context Protocol (MCP)
An open standard from Anthropic for connecting LLMs to external tools and data sources through a uniform server interface.