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.