MIPR / README.md
leequeue's picture
Upload folder using huggingface_hub
49654fc verified
|
Raw History Blame Contribute Delete
7.05 kB
metadata
pretty_name: MIPR
license: apache-2.0
language:
  - zh
size_categories:
  - 10K<n<100K
task_categories:
  - text-retrieval
tags:
  - image
  - text
  - multimodal-retrieval
  - e-commerce
  - intent-understanding
  - multi-category
  - benchmark
configs:
  - config_name: queries
    default: true
    data_files:
      - split: test
        path: data/mipr_query.jsonl
  - config_name: corpus
    data_files:
      - split: test
        path: data/mipr_corpus.jsonl
  - config_name: qrels
    data_files:
      - split: test
        path: data/mipr_annotation.jsonl

MIPR: A Benchmark for Reasoning-Intensive Multimodal Intent-to-Product Retrieval with Multi-Category Solutions

This repository contains the dataset, evaluation code and construction pipeline for MIPR, a benchmark for multimodal intent-to-product retrieval in Chinese e-commerce.

Overview

Real-world shopping queries often describe a problem without naming the product that would solve it. MIPR pairs a situational image with a free-form question and asks models to retrieve products that satisfy the underlying need. The image need not show the desired product, and valid solutions can span multiple product categories.

Built from real Taobao search queries and product listings, MIPR evaluates intent reasoning, product relevance and coverage of different solution categories. Queries and products are in Chinese.

Item Count
Queries (image + question) 3,522
Unique query images 3,013
Products in the shared corpus 30,731
Query–product relevance judgments 447,809
Relevance levels 5

MIPR is an evaluation benchmark with no predefined training split. The three Hugging Face configurations—queries, corpus and qrels—expose its component tables under the test split.

Relevance Labels

Label Meaning
L1 Optimal solution: satisfies the underlying need and its key constraints
L2 Suboptimal solution: relevant but only partially satisfies the need
N1 Constraint-violating: appears applicable but violates a critical constraint
N2 Related non-solution: related by category or appearance but does not solve the need
N3 Irrelevant

Dataset Structure

data/
├── mipr_query.jsonl
├── mipr_corpus.jsonl
├── mipr_annotation.jsonl
├── images/
│   ├── query_images/
│   └── product_images/
└── baseline/
    ├── qwen3_vl_embedding_8b_top50.json
    └── qwen3_vl_reranker_8b_top50.json

All three data tables use JSON Lines. idx joins queries to qrels, and item_id joins qrels to the product corpus. Product IDs are hashed and query IDs are renumbered.

Queries (queries):

{"idx": "1", "query": "表面的老垢用啥清洗剂除", "image_url": "1.jpg"}

Products (corpus):

{"item_id": "4f0114c9a825e418", "title": "凯易牌除垢剂水垢清除剂制冰机专用KAY除垢剂商用去垢清洁剂", "pict_url": "4f0114c9a825e418.jpg", "treecate_full_path": "家清-环境清洁-清洁剂-除垢剂"}

Relevance judgments (qrels, shortened example):

{"idx": "1", "items": [{"item_id": "4f0114c9a825e418", "final_grade": "L1"}]}

Each qrels row contains all judged products for one query; the 447,809 judgments are nested in 3,522 rows. image_url and pict_url are local filenames under data/images/query_images/ and data/images/product_images/, respectively. They are not remote URLs. treecate_full_path provides the leaf category used for solution-category evaluation.

Getting Started

Download the repository and run commands from its root. To load the tables locally with Hugging Face Datasets:

pip install datasets
from datasets import load_dataset

queries = load_dataset("json", data_files={"test": "data/mipr_query.jsonl"}, split="test")
corpus = load_dataset("json", data_files={"test": "data/mipr_corpus.jsonl"}, split="test")
qrels = load_dataset("json", data_files={"test": "data/mipr_annotation.jsonl"}, split="test")

Evaluate the bundled rankings

The saved rankings allow evaluation without model inference or extra dependencies:

python evaluation/evaluate.py data/baseline/qwen3_vl_embedding_8b_top50.json
python evaluation/evaluate.py data/baseline/qwen3_vl_reranker_8b_top50.json --rerank
System nDCG@10 R-L1@10 Hit-L1@1 Hit-L1@10 SC-R-L1@10 SC-R-L1@10*
Qwen3-VL-Embedding-8B 49.23 53.98 47.02 85.63 61.33 55.86
Qwen3-VL-Reranker-8B 60.11 66.00 59.26 91.25 71.52 67.00
Candidate-pool Oracle 86.04 78.95 94.97 94.97 82.80 80.22

Scores are multiplied by 100. nDCG uses gains L1=2 and L2=1; R-L1 measures recall of judged L1 products; Hit-L1 measures whether an L1 product is retrieved; SC-R-L1 measures coverage of judged L1 leaf categories. The starred metric uses the 2,664 queries with at least two L1 categories. Reranking and the Oracle operate on the embedding model's top-50 candidates.

Evaluate your own model

pip install -r requirements.txt
python evaluation/embedding.py --model Qwen/Qwen3-VL-Embedding-8B --out runs/embedding
python evaluation/retrieval.py --embed-dir runs/embedding --output runs/retrieval.json
python evaluation/evaluate.py runs/retrieval.json

Custom runs are JSON arrays with one entry per query:

[{"qid": "1", "ranked": [{"did": "4f0114c9a825e418", "score": 0.87}]}]

All queries must appear exactly once, ranked product IDs must belong to the shared corpus, and scores are optional. For reranking, preserve the baseline candidate pool. See the evaluation guide for reranker commands, supported models and analysis metrics.

Construction and Scope

Construction combines query filtering and intent analysis, two-round product-term generation, multi-route retrieval, deduplication, three-model relevance labeling with Sonnet adjudication, and retrieval-based pooling. The construction code includes the prompts and stage commands; source data, model services and the retrieval backend must be supplied separately.

Relevance judgments cover the discovered and pooled candidates rather than every possible query–product pair. Unjudged pairs receive zero gain during evaluation. The benchmark reflects Chinese e-commerce queries and the supplied product corpus; its solution categories are the annotated categories, not an exhaustive list of all possible solutions.

Citation

If you use MIPR, please cite:

@misc{li_mipr,
  title = {MIPR: A Benchmark for Reasoning-Intensive Multimodal Intent-to-Product Retrieval with Multi-Category Solutions},
  author = {Qiang Li and Xuan Lu and Jian Ruan and Manxi Lin and Jiacheng Chen and Wen Shen and Zhihua Wei and Xiaoyu Shen and Dan Ou and Xiangheng Kong and Junjun Zheng}
}

License

The dataset and code are released under the Apache License 2.0.