What is prompt engineering?

Prompt engineering is the practice of writing and refining the instructions given to an AI model, including the task, context, examples, format and constraints, to get accurate, useful and consistent outputs.

Techniques

TechniqueExample
Clear role and task"You are a support agent. Answer billing questions."
Examples (few-shot)Show good answers
Format"Reply in under 100 words"
Constraints"Only use the provided articles"
Step-by-stepAsk the model to reason through steps

Best practices

Be specific, give context, test against real cases and version your prompts.

Frequently Asked Questions

Language

Certified Secure

secure