logoalt Hacker News

visargayesterday at 4:52 PM2 repliesview on HN

The fundamental problem wit RAG is that it extracts only surface level features, "31+24" won't embed close to "55", while "not happy" will be close to "happy". Another issue is that embedding similarity does not indicate logical dependency, you won't retrieve the callers of a function with RAG, you need a LLM or code for that. Third issue is chunking, to embed you need to chunk, but if you chunk you exclude information that might be essential.

The best way to search I think is a coding agent with grep and file system access, and that is because the agent can adapt and explore instead of one shotting it.

I am making my own search tool based on the principle of LoD (level of detail) - any large text input can be trimmed down to about 10KB size by doing clever trimming, for example you could trim the middle of a paragraph keeping the start and end, or you could trim the middle of a large file. Then an agent can zoom in and out of a large file. It skims structure first, then drills into the relevant sections. Using it for analyzing logs, repos, zip files, long PDFs, and coding agent sessions which can run into MB size. Depending on content type we can do different types of compression for code and tree structured data. There is also a "tall narrow cut" (like cut -c -50 on a file).

The promise is - any size input fit into 10KB "glances" and the model can find things more efficiently this way without loading the whole thing.


Replies

andaitoday at 1:02 AM

>The best way to search I think is a coding agent with grep and file system access, and that is because the agent can adapt and explore instead of one shotting it.

I tried the knowledge base feature in Claude web recently, uploaded a long textbook.

The indexer crashed and the book never fully indexed, but Claude had access to some kind of VM and reverse engineered the (automatically converted) book's fileformat and used shell tools to search it for the answers to my questions.

(Again, this was the web version of Claude, not Claude Code on my computer!)

I thought that was really neat, a little silly, and a little scary.

visargayesterday at 7:01 PM

Ok 2 hours later here is the release: https://github.com/horiacristescu/nub

show 1 reply