AI Dictionary › Prompting

Stop Sequences

Sequenze di Stop

Stop sequences are strings that, while the model is generating, immediately halt output as soon as they are produced. You set them via the API to precisely control where the response must end, preventing the model from running on past what is needed. Example: in a dialogue format where each turn starts with "User:" and "AI:", you set stop = ["User:"] so the model, after writing the AI reply, stops before inventing the user's next turn too. Another use: stop at "\ \ " to get a single paragraph.

Definition

Use them when generating fixed-structure output, lists, dialogues, delimited fields, or to cut unwanted trailing text without post-processing. They are a technical control complementary to max tokens: stop sequences halt at a semantic delimiter, not a count.

Related terms

More in Prompting

Put it into practice

From our network

AGORÀ Intelligence: Enterprise AI Governance Platform

Govern AI at scale: policies, adoption and measurable results on your data. Built for boards and C-suite.

Visit agora-intelligence.com →

From the Agora Intelligence blog

More on agora-intelligence.com →

📱 Download the Android app (beta) iOS coming soon

Say what you mean. Get what you need.

Grace Certified, the AI coach that trains and certifies your prompt engineering, by Agora Intelligence.