Stop Sequence Tester

Test where your configured stop sequences would truncate LLM output.

Ad placeholder (leaderboard)

Stop sequence tester

Stop sequences are a deceptively simple API parameter that cause a lot of subtle bugs: set them too loose and the model stops mid-thought; set them wrong and they never fire, so the model rambles past where you wanted it to end. This tool lets you paste a full, untruncated response and a list of candidate stop sequences, then shows you exactly where generation would have stopped — without burning a single token.

How it works

For each stop sequence you provide, the tool finds the first index where it occurs in the output (after expanding escape sequences like \n and \t). The earliest of those indices is the winning cut point, because providers stop at whichever sequence appears first. It then splits the text there: everything before the match is the kept output (the stop string itself is excluded, matching OpenAI and Anthropic behaviour), and everything from the match onward is discarded. If no stop sequence matches, the full output is returned untruncated, which usually means your stops are too specific.

Tips and notes

  • Test the empty case. If nothing matches, your stops will never fire in production — loosen them or rely on max_tokens.
  • Mind premature cuts. A stop like . will trigger on the first sentence. Prefer distinctive markers (\n\n, </answer>, ###) that only appear at the real boundary.
  • Escape newlines. Type \n to test a newline stop; the tool expands it before matching so you can model multi-line boundaries.
  • Everything is local. No API calls are made.
Ad placeholder (rectangle)