Overview

September 28, 2025 · View on GitHub

This is a project to evaluate how various LLMs perform on recommendation tasks, including retrieval, ranking, explanation, conversation, and chatbot ability. The whole workflow is depicted as the following: Figure Caption

Quick start

  1. Download Steam Data:
    Download link
    Unzip to ./data/ folder.

    unzip path_to_downloaded_file.zip -d ./data/
    
  2. Navigate to Project:

    cd RecLM-eval
    
  3. Configure API:
    Edit openai_api_config.yaml, add your API key:

    API_BASE: "if-you-have-different-api-url"
    API_KEY: "your-api-key"
    
  4. Run:

    bash main.sh
    

Usage

Environment

conda create -n receval python==3.9
conda activate receval
pip install -r requirements.txt

Set OpenAI API Environment

  • If you want to use the OpenAI API, you need to fill in your API key in the openai_api_config.yaml file.
  • If you are using models not pre-defined in the project, add their cost information to the api_cost.jsonl file.

Prepare your test data

Evaluate

  • You can specify the evaluation tasks through the task-names parameter.
  • These values are avaliable: ranking, retrieval, cf_ranking_mc, seq_ranking_mc, explanation, conversation, embedding_ranking, embedding_retrieval, chatbot.

Ranking/Retrieval

Parameters:

  • --bench-name: The name of the dataset
  • --model_path_or_name: The path or name of the evaluated model.

example:

python eval.py --task-names ranking retrieval \
    --bench-name steam \
    --model_path_or_name Qwen/Qwen2.5-7B-Instruct

optional parameters (only for vllm model):

  • --max_new_tokens MAX_NEW_TOKENS: The maximum number of tokens to generate, prompt+max_new_tokens should be less than your model's max length.
  • --batch_size BATCH_SIZE: The batch size during inference.

CF ranking

Parameters:

  • --bench-name: The name of the dataset
  • --model_path_or_name: The path or name of the evaluated model.

example:

python eval.py --task-names cf_ranking_mc \
    --bench-name steam \
    --model_path_or_name Qwen/Qwen2.5-7B-Instruct

Sequential ranking

Parameters:

  • --bench-name: The name of the dataset
  • --model_path_or_name: The path or name of the evaluated model.

example:

python eval.py --task-names seq_ranking_mc \
    --bench-name steam \
    --model_path_or_name Qwen/Qwen2.5-7B-Instruct

Embedding ranking/retrieval

Parameters:

  • --bench-name: The name of the dataset
  • --model_path_or_name: The path or name of the evaluated model.
  • --user_emb_type: The prompt type for user embedding(title or summary).
  • --item_emb_type: The prompt type for item embedding(title or description).
  • --summary-model: The name of the model used to summary user preference.

Example:

python eval.py --task-names embedding_ranking embedding_retrieval \
    --model_path_or_name text-embedding-3-small \
    --bench-name steam \
    --user_emb_type title \
    --item_emb_type title

python eval.py --task-names embedding_ranking embedding_retrieval \
    --model_path_or_name text-embedding-3-small \
    --bench-name steam \
    --user_emb_type summary \
    --summary-model gpt-3.5-turbo \
    --item_emb_type title

chatbot ability

Parameters:

  • --model_path_or_name: The path or name of the evaluated model.
  • --baseline-model: The path or name of the model acts as a baseline during pairwise evaluation.
  • --judge-model: The path or name of the model used to perform judge during pairwise evaluation.

example:

python eval.py --task-names chatbot \
    --model_path_or_name Qwen/Qwen2.5-7B-Instruct \
    --judge-model gpt-3.5-turbo \
    --baseline-model gpt-3.5-turbo

Explanation

Parameters:

  • --bench-name: The name of the dataset
  • --model_path_or_name: The path or name of the evaluated model.
  • --baseline-model: The path or name of the model acts as a baseline during pairwise evaluation.
  • --judge-model: The path or name of the model used to perform judge during pairwise evaluation.
