keepcalculator

06 Numbers and Powers

Finish Reason: What It Means in a Completed Reply

Card No. 06·50266 · Updated · Standard formula, shown below

In a completed assistant reply, the finish reason records why the response stopped; it is usually a status such as stop, length, or tool_calls, depending on the API. It describes how generation ended, not whether the answer is accurate, useful, or truly complete.

What a finish reason means

A finish reason is metadata attached to a generated response. It answers a narrow technical question: what event caused the system to stop producing output? The value is useful when an application needs to decide whether to display the response, request more text, or run a tool.

The phrase “the reply looks finished” is not enough to determine the finish reason. A response may end with a full stop and a polished conclusion because the model reached its normal stopping point, because it hit a length limit at a convenient place, or because the assistant handed control to a tool. You need the response metadata to identify which occurred.

Common finish-reason values

Names vary across APIs and model families, so interpret a value according to the documentation for the specific interface. Common patterns include:

  • stop: Generation ended normally, often because the model produced an end-of-turn marker or reached a configured stop sequence. This is the closest match to an ordinary completed reply.
  • length: The output reached a maximum token or length limit. The text might still read naturally, but it may have been cut off or may omit requested details.
  • tool_calls or a similar handoff value: The assistant stopped writing user-facing text because it requested that a tool run. This usually signals a transition, not a final answer.
  • content_filter or a related value: Generation stopped because a safety or content policy filter intervened. The exact behavior and label depend on the service.

Some interfaces use different labels for similar events, and some return additional finish states. Do not assume that every platform supports every value listed here.

How to tell whether the reply is finished

Look at both the finish reason and the structure of the response. In an API response, the finish reason is commonly found in a choice or output item alongside the generated text. In a conversation interface, the same information may be hidden, summarized, or unavailable to the end user.

A normal stop value generally means that the model completed its turn. A length value means you should inspect the ending: a sentence cut in half, a missing final section, or an unclosed code block strongly suggests truncation. A tool handoff means the application should check whether the tool ran and whether the assistant produced a follow-up response afterward.

For example, if a model returns a paragraph ending with “That is why the result…” and the finish reason is length, it likely ran out of output space. If it ends with “The answer is 42.” and reports stop, generation ended normally. Even then, the status cannot prove that the answer is factually correct.

What to do when the reason is length

A length stop is a signal to review and possibly continue, not a guarantee that the response is unusable. The right handling depends on whether the text already answers the request and whether the missing content matters.

  1. Check the last sentence and the requested format. Look for abrupt endings, missing items, incomplete lists, or absent conclusions.
  2. If the response is incomplete, ask for a continuation or retry with a larger output limit if the API permits it.
  3. For structured output such as JSON or code, validate the syntax before using it. A response can look nearly complete while still being invalid.
  4. If the request is consistently too large, divide it into smaller parts or ask for a concise version.

When continuing, provide enough context to avoid duplication. A prompt such as “Continue from the last complete sentence, without repeating earlier text” can help, though the resulting continuation should still be checked.

Finish reason versus answer quality

Finish reason is a process status, not a quality score. A normal stop does not certify that the assistant followed every instruction, used reliable facts, or completed every part of a complicated task. Likewise, a length stop does not mean that all preceding text is wrong.

There are several separate questions to keep distinct:

  • Did generation end normally? Check the finish reason.
  • Did the response satisfy the request? Compare its content with the requested task and format.
  • Is the content reliable? Verify important claims against appropriate sources or tests.
  • Did a tool actually run? Check the tool result and any subsequent assistant message.

This distinction matters in automated workflows. An application might treat stop as a signal to display a response, but it should still validate required fields, confirm that a requested tool action succeeded, and handle incomplete or malformed output.

Common misunderstandings

One frequent misconception is that a polished ending proves the reply completed normally. A model can reach a token cap just after finishing a sentence, so appearance alone is not decisive. The reverse is also possible: a normal stop can occur after an answer that is incomplete in the broader sense because the model misunderstood the request.

Another misconception is that a tool-call finish reason means the tool failed. It usually indicates that control was handed over; the application must execute the call and inspect the result. A failure may occur later, or the assistant may need another turn to explain the result.

Finally, finish-reason labels are not universal standards with identical meanings everywhere. If a value looks unfamiliar, consult the documentation for the API and model that produced it instead of mapping it mechanically to a label from another service.

Frequently Asked Questions

What does “stop” mean as a finish reason?
It normally means the model ended generation in the usual way, such as completing its turn or encountering a configured stop sequence. It does not verify the answer’s accuracy.

Does “length” mean the answer is incomplete?
It means generation hit a length limit. The answer may be incomplete, so inspect its ending and check whether all requested parts are present.

Can I tell the finish reason from the text alone?
No. The wording may offer clues, but the reliable source is the response metadata supplied by the relevant API or platform.

What does a tool-call finish reason mean?
It generally means the assistant requested a tool and handed control to the application. Check that the tool executed and whether a later assistant message completed the response.

Does a normal finish reason mean the reply is correct?
No. It only describes why generation stopped. Assess correctness, completeness, and formatting separately.

Practical takeaway

If the reply looks finished, record the finish reason reported in the response metadata rather than guessing from its final sentence. A normal stop usually indicates ordinary completion; a length value calls for a truncation check; and a tool handoff requires checking the tool cycle. Treat the reason as useful diagnostic information, not as a verdict on the answer itself.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →