Prompt Engineering
Also known as: Prompting
Crafting the input text so the model produces the behavior you want.
The practice of designing input prompts to elicit desired behavior from LLMs. Techniques include few-shot examples, chain-of-thought reasoning, system messages, and structured output formatting.
In practice
Often the first lever pulled in production. Interviews probe few-shot vs zero-shot, chain-of-thought, and when to graduate to fine-tuning or RAG.
How it compares
Prompt engineering changes the input; fine-tuning changes the model.
Comparisons that include Prompt Engineering
Related topics
Questions that mention this term
- Flashcard: what is a stop sequence in an LLM API call and what is it used for?
- When is self-refine (LLM…
- Pick the context layer defence that meaningfully reduces indirect prompt injection risk
- Contrast JSON mode and constrained decoding from a context engineering point of view
- Why log the assembled context, not just the model response, in production?
- Distinguish context engineering from prompt engineering in one practitioner's working definition
Related terms
Agent Loop
The runtime: LLM call → tool call → observation → LLM call → … until a final answer or step cap.
AI Agents
LLMs that loop: plan → call tools → observe results → repeat until done.
Chain-of-Thought (CoT)
Ask the model to think step by step before answering. It boosts accuracy on reasoning tasks.
Context Rot
Long-running chats degrade: early instructions get forgotten, and tool calls become less reliable.
Function Calling
The model emits structured JSON specifying a tool call instead of free text; the host executes it.
In-Context Learning (ICL)
Show the model a few examples in the prompt and it learns the pattern, no fine-tuning needed.