Back to full roadmap
topiccore
Assistant Prefill
Start the model's reply for it — guarantees determinism for JSON, XML, code outputs.
1 hours1 resources1 prereqs
In Anthropic's API, if you write the start of the assistant message, the model must continue from there.
Classic uses:
- Start with
{→ JSON guaranteed - Start with
<answer>→ XML scaffold Sure! Here's the code:\n\``python\n` → skip filler preamble
Not directly supported in OpenAI, but few-shot achieves similar effect.