Stop sequence
Also known as: stop · stop tokens
A stop sequence is a string (or set of strings) that tells the model to stop generating the moment it produces one.
It’s the cleanest way to bound structured output:
- Generate JSON, stop at the closing
}. - Generate a list, stop at a delimiter.
- Avoids the model “rambling on” after the answer.
Power move for parsing: set a stop sequence to the exact token that ends the structure you want. You get clean, parseable output for free.