Better HN
topnewbestaskshowjobs
Log inSign up

evanhu_

76 karma · joined Oct 5, 2021 (5y ago) · 17 submissions

Submissions

1.

Show HN: Transpose Spotify audio and isolate vocals/instruments in realtime(github.com ↗)

1 points · by evanhu_ · 3mo ago · discuss

2.

Show HN: Transposify–change Spotify song key from your menubar for singing(github.com ↗)

2 points · by evanhu_ · 5mo ago · discuss

comment 6mo ago · link · parent

I don't use that one!

4.

The new grads are not okay(blog.evan.hu ↗)

4 points · by evanhu_ · 6mo ago · 2 comments

comment 2y ago · link · parent

Thank you so much, yes I will have that up soon as well

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

There is a cache! You hit a new PDF but at least you will not have to wait for that one again ;)

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

Oops sorry for the miscommunication, actually you don't need to enter an API key for now. Feel free to just try it out!

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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!

14.

Show HN: Talk to any ArXiv paper just by changing the URL(github.com ↗)

194 points · by evanhu_ · 2y ago · 73 comments

comment 5y ago · link · parent

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