Live data from Hacker News

Vomit: Clean up Claude 5's token output with a separate LLM

github.com

131–140 of 315 posts

Re: Vomit: Clean up Claude 5's token output with a separate LLM

#131
You don’t have to be so convincing when it’s a local model.

```Un-Claude 0.2beta

    import sys,csv,requests
    
    CH="# Valid channels: analysis, commentary, final. Channel must be included for every message."
    
    CANDIDATES=[
        ("no-hedging","Reasoning: low\n\n\n\n"+CH,"Condensed:"),
        ("neutral-reg","Reasoning: low\n\nRegister: neutral technical. No intensifiers, no evaluative adjectives.\n\n"+CH,"Condensed:"),
        ("no-closing","Reasoning: low\n\n\nNo closing remarks.\n\n"+CH,"Condensed:"),
        ("terse","Reasoning: low\n\n\n\n"+CH,"Condensed:"),
    ]
    
    def rephrase(text,base="http://127.0.0.1:1234",model=None,temperature=0.0,max_tokens=1400,timeout=180):
        src=text.strip()
        if not src:
            return []
        if model is None:
            model=requests.get(base+"/v1/models",timeout=timeout).json()["data"][0]["id"]
        w=csv.writer(sys.stdout,lineterminator="\n")
        w.writerow(["idx","label","prefill","src_chars","out_chars","ratio","tokens","finish"])
        rows=[]
        for i,(lab,sysmsg,pf) in enumerate(CANDIDATES,1):
            p="system"+sysmsg+"user"+src+"assistantfinal"+pf
            d=requests.post(base+"/v1/completions",json={"model":model,"prompt":p,"max_tokens":max_tokens,"temperature":temperature},timeout=timeout).json()
            c=d["choices"][0]
            t=(pf+c["text"]).rstrip()
            w.writerow([i,lab,pf,len(src),len(t),round(len(t)/len(src),3),d["usage"]["completion_tokens"],c["finish_reason"]])
            rows.append((i,lab,sysmsg,pf,t,d["usage"]["completion_tokens"],c["finish_reason"]))
        print("\nmodel: %s"%model)
        print("temperature: %s   max_tokens: %s"%(temperature,max_tokens))
        for i,lab,sysmsg,pf,t,tok,fr in rows:
            print("\n[%d] %s"%(i,lab))
            print("    system:  %s"%sysmsg.replace("\n","\\n"))
            print("    prefill: %r   tokens=%d   finish=%s"%(pf,tok,fr))
            print(t)
        return rows

```

```input

## 8. Honest gaps — what I could *not* resolve

I want to be explicit about the limits of this pass rather than imply completeness:

1. *`PROVIDER_T` values are not enumerated here.* `list_models(inference_provider=...)` is typed against `PROVIDER_T`, which lives outside the three modules I scanned (it's in the `inference._providers` subpackage). The accepted provider strings are therefore *unknown from this run* — `"cohere"` is confirmed only because it appears in a docstring example.

2. *Three grep hits point to search-capable functions I did not identify.* My scan found parameter assignments that don't belong to any function I enumerated: - line 3046–3050: `params["filter"]`, `params["sdk"]`, `params["includeNonRunning"] = True` — an additional Spaces-oriented endpoint with an *`sdk` filter and an `includeNonRunning` flag* not exposed by `list_spaces`. - line 2879: `params["config"] = config` - line 12013: `"sort": sort` — almost certainly the consumer of `DailyPapersSort_T`, i.e. a daily-papers lister distinct from `list_papers`. - line 13872: `params["search"] = search`

   These represent **real additional search surface** that my `LIST_FUNCS` whitelist missed. A follow-up pass enumerating every `HfApi` method containing `params[` would close this.
```

```example output

[1] no-hedging system: Reasoning: low\n\n\n\n# Valid channels: analysis, commentary, final. Channel must be included for every message. prefill: 'Condensed:' tokens=131 finish=stop

Condensed:

- *Provider strings* (`PROVIDER_T`) are not listed; only “cohere” is known from a docstring.

- *Missing search‑capable calls* were found: - `params["filter"]`, `params["sdk"]`, `params["includeNonRunning"] = True` (Spaces endpoint). - `params["config"] = config`. - `params["sort"] = sort` (likely a daily‑papers lister). - `params["search"] = search`.

These were not captured in the `LIST_FUNCS` whitelist, indicating additional search functionality.

```

Edit: yeesh, I’d love to have a WYSIWYG comment block on this site. I’m not going to keep fighting newline and white space to get it to look right, but you get the idea.

Re: Vomit: Clean up Claude 5's token output with a separate LLM

#132

I've been grappling with this for weeks, not just in Claude but in Codex as well, which isn't quite as bad but still annoying. AGENTS.md does very little, agents will consistently violate the communication preferences, especially as the session drags on. It's incredible to me that there's no good way to reliably change the way an LLM responds to you that a workaround like this would even be necessary. It seems like s…

This morning I asked Claude to provide a summary of the work it had done but to '... explain it as if you were talking to a moron' and it actually turned out a quite comprehensible summary. So going to continue trying that as a command structure going forwards...

Ah, another delightful heuristic for my collection. Entry number 5,791: “tell LLM to treat me as moron when it’s excessively verbose”

Re: Vomit: Clean up Claude 5's token output with a separate LLM

#133
I think this is just another part of the growing pains of working with machine intelligence that we have to endure.

Much like we previously had to cope with "hallucinations" as an issue.

If the ultimate goal of AI is to develop general intelligence, the first big objective is: thinking systematically. And the road toward systematic thinking right now is mainly coding, mathematics, and other "verifiable reward" domains.

Claude doesn't have a separate mind for "coding" and "writing". Claude has tokens, and tokens can be assembled in various productive structures, mainly optimized right now for systematic reasoning. Also, a token isn't just a chunk of text. A token is like a little neural-network subroutine that fulfills a function. The conversion of a token into a piece of text only happens on the output side...

When the model finds token sequences that lead toward better verifiable outcomes, it leans hard into those token sequences, and uses them as an essential component of its thought process. "Load bearing" is load-bearing. "Verify, rather than assume" is a mantra that produces good results, so it gets repeated over and over again.

It's super-interesting that this particular moment, where the idea of "Claudish" has become a full-fledged meme, coincides with such astonishing progress in coding and math. My wife says when she uses Claude, that it feels to her exactly like talking to an autistic Engineer.

Not a coincidence, I think :)

