Kaffaljidhmah2 / Arxiv-Recommender

GNU General Public License v3.0
39 stars 1 forks source link

Implement cascade call to gpt-3.5 and gpt-4 #3

Closed thwu1 closed 7 months ago

thwu1 commented 8 months ago

I use gpt-4 as the default model and have about 5-6 research topics, while I found out that analysing around 200 papers would cost me around 30 dollars. I implement two optimization to reduce the cost from 30 -> 2

  1. Instead of feeding every research topic seperately to gpt, feed all topics in one call. (This saves me 80% of the cost, 30 -> 6)
  2. Cascade call to gpt-3.5 and gpt-4, use gpt-3.5 to directly reject papers with low score and rescore those paper with score at least 2 using gpt-4. (This further reduce 60%+ cost, since 60%+ paper would be not relevant to any of my research topics)

This commit only contain the second optimization, just a few lines of code.