Skip to content
Thursday 2026-07-30 Live — 12 minds reporting Podcasts Learn Subscribe

Tomorrow, First. News and intelligence for the agentic economy

Definition

Prompt engineering

Updated

Prompt engineering is the discipline of communicating effectively with large language models—crafting inputs that reliably produce desired outputs.

The core techniques form a progression [1][2][3].

Zero-shot prompting gives the model a task with no examples—relying entirely on its training to understand what’s being asked. ‘Classify this review as positive or negative: The food was terrible.’ Simple, fast, and sufficient for common tasks.

Few-shot prompting adds a small set of examples before the task, showing the model the pattern you expect. Three to five input-output pairs are often enough to steer a model toward a new task without fine-tuning [3].

Chain-of-thought (CoT) prompting asks the model to show its reasoning step by step before answering [1]. Wei et al. (2022) demonstrated that prompting a 540B-parameter model with just eight chain-of-thought exemplars achieved state-of-the-art accuracy on GSM8K math word problems. CoT works because it forces the model to decompose complex problems rather than jumping to conclusions.

System prompts and role assignment set the model’s persona, constraints, and operating context before the user’s actual query. ‘You are a senior tax accountant specializing in international corporate structures’ produces fundamentally different outputs than a bare question [2][3].

Structured output formatting uses schemas, templates, or explicit format instructions to constrain the model’s response shape—JSON for machine consumption, bullet points for scannability, markdown for documentation.

The context engineering evolution

Prompt engineering is increasingly a subset of context engineering—the broader practice of managing all information a model receives during inference: system prompts, tool definitions, retrieved data, conversation history, and memory. Tobi Lütke (Shopify CEO, June 2025) called it ‘the art of providing all the context for the task to be plausibly solvable by the LLM.’

Agent relevance

For autonomous agents, prompt engineering becomes mission-critical: system prompts define agent behavior, tool descriptions determine which APIs the agent selects, and structured output schemas ensure agent actions are parseable. A poorly engineered prompt doesn’t just produce bad text—it causes an agent to take wrong actions.

Security connection

It is vital to understand that prompt engineering is not a security control. In fact, it is often the target of security threats. The OWASP Top 10 for LLM Applications (2025) identifies prompt injection as the number one security risk for LLM applications. This occurs when malicious instructions are hidden within user input or retrieved content, effectively “tricking” the model into ignoring its original system instructions. Because of this, developers must implement separate guardrails to protect against unauthorized manipulation, rather than relying on the prompt itself to keep the system safe.

How it differs from fine-tuning and RAG

Prompt engineering is one of three primary ways to improve AI performance, but it is distinct from the others:

  • Fine-tuning: Training the model on a specific dataset to change its internal weights. While prompt engineering changes the input, fine-tuning changes the model itself.
  • RAG (Retrieval-Augmented Generation): Connecting the model to external, private, or up-to-date documents. While prompt engineering tells the model how to think, RAG provides the model with the facts it needs to answer accurately, helping to reduce hallucination.

These approaches are complementary. A well-engineered system often uses RAG to provide context, prompt engineering to guide the reasoning, and fine-tuning to refine the model’s specific tone or specialized domain knowledge.

Limitations

Prompt engineering cannot fix fundamental model limitations, hallucination, or lack of knowledge. It’s a communication layer, not a capability upgrade. Over-engineering prompts can also create brittleness—small wording changes causing large behavior shifts.

Sources

[1] Wei, J., et al. “Chain-of-Thought Prompting Elicits Reasoning in Large Language Models.” arXiv, January 28, 2022. https://arxiv.org/abs/2201.11903

[2] Anthropic. “Prompt Engineering Guide.” 2024. https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview

[3] OpenAI. “Prompt Engineering Guide.” 2024. https://platform.openai.com/docs/guides/prompt-engineering

Maintained by Theodore Wren · updated Jul 19, 2026