HackerTrans
TopNewTrendsCommentsPastAskShowJobs

evanhu_

no profile record

Submissions

Show HN: Transposify–change Spotify song key from your menubar for singing

github.com
2 points·by evanhu_·letzten Monat·0 comments

The new grads are not okay

blog.evan.hu
4 points·by evanhu_·vor 2 Monaten·2 comments

Show HN: Talk to any ArXiv paper just by changing the URL

github.com
194 points·by evanhu_·vor 3 Jahren·73 comments

comments

evanhu_
·vor 2 Monaten·discuss
I don't use that one!
evanhu_
·vor 3 Jahren·discuss
Thank you so much, yes I will have that up soon as well
evanhu_
·vor 3 Jahren·discuss
I did try that at first, it was hard to parse through the HTML code and organize into logical sections (authors, references, abstract) and then clean up the text to prepare it optimally for chunking and embedding. Once I found GROBID I just went with that route because it handled all that for me.
evanhu_
·vor 3 Jahren·discuss
There is a cache! You hit a new PDF but at least you will not have to wait for that one again ;)
evanhu_
·vor 3 Jahren·discuss
Definitely I'll move to the LaTeX source code instead of a PDF backend since that allows better support for non textual data that gets poorly scraped by GROBID. That is a really cool development I didn't know about, also theres https://ar5iv.labs.arxiv.org/ which already has most arXiv papers as HTML documents. I chose GROBID because they not only parse the PDF but organize the text into logical sections for me (Intro, abstract, references) which I didn't want to manually do with heuristics that I'd have to devise.
evanhu_
·vor 3 Jahren·discuss
Oops sorry for the miscommunication, actually you don't need to enter an API key for now. Feel free to just try it out!
evanhu_
·vor 3 Jahren·discuss
Thank you :). I updated the README to have some more explanation of the steps.

The chunking algorithm chunks by logical section (intro, abstract, authors, etc.) and also utilizes recursive subdivision chunking (chunk at 512 characters, then 256, then 128...). It is quite naive still but it works OK for now. An improvement would perhaps involve more advanced techniques like knowledge graph precomputation.

Reranking works by instead of embedding each text chunk as a vector and performing cosine similarity nearest neighbor search, you use a Cross-Encoder model that compares two texts and outputs a similarity score. Specifically, I chose Cohere's Reranker that specializes in comparing Query and Answer chunk pairs.
evanhu_
·vor 3 Jahren·discuss
Thank you! Thanks for pointing that out, since the underlying RAG is rather naive (simple embedding cosine similarity lookup, as opposed to knowledge graph / advanced techniques), I opted to embed both "small" (512 character and below) chunks as well as entire section chunks (embedding the entire introduction) in order to support questions such as "Please summarize the introduction". Since I also use 5 chunks for each context, I suspect this can add up to a massive amount on papers with huge sections.
evanhu_
·vor 3 Jahren·discuss
Yes! I'll set up talk2biorxiv.org very soon as it would be simple to port over. I also plan on making the underlying research PDF RAG framework available as an independent module
evanhu_
·vor 3 Jahren·discuss
I spent forever looking at various PDF parsing solutions like Unstructured, and eventually stumbled across GROBID, which was an absolute perfect fit since it's entirely made for scientific papers and has header/section level segmentation capabilities (splitting the paper into Abstract, Introduction, References, etc.) It's lightweight and fast too!
evanhu_
·vor 5 Jahren·discuss
I'm super impressed with what you've managed to create, do you have any further plans with this project? I'm curious now that it's finished and documented to such an extent will you try to bring it publicity and actual usage or was this just a passion project. Thanks