ramitha2002/genieai-product-reranker
GenieAI Gift Product Reranker
This CrossEncoder reranks ecommerce products for English gift-shopping queries. It scores each (query, product text) pair; a higher score means the product should rank higher.
Model Details
Training Data
The model was fine-tuned on the public tasksource/esci mirror of Amazon's Shopping Queries Dataset. Only English/US Task 1 query groups matching these gift categories were selected:
cakes and desserts
flower bouquets
chocolates and candy
perfume and fragrance
jewelry
fashion and accessories
gift baskets and hampers
skincare and beauty sets
personalized gifts
home decor and candlesAll candidates belonging to each selected query were retained, including irrelevant negatives.
Training-category distribution:
ESCI labels were converted to numeric relevance targets:
Exact = 1.00
Substitute = 0.70
Complement = 0.35
Irrelevant = 0.00Training Settings
Evaluation
Evaluation used complete, grouped ESCI validation queries.
These results measure the filtered ESCI validation set and do not guarantee the same performance on GenieAI's live catalog.
Usage
from sentence_transformers import CrossEncoder
model = CrossEncoder("ramitha2002/genieai-product-reranker")
query = "birthday flowers for mother"
products = [
"Title: Pink rose bouquet\nDescription: Fresh roses for birthdays",
"Title: Wireless gaming mouse\nDescription: RGB computer mouse",
]
scores = model.predict([(query, product) for product in products])
ranked = sorted(zip(products, scores), key=lambda item: item[1], reverse=True)
print(ranked)Raw outputs are ranking scores, not calibrated probabilities. Compare scores only among products evaluated for the same query.
Intended Use
- Rerank approximately 30 products retrieved by RAG or search.
- Apply hard stock, delivery, and budget filters before or after retrieval.
- Return the best four products after reranking.
- Fall back to the original retrieval order if model inference fails.
Limitations
- Optimized for English gift-product searches.
- Fashion and jewelry are overrepresented in the training set.
- Weaker performance is expected for skincare, personalized gifts, and hampers.
- The dataset does not represent GenieAI's live prices, stock, delivery rules, or complete catalog.
- Validate the model on real GenieAI queries before production use.
Data and Base Model
- Dataset: https://huggingface.co/datasets/tasksource/esci
- Original ESCI source: https://github.com/amazon-science/esci-data
- Base model: https://huggingface.co/cross-encoder/ms-marco-MiniLM-L6-v2
