clairfy use of <|return|> vs <|end|> in conversation history

This commit is contained in:
Amirhossein Ghanipour 2025-08-12 03:33:47 +03:30
parent 9528c7b4a0
commit 20cd04c17f

View file

@ -229,6 +229,8 @@ Once its done generating it will stop with either a `<|return|>` token indicatin
The `final` channel will contain the answer to your users request. Check out the [reasoning section](#reasoning) for more details on the chain-of-thought.
**Implementation note:** `<|return|>` is a decode-time stop token only. When you add the assistants generated reply to conversation history for the next turn, replace the trailing `<|return|>` with `<|end|>` so that stored messages are fully formed as `<|start|>{header}<|message|>{content}<|end|>`. Prior messages in prompts should therefore end with `<|end|>`. For supervised targets/training examples, ending with `<|return|>` is appropriate; for persisted history, normalize to `<|end|>`.
### System message format
The system message is used to provide general information to the system. This is different to what might be considered the “system prompt” in other prompt formats. For that, check out the [developer message format](#developer-message-format).