Stop Sequence

Domain: LLM Concepts

šŸŽÆ Motivation

A stop sequence tells the model when to stop generating. Without it, the model might ramble on past the intended end.

šŸ“‹ Concrete Example

Set stop=[ā€˜\n\n’] - the model stops when it sees a double newline. Set stop=[END] - it stops at END. Useful for structured outputs where you want precise control.

šŸ”— Analogy

A stop sign at the end of a road - it tells the driver exactly where to stop. Without it, they might keep driving past the destination. The stop sequence tells the model where to halt.