Glossary

What is Prompt Engineering?

Designing effective inputs to get better LLM outputs.

What is prompt engineering?

Prompt engineering is the practice of designing and optimizing inputs to LLMs to get better outputs. This includes crafting system prompts, using few-shot examples, structuring queries, and iterating based on results.

Key Techniques

  • System prompts: Set context and behavior
  • Few-shot: Provide examples of desired output
  • Chain-of-thought: Request step-by-step reasoning
  • Structured output: Request JSON or specific formats

Prompt Engineering for Safety

  • Include safety instructions in system prompts
  • Request citations and sources
  • Ask model to express uncertainty
  • Define boundaries and refusals

Measuring Prompt Performance

  • Track hallucination rates by prompt version
  • A/B test prompt changes
  • Monitor quality metrics over time
  • Compare prompts across different models

How do I know if prompts work?

Monitor prompt performance in production. Track hallucination rates, user satisfaction, and task completion by prompt version. A/B test prompt changes and measure impact on quality metrics.

Monitor prompt performance

Start Free