Response Prefill

Prompting

Definition

A technique where you begin Claude's response by adding a partial assistant turn before the API call. Claude continues from that starting point, allowing precise control over response format, structure, and starting content. Useful for forcing JSON or specific syntax.

Example Usage

Prefill with '{"result":' to force Claude to start its response mid-JSON, guaranteeing the output begins with your desired format.