AI Dictionary › Prompting
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.
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.
Le stop sequences sono stringhe che, quando il modello sta generando testo, ne interrompono immediatamente l'output non appena vengono prodotte. Le imposti via API per controllare con precisione dove la risposta deve fermarsi, evitando che il modello prosegua oltre il necessario. Esempio: in un formato di dialogo dove ogni turno inizia con "Utente:" e "AI:", imposti stop = ["Utente:"] così il modello, dopo aver scritto la risposta dell'AI, si ferma prima di inventare anche il turno successivo dell'utente. Un altro uso: fermarsi a "\ \ " per ottenere un solo paragrafo.
Usale quando generi output a struttura fissa — liste, dialoghi, campi delimitati — o quando vuoi tagliare code indesiderate senza post-processing. Sono un controllo tecnico complementare a max tokens: le stop sequences fermano il modello a un delimitatore semantico, non a un conteggio.
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
📱 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.