General 905 installs

prompt-engineering-patterns

by wshobson/agents

Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production. Use when optimizing prompts,…

Skill content

Advanced prompt engineering techniques for optimizing LLM performance, reliability, and structured outputs in production.

- Covers six core capability areas: few-shot learning with dynamic example selection, chain-of-thought reasoning with self-consistency, structured outputs via JSON and Pydantic schemas, iterative prompt optimization, reusable template systems, and role-based system prompt design

- Includes practical patterns for semantic example selection, self-verification workflows, progressive disclosure, error recovery with fallbacks, and integration with RAG systems

- Provides token efficiency strategies, prompt caching for repeated prefixes, and performance monitoring metrics (accuracy, consistency, latency, success rate)

- Emphasizes testing on diverse inputs, versioning prompts as code, and avoiding common pitfalls like over-engineering, context overflow, and ambiguous instructions

Prompt Engineering Patterns

Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability.

When to Use This Skill

- Designing complex prompts for production LLM applications

- Optimizing prompt performance and consistency

- Implementing structured reasoning patterns (chain-of-thought, tree-of-thought)

- Building few-shot learning systems with dynamic example selection

- Creating reusable prompt templates with variable interpolation

- Debugging and refining prompts that produce inconsistent outputs

- Implementing system prompts for specialized AI assistants

- Using structured outputs (JSON mode) for reliable parsing

Core Capabilities

1. Few-Shot Learning