Loading…
Glossary term
A string that tells a model to stop generating when it appears.
A stop sequence is a string, such as a blank line or a marker like 'END', that tells the model to stop as soon as it would produce it. The stop text is not included in the output. It lets developers cut generation at a natural boundary.
A request with a stop sequence
{"prompt": "List three fruits:\n1.", "stop": ["\n4."], "max_tokens": 50}Stop sequences keep outputs short and structured, saving cost and avoiding rambling.