frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

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

https://github.com/MinishLab/semble
36•Bibabomas•5h ago
Hey HN! We (Stephan and Thomas) recently open-sourced Semble. We kept running into the same problem while using Claude Code on large codebases: when the agent can't find something directly, it falls back to grep, reading full files or launching subagents. This uses a lot of tokens, and often still misses the relevant code. There are existing tools for this, but they were either too slow to index on demand, needed API keys, or had poor retrieval quality.

Semble is our solution for this. It combines static Model2Vec embeddings (using our latest static model: potion-code-16M) with BM25, fused via RRF and reranked with code-aware signals. Everything runs on CPU since there's no transformers involved. On our benchmark of ~1250 query/document pairs across 63 repos and 19 languages, it uses 98% fewer tokens than grep+read and reaches 99% of the retrieval quality of a 137M-parameter code-trained transformer, while being ~200x faster.

Main features:

- Token-efficient: 98% fewer tokens than grep+read

- Fast: ~250ms to index a typical repo on our benchmark, ~1.5ms per query on CPU (very large repos may take longer)

- Accurate: 0.854 NDCG@10, 99% of the best transformer setup we tested

- MCP server: drop-in for Claude Code, Cursor, Codex, OpenCode

- Zero config: no API keys, no GPU, no external services

Install in Claude Code with: claude mcp add semble -s user -- uvx --from "semble[mcp]" semble

Or check our README for other installation instructions, benchmarks, and methodology:

Semble: https://github.com/MinishLab/semble

Benchmarks: https://github.com/MinishLab/semble/tree/main/benchmarks

Model: https://huggingface.co/minishlab/potion-code-16M

Let us know if you have any feedback or questions!

Comments

esafranchik•3h ago
Is the benchmark measuring one-shot retrieval accuracy, or Coding agent response accuracy?
stephantul•3h ago
Hey! Co-author here. The benchmark currently only measures retrieval accuracy.

We’re interested in measuring it end to end and also optimizing, e.g. the prompt and tools, for this, but we just haven’t gotten around to it.

esafranchik•3h ago
Two follow-ups:

1) How do you compare accuracy? by checking if the answer is in any of the returned grep/bm25/semble snippets?

2) How do you measure token use without the agent, prompt, and tools?

stephantul•3h ago
1) yes! It’s not accuracy, but ndcg 2) we assume that if the agent gets the correct answer in the returned snippets it does not need to read further
esafranchik•3h ago
Wouldn't NDCG/token results vary wildly depending on the agent's query and the number of returned items?

e.g. agents often run `grep -m 5 "QUERY"` with different queries, instead of one big grep for all items.

stephantul•2h ago
The same holds for semble: the agent can fire off many different semble queries with different k/parameters.

I guess the point we’re trying to make is that you need fewer semble queries to achieve the same outcome, compared to grep+readfile calls.

ludicrousdispla•2h ago
grep doesn't need tokens, so what is 98% fewer than zero?
stephantul•2h ago
You need readfile to do something with those tokens. Grep only gives you the matching lines, not the context.
djaboss•2h ago
`grep -C $NUM` ? ;)
stephantul•2h ago
Even so. Take a look at the NDCG numbers for grep. It's not pretty
mrpf1ster•2h ago
Does this work well for non-coding documents as well? Say api docs or AI memory files?
stephantul•2h ago
Hey, this is something we're actively investigating. We recently added a flag, `--include-text-files`, which, when set, also makes Semble index regular documents (i.e., markdown, text, json). This should also work relatively well.
jerezzprime•1h ago
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.

stephantul•57m ago
Yeah we're also interested in doing this, it's on the roadmap together with optimization of the prompt and descriptions so that models have an easier time using it.

Perhaps anecdotally: we do use this tool ourselves of course, and it's been working pretty well so far. Anthropic models call it and seem to trust the results.

giancarlostoro•10m ago
I forced Claude to have a global memory for RTK and my own AI memory system (GuardRails) which it happily uses both, the only times it doesnt use GuardRails is if I dont mention it at all, otherwise it always uses RTK unless RTK falls apart running a tool it does not support.
singpolyma3•1m ago
Semantic code search seems like a useful tool for a human too. Not just for agents.

Mercurial, 20 years and counting: how are we still alive and kicking? [video]

https://fosdem.org/2026/schedule/event/AGWUVH-mercurial-aint-you-dead-yet/
99•ibobev•2d ago•69 comments

I turned a $80 RK3562 Android tablet into a Debian Linux workstation

https://github.com/tech4bot/rk3562deb
188•tech4bot•7h ago•94 comments

Multi-Species Canopy Latrines in Costa Rican Cloud Forests

