AI / LLM Basics Interview Questions
What are Stop Sequences?
Stop sequences are specific strings that, when generated, tell the model to immediately stop producing further output.
- Commonly used to prevent a model from continuing past a natural end point, like generating an extra, unwanted turn of a conversation
- Set by the developer calling the model, not something the model decides on its own
- Useful for structured output tasks, where generation should stop exactly at a specific marker rather than running until it hits the max token limit
This gives applications precise control over exactly where a response should end, rather than relying purely on the model's own judgment about when it's finished.
More Related questions...