Some models may include a chat template to format a chat into a series of tokens.
For example, a typical chat template is
```python
messages = [
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": "Tell a light-hearted joke for a room of Data Scientists"}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
print(prompt)
```
Which when encoded and decoded shows the additional tokens that are used to provide additional context to the model (this is a Phi3 template, others will be different).
```
<|system|>
You are a helpful assistant
<|user|>
Tell a light-hearted joek for a room of Data Scientists
<|assistant|>
```