Skip to content
BENIBIX Learn

Stop Sequence

AI💬 LLMsText Generation

Also known as Stop Token, Stop Words (LLM)

Text that makes the model stop writing as soon as it appears.

Think of it like

Think of it like a code word. When you hear it, you stop talking right away.

Example

Jack wants one product name, not a list. He sets the stop sequence to a new line, so the model stops after the first name.

Why it matters

It gives clean endings you can predict. That makes the output easy for a program to use.

Definition

A stop sequence is a piece of text that tells the model to stop writing as soon as it produces it. You set one or more, such as a blank line or '###'. The model stops before the stop text, and the reply ends cleanly at that point. It is handy when you only want one item, one line or one turn of a chat. Unlike a token cap, it stops at a place you chose.
In the bottom row, the reply ends cleanly where the stop sequence appears.

Common mistake

Picking a stop sequence that shows up in normal text. If it is a common word, the reply stops far too early.

Key takeaways

  1. 1
    Text you choose. Like '###' or a new line.
  2. 2
    Stops on sight. Before the stop text.
  3. 3
    Clean endings. At a place you picked.

Learn it properly