thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

AI & Machine Learning · Intermediate

Stop Reason

A field in an LLM API response indicating why generation stopped, such as end_turn, max_tokens or tool_use.

Definition

Applications branch on the stop reason: tool_use means run the requested tool and continue the loop; max_tokens means the output was truncated; end_turn means the model finished; stop_sequence means a stop string was hit; refusal indicates a safety refusal.

Exam tip

In an agent loop, keep looping while stop_reason is tool_use.

Related terms