Skip to content

What Is Prompt Engineering?

Prompt engineering is writing and refining the text you give an AI model, such as instructions, examples and documents, so it returns the output you want.

The prompt engineering guide covers the core techniques with before-and-after examples. Vendors publish their own advice, including Anthropic, Google and OpenAI.

Two techniques have their own guides. Few-shot prompting puts worked examples in the prompt, and takes its terms from the 2020 GPT-3 paper. Chain-of-thought prompting gets the model to write out its reasoning before answering, as studied in a 2022 Google paper.

Showing 1–3 of 3 guides