Category

Prompt-Recipes

31 posts in this category.

Prompt Recipes

OpenAI Prompt Caching: 4 Recipes That Ship (2026)

OpenAI prompt caching is implicit, so the failure mode is not a cache you never made, it is one you keep destroying. Four recipes, the request settings that void a prefix without touching your text, and the two token floors the vendors disagree on.

8 min read81
Prompt Recipes

Top P: 5 Recipes That Ship (2026)

Five copy-paste top_p (nucleus sampling) recipes for the OpenAI and Anthropic APIs in 2026: the default that ships, clamping the tail for extraction, focused creative, steadier JSON, and the one-knob rule.

5 min read185
Prompt Recipes

max_tokens: 5 Recipes That Ship (2026)

max_tokens caps output; it does not push the model to fill it. Detect truncation via stop_reason of max_tokens, continue a cut-off answer, and leave room for extended thinking. Five copy-paste recipes for 2026.

5 min read129
Prompt Recipes

tool_choice: 4 Recipes That Ship (2026)

tool_choice in 2026: four copy-paste recipes to force any tool, pin one named tool, forbid tools for a turn, or leave it on auto, in Claude and OpenAI, each with the failure mode that bites.

6 min read108