Views
No views yet
| Algorithm | LightGBM LambdaMART (lambdarank objective) |
| Features (15) | BM25 score, cosine-sim (BGE embeddings), cross-encoder score, passage length, section depth, URL authority… |
| Training data | 200 k synthetic triplets (query, positive, negative) auto-mined from Medimaven dataset (webmd, nhs, nih) |
| Metric optimised | nDCG@10 |
1import lightgbm as lgb
2import numpy as np
3import json, pathlib
4
5# 1️⃣ load the model
6model_path = "dranreb1660/medimaven-ltr-lambdamart@v1.1"
7booster = lgb.Booster(model_file=model_path + "/ltr_lambdamart.txt")
8
9# 2️⃣ prepare a feature matrix for a single query
10features = np.array([
11 [8.7, 0.82, 0.75, 120, 2, 0.91, ...], # candidate doc 1
12 [7.2, 0.67, 0.55, 300, 3, 0.80, ...], # candidate doc 2
13])
14scores = booster.predict(features)
15
16# 3️⃣ sort passages by `scores` (higher = better)
17best_idx = np.argsort(-scores)| Metric | BM25 only | BM25 → Cross-Encoder | BM25 → LambdaMART |
|---|---|---|---|
| nDCG@10 | 0.38 | 0.46 | 0.55 |
| Recall@20 | 0.71 | 0.81 | 0.88 |
1num_leaves: 255
2learning_rate: 0.05
3n_estimators: 800
4min_data_in_leaf: 20
5feature_fraction: 0.9
6lambda_l1: 0.0
7lambda_l2: 0.1
8metric: ndcg
9ndcg_eval_at: 101@misc{medimaven2025ltr,
2 title = {MediMaven LambdaMART LTR},
3 author = {Kyei-Mensah, Bernard},
4 year = {2025},
5 howpublished = {\url{https://huggingface.co/dranreb1660/medimaven-ltr-lambdamart}}
6}