https://onlinelibrary.wiley.com/doi/10.1002/ece3.72964
12•PaulHoule•3d ago•1 comments

The occasional ECONNRESET

https://movq.de/blog/postings/2026-05-05/1/POSTING-en.html
66•zdw•3h ago•15 comments

Hindenburg’s Smoking Room

https://www.airships.net/hindenburg-smoking-room/
109•crescit_eundo•3d ago•57 comments

TrueVault (YC W14) Is Hiring a Director of Product – Privacy SaaS (Remote)

https://www.ycombinator.com/companies/truevault/jobs/njvSGDj-growth-lead
1•jason_wang•1m ago

Magical Realism: “Northern Exposure” 25 Years Later (2015)

https://www.rogerebert.com/streaming/magical-realism-nothern-exposure-25-years-later
15•walterbell•1d ago•6 comments

VoIP Brings Back Old-Fashioned Pay Phones to Rural Vermont

https://spectrum.ieee.org/payphone-voip
5•bookofjoe•1h ago•0 comments

I don't think AI will make your processes go faster

https://frederickvanbrabant.com/blog/2026-05-15-i-dont-think-ai-will-make-your-processes-go-faster/
428•TheEdonian•8h ago•304 comments

CUDA Books

https://github.com/alternbits/awesome-cuda-books
86•dariubs•8h ago•17 comments

High-Entropy Alloy

https://en.wikipedia.org/wiki/High-entropy_alloy
83•leonidasrup•3d ago•14 comments

Schanuel's Conjecture and the Semantics of Triton's FPSan

https://cp4space.hatsya.com/2026/05/03/schanuels-conjecture-and-the-semantics-of-fpsan/
12•c1ccccc1•1d ago•3 comments

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

https://github.com/MinishLab/semble
36•Bibabomas•5h ago•16 comments

Zerostack – A Unix-inspired coding agent written in pure Rust

https://crates.io/crates/zerostack/1.0.0
523•gidellav•22h ago•287 comments

Prolog Basics Explained with Pokémon

https://unplannedobsolescence.com/blog/prolog-basics-pokemon/
172•birdculture•2d ago•29 comments

Don’t Outsource the Learning

https://addyosmani.com/blog/dont-outsource-learning/
23•korecodes•4h ago•9 comments

Scientists believe ibogaine can help veterans overcome PTSD

https://www.bbc.com/future/article/20260514-how-hallucinogenic-ibogaine-helps-veterans-overcome-ptsd
56•bushwart•9h ago•55 comments

Native all the way, until you need text

https://justsitandgrin.im/posts/native-all-the-way-until-you-need-text/
340•dive•9h ago•224 comments

AI is a technology not a product

https://daringfireball.net/2026/05/ai_is_technology_not_a_product
251•ch_sm•7h ago•88 comments

Scientists “bottle the sun” with a liquid battery that stores solar energy

https://www.sciencedaily.com/releases/2026/05/260513221821.htm
28•ndr42•2h ago•18 comments

Apple Silicon costs more than OpenRouter

https://www.williamangel.net/blog/2026/05/17/offline-llm-energy-use.html
262•datadrivenangel•8h ago•227 comments

Mozilla to UK regulators: VPNs are essential privacy and security tools

https://blog.mozilla.org/netpolicy/2026/05/15/mozilla-to-uk-regulators-vpns-are-essential-privacy...
570•WithinReason•14h ago•243 comments

Colossus: The Forbin Project

https://en.wikipedia.org/wiki/Colossus:_The_Forbin_Project
197•doener•2d ago•72 comments

How diamonds are made

https://diamond.jaydip.me/
71•lemonberry•1d ago•48 comments

A nicer voltmeter clock

https://lcamtuf.substack.com/p/a-nicer-voltmeter-clock
293•surprisetalk•22h ago•36 comments

Tesla Solar Roof is on life support as it pivot to panels

https://electrek.co/2026/05/14/tesla-solar-roof-promise-vs-reality-pivot-panels/
98•celsoazevedo•16h ago•92 comments

OpenAI and Government of Malta partner to roll out ChatGPT Plus to all citizens

https://openai.com/index/malta-chatgpt-plus-partnership/
303•bookofjoe•1d ago•314 comments

C++26 Shipped a SIMD Library Nobody Asked For

https://lucisqr.substack.com/p/c26-shipped-a-simd-library-nobody
172•signa11•2d ago•145 comments

XS: A programming language. Anywhere, anytime, by anyone

https://xslang.org
49•yacin•6h ago•30 comments

Hosting a website on an 8-bit microcontroller

https://maurycyz.com/projects/mcusite/
216•zdw•19h ago•18 comments