Live data from Hacker News

Show HN: Semble – Code search for agents that uses 98% fewer tokens than grep

github.com

101–110 of 187 posts

Re: Show HN: Semble – Code search for agents that uses 98% fewer tokens than grep

#103

Shouldn’t it be a part of the harness at least for local codebase? I wonder how many harnesses are doing that already.

Afaik many harnesses ship the "default" which is grep+read (like Claude Code). But I agree, IMO it's a weird gap. To be fair I don't think providers are that incentivised to reduce token burn at the moment, but my guess is that that will change and tools like this will become at least an natively supported option in some harnesses.

I would be surprised if, in the "mature" future of AI tools/products, the labs building the models are also selling/building to end users like they are now.

Re: Show HN: Semble – Code search for agents that uses 98% fewer tokens than grep

#104
The bigger problem with solutions like these is that most AI already know how to use grep and search really well because of their training. Any such new tool that you handle to the AI, takes away from the cognitive capability of the AI. Humans would normally 'learn' how to operate tools like this - but the learning in LLM's is frozen and they already with a very strong depth in existing tools like grep.

For example, an AI would already use linux commands like tree to traverse the code base. And again it already has good training in this.

The other problem is that it is easy to cook up examples which demonstrate the efficacy of tools like these - but actually proving that the cognitive deficit that such tools result it, is surmounted by their efficacy in long horizon runs. My first contact instinct is that this will result in a net negative 'deployable intelligence' over long horizon runs - make the agent perform worse than using existing tools.

Proving the opposite is a non-trivial problem - but maybe it might be something you want to take up.

Re: Show HN: Semble – Code search for agents that uses 98% fewer tokens than grep

#106
> uses 98% fewer tokens than grep

So are we supposed to believe that grep is so wasteful that models are reading 98% useless garbage every time they call it? Either this claim is not representative, or you're missing something else when you throw away the vast majority of context for the model.

Re: Show HN: Semble – Code search for agents that uses 98% fewer tokens than grep

#107
post #106

> uses 98% fewer tokens than grep So are we supposed to believe that grep is so wasteful that models are reading 98% useless garbage every time they call it? Either this claim is not representative, or you're missing something else when you throw away the vast majority of context for the model.

Grep prints out every matching line. For some searches a LLM might do it will get a lot of noise, and it might have to make that search because it cannot be specific. Targeted search can reduce the number of tokens.

I suspect this comparison is against reading the whole codebase though compared to just getting the bits you need.

Re: Show HN: Semble – Code search for agents that uses 98% fewer tokens than grep

#108
post #46

Nice, this sounds great. I want to mention a related issue here, which is that on small codebases, Claude spends a lot of time looking for stuff when it could have just dumped the whole codebase into the context in one go and used very little tokens. I found a nice workaround which is that you can just dump the whole directory into context, as a startup hook. So then Claude skips the "fumble around blindly in the dar…

Maybe aider? https://aider.chat/2023/10/22/repomap.html

Good old aider ahead of its time

Re: Show HN: Semble – Code search for agents that uses 98% fewer tokens than grep

#110

I'd be interested in seeing actual agent benchmarks (eg CC or Copilot CLI with grep removed and this tool instead). For example, I have explored RTK and various LSP implementations and find that the models are so heavily RL'd with grep that they do not trust results in other forms and will continually retry or reread, and all token savings are lost because the model does not trust the results of the other tools.

I just put something in my global CLAUDE.md (under ~/.Claude) asking it to use the LSP instead of grep and have never had this issue since.

I've tried all sorts of tricks with Copilot CLI to get it to use LSP; project instructions, file extension instructions, but it just keeps forgetting. And says "yea you're right I should have used it" but then doesn't.
Post reply on HN