Live data from Hacker News

Show HN: Semantic grep with local embeddings

github.com

71–80 of 84 posts

Re: Show HN: Semantic grep with local embeddings

#71

I actually have a WIP library for this, the indexing server isn't where I want it just yet, but I have an entire agent toolkit that does this stuff, and the indexing server is quite advance, with self-tuning, raptor/lsp integration, solves for optimal result set using knapsack, etc. https://github.com/sibyllinesoft/grimoire

I have to know, what is the Lens SPI? The link in your readme is broken, and Kagi results for this cannot possibly be right.

Re: Show HN: Semantic grep with local embeddings

#73

> thread 'main' (17953) panicked at ck-cli/src/main.rs:305:41: byte index 100 is not a char boundary I seem to have gotten 'lucky' and it split an emoji just right. --- For anyone curious: this is great for large, disjointed, and/or poorly documented code bases. If you kept yours tight and files smaller than ~600 lines, it is almost always better to nudge llm's into reading whole files.

Nice catch- should be fixed in latest

Re: Show HN: Semantic grep with local embeddings

#74

I actually have a WIP library for this, the indexing server isn't where I want it just yet, but I have an entire agent toolkit that does this stuff, and the indexing server is quite advance, with self-tuning, raptor/lsp integration, solves for optimal result set using knapsack, etc. https://github.com/sibyllinesoft/grimoire

I have to know, what is the Lens SPI? The link in your readme is broken, and Kagi results for this cannot possibly be right.

Lens is basically a rust local first mmapped file base search store, it combines RAPTOR with LSP, semantic vectors and a dual dense/sparse encoding, and can learn a function over those to tune the weights of the relevance sources adaptively per query using your data. It also uses linear programming to select an "efficient" set of results that minimizes mutual information between result atoms -- regular rag/rerank pipelines just dump the top K, but those often have a significant amount of overlap so you bloat context for no benefit.

Re: Show HN: Semantic grep with local embeddings

#78

Earlier quoted context omitted.

if you’re concerned about context you can trivially make a hook that will prune your conversation history of older semantic search results. i do a lot of context management with hooks for all sorts of tool calls.

That sounds great - do you have any examples?

For example I have a Stop hook that scans my messages to see which files we've worked on. It'll check to see if the changes to those files have been committed and, if not, it will prevent Claude from stopping and send it a message to commit the specific files in a specific style that includes the id of the current session. The same script also cleans up all previous instances of the same message in the conversation, saving like 5k tokens per session.

I have a lot of PreToolUse hooks that injects guideline messages whenever certain tools are called or bash commands run. My hooks also prune older versions of those out of context. All of the transcripts are in ~/.claude/projects/ in jsonl format and are hot-editable.

Re: Show HN: Semantic grep with local embeddings

#80

At this point, we aren't even saying it's written in Rust anymore, we just mention it in the title whenever possible. I did look into the core features and I gotta say, that looked quite cool. It's like Google search, but for the codebase. What does it take to support other languages?

It supports most languages but needs a bit of tree-sitter setup to do semantic chunking. Let me know what languages you’d like added

Go would be my top ask. Shell and make would be nice bonuses.
Post reply on HN