Prompt Engineering
Write prompts that get results. Techniques, patterns, and frameworks that actually work.
24 articles

A Working Catalog of Prompt Patterns (8 to Know)
Prompt patterns are reusable prompt structures like Persona and Chain-of-Thought. Here are the 8 worth learning and how to pick the right one for a task.

Red-Team an AI: Adversarial Prompting Attack Types
Red-teaming an AI means deliberately probing it with adversarial prompts, then building guardrails that hold up against jailbreaks and injections.

Clear and Direct Prompts: The Core Prompting Skill
The fastest fix for a bad AI answer is a clearer prompt. Learn the colleague test for clear, direct prompts and rewrite 5 vague ones yourself.

Context Engineering: Why AI Chats Get Worse Over Time
Context engineering is what a model actually sees each call: system, user, and tool context inside a token budget. Here's why long chats degrade.

Controlling AI Output: Format, Prefill, Tone, and Length
Learn how to control an AI's output format, length, and tone with schemas and clear prompts, and why prefilling is fading out of use.

Decomposition and Prompt Chaining Explained Simply
Prompt chaining feeds one prompt's output into the next. This lesson covers when to chain versus asking once, plus how to build your own 3-step chain.

Domain Playbooks: Adapt Prompt Recipes to Your Work
A prompt that nails code review won't work for a client email. Learn the domain playbook method for adapting prompt recipes to any task.

Giving the Model a Role and an Audience
Research shows role prompting can drop AI factual accuracy by 5 points while still improving tone. Here's when it helps and when it backfires.

Chain of Thought Prompting: The Rules Just Changed
Chain of thought prompting means reasoning step by step before answering. Reasoning models like o1 do this already, so the trick often backfires.

Meta-Prompting: How AI Writes Better Prompts For You
Meta-prompting means using AI to write and refine your prompts instead of drafting every instruction by hand. Here's the technique plus a reusable template.

What Is Model-Specific Prompting? A Clear, Honest Guide
Model-specific prompting means writing prompts for how each model interprets instructions. See what changes across Claude, GPT, Gemini, and open models.

Multimodal Prompting: How AI Reads Images and PDFs
Multimodal prompting lets AI read images, screenshots, and PDFs together with text. Learn how image order and labeling change results.

What Is Prompt Injection? How It Works, How to Stop It
Prompt injection hides commands inside text an AI reads, tricking it into ignoring its real instructions. See how it differs from jailbreaking.

Prompting as It Evolves: Adapt as AI Models Change
Learn to read model cards and system prompts, then adapt your prompts when new AI models ship, keeping what's durable and cutting what's a trick.

Prompting Reasoning Models: What Actually Changes Now
Reasoning models like o3 and DeepSeek R1 need different prompts than chatbots. Here's what to drop, what to keep, and why chain-of-thought can hurt.

RAG-Aware Prompting: How to Keep AI Answers Grounded
RAG-aware prompting means writing instructions that ground AI answers in your documents instead of letting the model guess when it doesn't know.

Reducing Hallucinations: Ground Claude's Answers in Evidence
Hallucinations happen when Claude answers without a source. Evidence-first prompting, quote the source first, then answer, cuts fabrication fast.

Self-Consistency Prompting: Check Claude's Answers
Self-consistency prompting means asking Claude the same question a few times and comparing answers to catch mistakes before they cost you.

Showing vs Telling: Examples and Few-Shot Prompting
Few-shot prompting means giving an AI examples, not just instructions. Learn how many to use, how to order them, and how to test one for edge cases.

Structured Outputs: Get JSON You Can Actually Trust
Structured outputs use schema-constrained decoding to guarantee valid JSON from an LLM, unlike JSON mode alone. Here's how to build one.

System Prompts That Scale: A Template You Can Reuse
System prompts break down as you add features. Here's the reusable structure and copy-paste template that keeps yours working at scale.

The Anatomy of a Prompt: 6 Parts You Need to Know
Vague AI answers are usually missing one of six prompt parts, not badly worded. Here's the anatomy of a prompt and one template to fix it.

How to Debug a Bad AI Prompt in 4 Repeatable Steps
Debug a bad AI prompt in four repeatable steps: read the output, isolate the cause, change one thing, test again. Build a simple prompt library as you go.

What Prompting Actually Is (And Why It Still Matters)
Prompting is how you direct an AI model's next action. Here's what a prompt actually is, and why it still matters with reasoning models.