Back to Glossary
techniques

Prompt Engineering

The practice of designing effective prompts to get better outputs from AI models.

Share:

Definition

Prompt engineering is the art and science of crafting inputs to AI models to achieve desired outputs.

  • **Key Techniques:**
  • Zero-shot: Direct question without examples
  • Few-shot: Providing examples in the prompt
  • Chain-of-Thought: Asking model to explain reasoning
  • Role-playing: "You are an expert in..."
  • Structured Output: Requesting specific formats

Best Practices: - Be specific and detailed - Provide context and constraints - Use clear formatting - Iterate and refine - Test with edge cases

Advanced Techniques: - Self-consistency (multiple reasoning paths) - Tree-of-Thought (branching reasoning) - ReAct (reasoning + acting)

Examples

Adding "Let's think step by step" to improve math problem solving.

Want more AI knowledge?

Get bite-sized AI concepts delivered to your inbox.

Free intelligence briefs. No spam, unsubscribe anytime.

Discussion