Prompt engineering shapes LLM output by designing the input (instructions, format, examples, context) without touching the trained weights.
Imagine a chef who already knows thousands of recipes by heart. You cannot change what they learned in cooking school, but you can change the order ticket: 'gluten-free, no onions, plated like a tasting menu, here is the example I want.' Prompt engineering is the order ticket. The chef (the model) stays exactly the same; only the instructions and examples you hand them change. That is why a great prompt and a poor prompt can give wildly different dishes from the same chef.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Prompt engineering sits at a specific architectural boundary inside every LLM application. Understanding which side of the boundary you are on tells you what tool to reach for, how fast you can iterate, and what your governance story looks like.
The two blanks in this question, input and weights, name that boundary. They sound like vocabulary trivia but in practice they decide the shape of the entire development loop. Get the boundary wrong and you end up fine-tuning a model when a sharper system prompt would have closed the gap in an afternoon.
What actually lives inside a prompt
A prompt is not just the question you type. In a real production call, the input the model sees is a structured bundle:
- Instructions: what task to do, what voice to use, what to refuse.
- Output format: JSON schema, markdown sections, length limits, citation style.
- Few-shot examples: concrete input/output pairs that demonstrate the desired pattern.
- Context: retrieved documents from a RAG step, conversation history, user profile.
- Tool descriptions: names, signatures, and usage rules for tools the model can call.
- Guardrails: what not to say, what to escalate to a human.
Every one of these is text. The model concatenates the system message and user message into a single token stream and attends over the whole thing. From the model's perspective there is no architectural difference between an instruction you wrote and a paragraph the retriever pulled in; both are just tokens.
The framing job of the prompt engineer is to make those tokens read in a way that biases the next-token distribution toward the answer you want. That is the whole craft, and it is much closer to systems work than to copywriting.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- Anthropic Workbench and the Claude Projects feature ship as prompt engineering surfaces; users edit system instructions and examples, never weights.
- GitHub Copilot Chat composes a prompt from the open file, project context, and the user turn; the underlying model is fixed per release.
What an interviewer would ask next. Try answering before peeking at the approach.
QIf prompt engineering does not change weights, why do two prompts get such different outputs from the same model?
Frame as conditional generation. The model samples from P(next_token | context); changing context shifts the distribution. Mention attention over prompt tokens and how few-shot examples bias the trajectory without changing parameters.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Confusing prompt engineering with fine-tuning. Prompt work touches the input only; fine-tuning rewrites the weights. Different cost, different latency, different governance.
60 second bullets to scan on the way to the call.
What the two blanks are and why each is correct
Five things that live in a prompt beyond plain instructions
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.