python eval.py --task-names explanation \
    --bench-name steam \
    --model_path_or_name Qwen/Qwen2.5-7B-Instruct \
    --judge-model gpt-3.5-turbo \
    --baseline-model gpt-3.5-turbo

Conversation

Parameters:

  • --bench-name: The name of the dataset
  • --model_path_or_name: The path or name of the evaluated model.
  • --simulator-model: The path or name of the model acts as a user simulator during conversation.
  • --max_turn: The max turns of the conversation. example:
python eval.py --task-names conversation \
    --bench-name steam \
    --model_path_or_name Qwen/Qwen2.5-7B-Instruct \
    --simulator-model gpt-3.5-turbo \
    --max_turn 5

Several mainstream open source models were used to evaluate the following tasks:

Amazon_Fashion · Ranking Evaluation (1000 samples)

Each test instance contains 1 positive item and 19 negatives (20 candidates in total). The tables report the main top-k ranking metrics as well as four error indicators defined in RecLM-eval.

k = 5

ModelNDCG@5Rec@5Hits@5Prec@5MAP@5MRR@5candidate_error_ratecopy_errorduplicate_error_ratehistory_error_rate
Random guess0.14740.25000.25000.05000.11420.1142
Qwen2.5-3B-it0.15190.26000.26000.05200.11660.11660.0019.0850.0010.016
gemma3-4B-it0.22570.33300.33300.06660.19080.19080.0018.4890.0010.017
Llama-3.1-8B-it0.21310.32600.32600.06520.17610.17610.0018.9350.0010.016
Qwen2.5-7B-it0.21800.32100.32100.06420.18450.18450.00010.1830.0010.016
Qwen3-4B-it0.24270.34400.34400.06880.20980.20980.00016.6420.0010.016
Qwen2.5-14B-it0.34270.45300.45300.09060.30670.30670.0017.4380.0010.017

k = 10

ModelNDCG@10Rec@10Hits@10Prec@10MAP@10MRR@10candidate_error_ratecopy_errorduplicate_error_ratehistory_error_rate
Random guess0.22720.50000.50000.05000.14640.1464
Qwen2.5-3B-it0.22510.49000.49000.04900.14610.14610.0019.0850.0010.016
gemma3-4B-it0.29920.56200.56200.05620.22080.22080.0018.4890.0010.017
Llama-3.1-8B-it0.28350.54500.54500.05450.20490.20490.0018.9350.0010.016
Qwen2.5-7B-it0.28410.52900.52900.05290.21110.21110.00010.1830.0010.016
Qwen3-4B-it0.31000.55500.55500.05550.23700.23700.00016.6420.0010.016
Qwen2.5-14B-it0.40680.65300.65300.06530.33280.33280.0017.4380.0010.017

Amazon_Fashion · cf_ranking_mc Evaluation (1000 samples)

Each test instance contains 1 positive item and 9 negatives (10 candidates in total). The tables report the metrics acc@1 and one error indicators none_ratio defined in RecLM-eval.

Modelacc@1none_ratio
Random guess0.100
Qwen2.5-3B-it0.2550.014
gemma3-4B-it0.2650.000
Llama-3.1-8B-it0.3100.000
Qwen2.5-7B-it0.3330.014
Qwen3-4B-it0.3400.000
Qwen2.5-14B-it0.3760.000

Amazon_Fashion · seq_ranking_mc Evaluation (1000 samples)

Each test instance contains 1 positive item and 9 negatives (10 candidates in total). The tables report the metrics acc@1 and one error indicators none_ratio defined in RecLM-eval.

Modelacc@1none_ratio
Random guess0.100
Qwen2.5-3B-it0.2500.002
gemma3-4B-it0.2690.000
Llama-3.1-8B-it0.3220.000
Qwen2.5-7B-it0.3300.015
Qwen3-4B-it0.3290.000
Qwen2.5-14B-it0.3780.004