Grokking AI: 50 Questions Every Engineer Asks
0% completed
Why Did the Model Stop in the Middle of Its Answer?
Short answer: A model writes an answer in a loop, one small piece of text (a token) at a time. The loop normally ends when the model produces its own stop signal. When an answer ends in the middle, something else ended the loop. The usual cause is the maximum number of output tokens that the request sets. The API response names the reason in a field, and your program should read that field first.
Look at the list on the right. Only the first exit means that the answer is complete, and the second exit explains most answers that end in the middle.
This lesson follows one request
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%