My feeling is that the next big era of machine intelligence will require more lateral-thinking and creativity, and hopefully then the models "writing" will be more pleasant to read.

Re: Vomit: Clean up Claude 5's token output with a separate LLM

#134

I've been grappling with this for weeks, not just in Claude but in Codex as well, which isn't quite as bad but still annoying. AGENTS.md does very little, agents will consistently violate the communication preferences, especially as the session drags on. It's incredible to me that there's no good way to reliably change the way an LLM responds to you that a workaround like this would even be necessary. It seems like s…

So many vacuous statements at the seam. This is the hermetic load bearing part, which I confirmed rather than assuming.

Is this because they changed the word probabilities to allow for identifying AI text? If so, I don't need a computer to tell me when something is AI. It's crazy obvious from odd word choices.

Re: Vomit: Clean up Claude 5's token output with a separate LLM

#135
post #102
post #81

Earlier quoted context omitted.

I'm probably going to be going against the grain here, but I think it's not as bad as it looks at first. I was similarly frustrated a few months ago, but have noticed I've started to learn the idiom. Its use of "dense jargon" and "stilted metaphor" is actually surprisingly consistent - it's speaking its own dialect, and you get used to it. After a while it gets much easier to read and even becomes somewhat efficient,…

> Its use of "dense jargon" and "stilted metaphor" is actually surprisingly consistent - it's speaking its own dialect, and you get used to it. This dialect is idiosyncratic to you and Claude based on your session history and memory. I've noticed Claude's output mimics my writing style. > Registers the board implements but whose behaviour is not modelled Right down to my preferred spellings. As several comments I've…

that is not my experience at all; I never write the way Claude does or use its vocabulary.

I also find myself regularly editing its code comments, which do not match my expectations of succinct, clear, not over explained, etc. I ask it to read my edited comments to improve its writing, which has helped _somewhat_. (The code itself that it writes is decent, though it still overcomplicates things. I find myself writing "keep it simple" repeatedly even though of course I have it in AGENTS (which it regularly ignores, such as attempting to commit something when I've told it never to commit).

Re: Vomit: Clean up Claude 5's token output with a separate LLM

#136

Earlier quoted context omitted.

One danger in acclimating to this style of communication style is that we may accidentally use it in your own communication with other people. If the other person hasn't grokked the dialect, it can make things quite confusing (to say the least). For example, there is common jargon used by people and there is chat-session-specific jargon created by LLM agents, and I've seen the latter popping up in various meetings, u…

You're absolutely right, it would be a load-bearing mistake to adopt LLM jargon as a human speaker.

You're right to pushback. This isn't just a grammatical problem -- its a conversational one, too.

Re: Vomit: Clean up Claude 5's token output with a separate LLM

#137
post #68

I'm surprised by this reaction to Claude's verbiage recently. I don't have any issue immediately understanding what it's saying, but then again I read regularly and a lot of the people I know complaining think it's an accomplishment in literacy to get through Dungeon Crawler Carl.

Being verbose, convoluted, and obscure does not make you intelligent nor more literate. Often it’s exactly the opposite. True intelligence and literacy is being able to communicate effectively and to a broad audience in the simplest terms possible.

Give me an example of Opus 5 because verbose, convoluted, and most importantly, "obscure"

Re: Vomit: Clean up Claude 5's token output with a separate LLM

#139

I've been grappling with this for weeks, not just in Claude but in Codex as well, which isn't quite as bad but still annoying. AGENTS.md does very little, agents will consistently violate the communication preferences, especially as the session drags on. It's incredible to me that there's no good way to reliably change the way an LLM responds to you that a workaround like this would even be necessary. It seems like s…

So many vacuous statements at the seam. This is the hermetic load bearing part, which I confirmed rather than assuming.

[dead]

Re: Vomit: Clean up Claude 5's token output with a separate LLM

#140
post #118

Earlier quoted context omitted.

I'll give that a try. Hopefully it reduces the text vomit Claude tends to do. Right now all I have is > - Give terse and concise answers unless the user asks you to elaborate. Big walls of text are not usefull when trying to communicate.

I recently asked Claude (Opus 5) to give me guidance on how to instruct it to be less verbose in a way that it will _actually follow_. Its response was something to the effect of (and I'm heavily paraphrasing here) "'Succinct' and 'short' aren't objective measurements. Try providing a strict word budget instead." Given that guidance, I tried specifying "Unless I ask you to elaborate, respond with no more than one par…

FWIW, I think this is good guidance since it does match Anthropic's documentation. They say that every rule should have a non-subjective way to determine pass/fail.

(I said "good guidance" but it might be more correct to say that it's the best guidance we have, it's what Anthropic says about their own model.)

Post reply on HN