Here is a simple Telegram bot to recommend arXiv papers daily, obtain your preference ratings and update the recommender models given the preference ratings.
Create a telegram bot following the instruction here. Then you get a bot token and store it in TELEGRAM_BOT_TOKEN_NOTIF_BOT
as an environment variable.
Then you can get your chat id. First randomly chat with the bot you just created in telegram, then run
curl https://api.telegram.org/bot{your bot token}/getUpdates
and look for chat ids. Save the chat id into TELEGRAM_BOT_CHAT_ID
as another environment variable.
Please follow the instruction here to get the telegram API ID and PASS, and store them into TG_API_ID
and TG_API_PASS
as environment variables.
pip install -r requirement.txt
python arxiv_checker.py --first_backcheck_day 3 --keywords llm,search,reasoning,planning,optimization
The bot will send you arXiv papers related to your interest every day, to the chat window.
keywords
specifies the keywords of the paper the bot uses to search, separated by comma. No space needed.first_backcheck_day
is to specify how many days to look back to get arXiv papers, when the bot runs at the first time.
For each paper the bot sends, in the chat window there will be possible ratings ( 👎 = 1, 👍 = 5 and ❤️ = 6 ) for the user to rate. User can press the rating and the bot will receive it (as one reply message from the bot).
User can also suggest papers by send its arXiv link in the chat window. Such papers will automatically be ranked as 👍 = 5.
Once the model collects enough ranking instances (e.g. > 100), user can update the preference model by running the following:
python preference_model.py
It will save the trained model to pytorch_preference_model.pt
and tfidf_vectorizer.joblib
(as a TF-IDF vectorizer). Then you restart arxiv_checker.py
to load the updated models and continue the recommendation.
MIT License