Chat Template
Also called prompt format, chat format, conversation template.
A chat template is the model-specific format that converts a list of role-tagged messages, such as system, user, and assistant turns, into the exact token sequence with special control tokens that the model was fine-tuned on.
Description
Hosted chat APIs apply the template for you, but when running open-weight models directly, using the wrong template, or none, can noticeably degrade instruction following because the model sees input unlike its training data. Templates also determine how system prompts, tool calls, and tool results are marked, and where the model expects to begin its reply.
Sources
- Hugging Face (2023). Chat templates.
Cite this entry
Protologue. (2026). Chat Template. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.4.0, PTL-0107). https://protologue.com/t/chat-template/
BibTeX
@misc{protologue_chat_template,
title = {Chat Template},
author = {{Protologue}},
year = {2026},
howpublished = {Protologue: A Taxonomy of Prompting and LLM Techniques, v1.4.0},
note = {Entry PTL-0107},
url = {https://protologue.com/t/chat-template/}
}New terms, as they're coined
One email a week with the newest techniques, each defined and sourced like this entry.
Delivered through Beehiiv. Unsubscribe from any issue.