Prompt & Agent Patterns

Proven prompt structures and defensive patterns.

Prompt & Agent Patterns

Chain-of-Verification Fact Check Prompt

Draft an answer, generate verification questions, answer them independently, then revise, reducing factual errors.

verificationhallucinationaccuracy
Prompt & Agent Patterns

Few-Shot Classification Prompt

A compact few-shot prompt for labeling text with balanced examples, an explicit label set, and an escape label.

few-shotclassificationexamples
Prompt & Agent Patterns

Production Agent System Prompt Template

A sectioned system prompt template covering role, context, tools, rules, and output format for tool-using agents.

system-prompttemplateagents
Prompt & Agent Patterns

Prompt Injection Defense for Tool-Using Agents

Layered mitigations for agents that read untrusted content such as web pages, emails, and documents.

securityprompt-injectionguardrails
Prompt & Agent Patterns

Reliable Structured JSON Output Pattern

Get valid, schema-conforming JSON from any model using native structured outputs where available, and validate-and-repair otherwise.

jsonschemavalidationextraction

Get one fully built blueprint a week

A weekly email: one blueprint with config, cost, setup time and failure modes, plus a vote on what we build next.