Live data from Hacker News

Hard problems that reduce to document ranking

noperator.dev

11–20 of 57 posts

Re: Hard problems that reduce to document ranking

#11
post #10

Great article, I’ve had similar findings! LLM based “document-chunk” ranking is a core feature of PaperQA2 ( https://github.com/Future-House/paper-qa ) and part of why it works so well for scientific Q&A compared to traditional embedding-ranking based RAG systems.

That's awesome. Will take a closer look!

Re: Hard problems that reduce to document ranking

#13

A concept that I've been thinking about a lot lately: transforming complex problems into document ranking problems to make them easier to solve. LLMs can assist greatly here, as I demonstrated at inaugural DistrictCon this past weekend.

So would this be 1600 commits and one of which fixes the bug (which might be easier with commit messages?) or is this a diff between two revisions, with 1600 chunks, each chunk a “document” ? I am trying to grok why we want to find the fix - is it to understand what was done so we can exploit unpatched instances in the wild? Also also “identifying candidate functions for fuzzing targets“ - if every function is a docu…

Great questions. For commits or revision diffs as documents—either will work. Yes, I've applied this to N-day vulnerability identification to support exploit development and offensive security testing. And yes, for fuzzing, a sensible approach would be to dump the exported function attributes (names, source/disassembled code, other relevant context, etc.) from a built shared library, and ask, "Which of these functions most likely parses complex input and may be a good candidate for fuzzing?" I've had some success with that specific approach already.

Re: Hard problems that reduce to document ranking

#14
post #12

This furthers an idea I've had recently that we (and the media) are focusing too much on creating value by making more ever more complex LLMs, and instead we are vastly underestimating creative applications of current generation AI.

Agree. I think LLMs are usually not "harnessed" correctly for complex, multi-step problems—hence the `raink` CLI tool: https://github.com/noperator/raink

Re: Hard problems that reduce to document ranking

#17

I'm curious - why is LLM ranking preferred over cosine similarity from an embedding model (in the context of this specific problem)?

Because the question "does Diff A fix Vuln B" is not answered by the cosine distance between vector(Diff A) and vector(Vuln B).

Re: Hard problems that reduce to document ranking

#18

Minor nitpick, Should be "document ranking reduces to these hard problems", I never knew why the convention was like that, it seems backwards to me as well, but that's how it is.

"Document ranking reduces to these hard problems" would imply that document ranking is itself an instance of a certain group of hard problems. That's not what the article is saying.

Re: Hard problems that reduce to document ranking

#19
One interesting thing about LLMs, that is also related to why chain of thoughts work so well, is that they are good at sampling (saying a lot of things about a problem), and are good, when shown N solutions, to point at the potentially better one. They do these things better than zero-shot "tell me how to do that". So CoT is searching inside the space of representation + ranking, basically. So this idea is leveraging something LLMs are able to clearly do pretty well.

Re: Hard problems that reduce to document ranking

#20

Minor nitpick, Should be "document ranking reduces to these hard problems", I never knew why the convention was like that, it seems backwards to me as well, but that's how it is.

"Document ranking reduces to these hard problems" would imply that document ranking is itself an instance of a certain group of hard problems. That's not what the article is saying.

I know its counterintuitive, as I explained in my comment, but that's the correct terminology in CS world.
Post reply on HN