Description
LLMRank is the research code for the paper Large Language Models are Zero-Shot Rankers for Recommender Systems, which was presented at ECIR 2024. It tests whether large language models can act as ranking models for recommendations. For each user, the code builds two natural-language patterns, one with the user's sequential interaction history and one with the candidate items retrieved for them, and places these in an instruction template so the model returns a ranked list. The repository includes the scripts to evaluate ChatGPT's zero-shot ranking on the ML-1M dataset, notes on data preparation, and scripts that reproduce the paper's observations. Its findings cover two points: models struggle to perceive the order of a user's history, but they can be prompted to notice it with recency-focused prompting or in-context examples, and biases appear when LLMs are used to rank. To run the evaluation, you add your own OpenAI API key to a configuration file, unzip the dataset files and install the dependencies. The code is published on GitHub by the RUCAIBox group.…
Highlights
- Zero-shot ranking with large language models
- Evaluation on the ML-1M dataset
- Scripts to reproduce the paper's results
- Prompting for user history order
- Requires your own OpenAI API key
Ratings & Reviews
No ratings yet
Be the first to rate LLMRank.
People also visit
LLMRank FAQ
What is LLMRank?
Research code that tests whether large language models can rank items for recommender systems, following a 2024 paper.
Who is it for?
Researchers and developers working on recommender systems or LLM evaluation who want to reproduce the paper's experiments.
What do I need to run it?
An OpenAI API key, which goes in a configuration file, the dataset files unzipped, and the project's Python dependencies.
What does it find?
The README reports that LLMs struggle with the order of user histories but can be prompted to perceive it, and that biases appear when they rank.
What are the best LLMRank alternatives?
Popular alternatives to LLMRank include Rankify, Llmflows and Langtrace. See all LLMRank alternatives





