PromptZone - Leading AI Community for Prompt Engineering and AI Enthusiasts

Finn Kamau
Finn Kamau

Posted on

Fix Claude 5 Token Vomit with a Second LLM

A GitHub repo called vomit proposes running Claude 5 output through a second LLM to remove repetitive tokens and clean formatting. The project surfaced in an Hacker News thread that reached 105 points and 102 comments.

The approach treats Claude 5's verbose generation as a post-processing problem rather than a prompting problem.

What It Is / How It Works

The repo provides a simple pipeline: send Claude 5's raw response to a second model with instructions to strip filler, fix token repetition, and tighten structure. The second model acts only as a cleaner, not a generator.

Users run the two calls sequentially. The first call uses Claude 5 for content; the second uses a cheaper or faster model for cleanup.

How to Try It

Clone the repository and install dependencies listed in the README. Point the script at your Anthropic API key and choose any OpenAI or local model for the cleanup step.

A basic command runs the full flow on a text file or stdin. The repo includes example prompts tuned for removing "token vomit" patterns common in Claude 5 responses.

Pros and Cons

  • Reduces output length by 30-50% in reported cases without losing core meaning.
  • Keeps the primary generation strength of Claude 5 while fixing surface issues.
  • Adds latency and a second API cost.

Early HN comments note that the extra call works best on long-form tasks where Claude 5 tends to repeat phrases.

Alternatives and Comparisons

Built-in Claude 5 controls and single-model post-processing offer simpler options. Dedicated cleanup scripts or lighter models provide different trade-offs.

Approach Extra Latency Cost per 1k tokens Output Quality
vomit + second LLM +1-2s $0.0005-$0.002 High
Claude 5 alone 0s $0.003 Medium
GPT-4o mini cleanup +1s $0.00015 Medium
Rule-based regex <0.5s $0 Low

Who Should Use This

Developers who already pay for Claude 5 and need tighter final text benefit most. Teams shipping customer-facing copy or code summaries gain the clearest win.

Skip the method if you run single short queries or already use models that produce concise output by default.

Bottom Line / Verdict

The two-model pattern gives measurable control over Claude 5 verbosity at modest added cost. It remains a practical workaround until Anthropic ships stronger native length controls.

Top comments (0)