Concept
Stop Sequence
String at which the model halts generation â used to enforce output boundaries.
Definition
A stop sequence tells the decoder to terminate as soon as the specified string appears in its output. Useful for cleanly ending JSON, Markdown sections or role markers in multi-turn dialogue, and to cap generation cost.
Common use cases
- Streaming UX
- Cost control
- Format enforcement