Stop sequences give the model a clear cut-off signal, such as a double line break or a specific keyword. They are especially useful for structured outputs, dialogue formats, or when only a single section should be generated. The stop sequence itself does not appear in the output. Together with the maximum token count, it controls the length and shape of the response.
Stop Sequence
A stop sequence is a defined string at which an AI model immediately ends text generation. It is used to cleanly delimit outputs and prevent uncontrolled continuation.
