Anchoring

Domain: Prompt Engineering

🎯 Motivation

Starting a prompt with a strong, specific anchor (format, tone, example) that guides all subsequent output.

πŸ“‹ Concrete Example

β€˜Here is a Python docstring format:\n"""One-line summary.\n\nParameters:\n name (str): Description\n"""\nNow write a docstring for this function: [function]’ The example anchors the format.

πŸ”— Analogy

Starting a meeting with an agenda - the agenda (anchor) shapes the entire discussion. Everyone stays on topic because the anchor set the structure. Anchoring in prompts sets the structure for the response.