Live data from Hacker News

Show HN: Semantic grep with local embeddings

github.com

41–50 of 84 posts

Re: Show HN: Semantic grep with local embeddings

#42
I tried in my relatively small project.

    ~/c/l/web % ck --sem 'error handling'
    ℹ Semantic search: top 10 results, threshold ≥0.6
    ⠹ Searching with semantic mode...
All I got was spinning M2 Mac fan after a minute, and gave up.

Re: Show HN: Semantic grep with local embeddings

#44
post #42

I tried in my relatively small project. ~/c/l/web % ck --sem 'error handling' ℹ Semantic search: top 10 results, threshold ≥0.6 ⠹ Searching with semantic mode... All I got was spinning M2 Mac fan after a minute, and gave up.

interesting - can I ask you to try a ck --index . ?

Re: Show HN: Semantic grep with local embeddings

#45

this is so cool, is there any other tool which is more mature?

Roo has codebase indexing that it'll instruct the agent to use if enabled.

It uses whatever arbitrary embedding model you want to point it at and backs it with a qdrant vector db. Roo's documents point you toward free cloud services for this, but I found those to be dreadfully slow.

Fortunately, it takes about 20 minutes to spin up a qdrant docker container and install ollama locally. I've found the nomic text embed model is fast enough for the task even running on CPU. You'll have an initial spin up as it embeds existing codebase data then it's basically real-time as changes are made.

FWIW, I've found that the indexing is worth the effort to set up. The models are generally better about finding what they need without completely blowing up their context windows when it's available.

Re: Show HN: Semantic grep with local embeddings

#46
post #42

I tried in my relatively small project. ~/c/l/web % ck --sem 'error handling' ℹ Semantic search: top 10 results, threshold ≥0.6 ⠹ Searching with semantic mode... All I got was spinning M2 Mac fan after a minute, and gave up.

interesting - can I ask you to try a ck --index . ?

It'd be nice if respected gitignore. It's turning my M4 MBP into a space heater too.

Re: Show HN: Semantic grep with local embeddings

#48
post #27

Earlier quoted context omitted.

What does this have to do with Claude Code?

Mainly I wrote it because I noticed Claude's "by design" use of grep meant it couldn't search the code base for things it didn't already know the name of, or find "the auth section". But equally, it's well documented that e.g. Cursor's old RAG technique wasn't that great. My idea was to make a tool that just does a quick and simple embedding on each file, and uses that to provide a semantic alternative that is much c…

Starred the repo.

Went to the github repo and was expecting a section about Claude Code and best practices on how to set this up with Claude Code. Very curious to hear how that might work, especially with what you've found compared to Claude Code's love of grep.

Re: Show HN: Semantic grep with local embeddings

#49
post #66

[stub for offtopicness]

Isn't Claude Code's selling point that it doesn't use embeddings?

Why would "not using embeddings" be a selling point? Some of the most effective IR systems use embeddings (bi-encoders, cross-encoders)
Post reply on HN