AI Glossary

Prompt engineering

LLM foundationsPublished By Simon Budziak

Prompt engineering is the practice of designing the instructions, examples, and structure given to a language model to reliably produce the output a task needs, now understood as one component of the larger discipline of context engineering rather than a standalone skill of clever chat tricks.

Prompt engineering shapes the system prompt, one layer inside the larger context engineering assembly that also includes retrieved context, tool definitions, and history, all feeding the model

Prompt engineering used to mean finding the right magic words for a chatbot. In a production system it means designing the exact instructions a model sees inside a much larger context, one input among many an agent assembles at run time.

Why isn’t prompt engineering still just about finding the right words?

Early prompt engineering treated the prompt as the whole interface: a single block of text, hand-tuned until a chatbot behaved. Production systems changed the shape of the problem. A live agent’s prompt is now assembled at run time from a system prompt, retrieved documents, tool definitions, conversation history, and the model’s own prior outputs, all competing for the same context window. Wordsmithing one static prompt stops being the leverage point once most of what the model sees is generated, not written. That shift is what context engineering names directly: prompt engineering became the layer that decides what a single instruction says, while context engineering decides what else is in the room when the model reads it.

What does prompt engineering still control on its own?

The instruction layer still matters, just narrower than it used to. Clear task framing, few-shot examples that show the model the exact output shape, and explicit constraints on what to output and what never to say directly shape a model’s behavior in ways retrieval cannot substitute for. A model told to enforce a schema behaves differently than one merely asked to “answer helpfully.” A system prompt naming an AI agent’s available tools and when to use each is prompt engineering, folded into a much larger context assembly rather than replaced by it, and it is what makes a structured output contract hold up call after call.

How does prompt engineering interact with prompt injection?

Poorly separated instructions and untrusted content is exactly the seam prompt injection attacks exploit, a document or tool result that reads as a new instruction because the prompt never marked where instructions end and data begins. Good prompt engineering draws that boundary explicitly, labeling untrusted content as data rather than letting it sit indistinguishable from the system’s own instructions, though the guardrails that actually catch an injection attempt sit a layer below the prompt itself.

Is prompt engineering still a job title in 2026?

Rarely as a standalone one. Anthropic’s public guidance on building agents and Claude’s tool use now folds prompt design into the same documentation as retrieval and tool architecture, not a separate page of tricks, and OpenAI’s function-calling and structured-output guides do the same. The skill did not disappear, it moved inside a bigger job: designing the whole context a production system feeds a model on every call, which is what makes it durable rather than a fad that peaked with early chatbot demos.

Frequently asked questions

Is prompt engineering still a real skill in 2026?

Yes, but narrower than the job title once implied. It still controls task framing, examples, and constraints; it no longer covers the whole problem, since production systems assemble most of a model's context from retrieval, tools, and history.

How is prompt engineering different from context engineering?

Prompt engineering shapes what a single instruction says. Context engineering decides everything else the model sees alongside it, retrieved documents, tool definitions, history, so a well-written prompt still fails inside a poorly assembled context.

Does prompt engineering stop prompt injection?

Partly. Drawing a clear boundary between instructions and untrusted content reduces the attack surface, but prompt injection is ultimately a guardrails and architecture problem, not something a clever prompt alone reliably closes.

Summarize this page with

See how this works in a real workflow