🚀 📊 事前ランキングツール Pre:Ranker
Pre:Ranker は、与えられたクエリに基づいて利用可能なツールのコーパスを絞り込むことで、現代の大規模言語モデル(LLM)の関数呼び出しプロセスを最適化するように設計されたツールです。
🚀 クイックスタート
ニュース
Pre:Rankerについて
たくさんのツールや機能があって使いにくいですか?Pre:Ranker を試してみてください!
Pre:Ranker は、与えられたクエリに基づいて利用可能なツールのコーパスを絞り込むことで、現代のLLMの関数呼び出しプロセスを最適化するように設計されています。
詳細は 🐱GITHUB を確認してください!
モデル情報
プロパティ |
詳細 |
モデルタイプ |
text-ranking |
ベースモデル |
Alibaba-NLP/gte-reranker-modernbert-base |
ライブラリ名 |
sentence-transformers |
ライセンス |
apache-2.0 |
💻 使用例
基本的な使用法
from sentence_transformers.cross_encoder import CrossEncoder
model = CrossEncoder('yjoonjang/preranker-v1')
model.eval()
pairs = [
["Is 'https://www.apple.com' available in the Wayback Machine on September 9, 2015?", "{'name': 'availability', 'description': 'Checks if a given URL is archived and currently accessible in the Wayback Machine.', 'parameters': {'url': {'description': 'The URL to check for availability in the Wayback Machine.', 'type': 'str', 'default': 'http://mashape.com'}, 'timestamp': {'description': \"The timestamp to look up in Wayback. If not specified, the most recent available capture is returned. The format of the timestamp is 1-14 digits (YYYYMMDDhhmmss). Defaults to '20090101'.\", 'type': 'str, optional', 'default': '20090101'}, 'callback': {'description': 'An optional callback to produce a JSONP response. Defaults to None.', 'type': 'str, optional', 'default': ''}}}"],
["Is 'https://www.apple.com' available in the Wayback Machine on September 9, 2015?", "{'name': 'top_grossing_mac_apps', 'description': 'Fetches a list of the top-grossing Mac apps from the App Store.', 'parameters': {'category': {'description': \"The category ID for the apps to be fetched. Defaults to '6016' (general category).\", 'type': 'str', 'default': '6016'}, 'country': {'description': \"The country code for the App Store. Defaults to 'us'.\", 'type': 'str', 'default': 'us'}, 'lang': {'description': \"The language code for the results. Defaults to 'en'.\", 'type': 'str', 'default': 'en'}, 'num': {'description': 'The number of results to return. Defaults to 100. Maximum allowed value is 200.', 'type': 'int', 'default': '100'}}}"],
["Is 'https://www.apple.com' available in the Wayback Machine on September 9, 2015?", "{'name': 'top_paid_mac_apps', 'description': 'Retrieves a list of the top paid Mac apps from the App Store.', 'parameters': {'category': {'description': \"Category of the apps to retrieve. Default is '6016'.\", 'type': 'str', 'default': '6016'}, 'country': {'description': \"Country code to filter the app results. Default is 'us'.\", 'type': 'str', 'default': 'us'}, 'lang': {'description': \"Language code for the results. Default is 'en'.\", 'type': 'str', 'default': 'en'}, 'num': {'description': 'Number of results to return. Default is 100. Maximum is 200.', 'type': 'int', 'default': '100'}}}",]
]
scores = model.predict(pairs)
print(scores)
📚 ドキュメント
MTEB-ToolRet
ToolRet Benchmark をBEIR形式に変換して、MTEB互換にしました。詳細は make_toolret_to_beir_format.ipynb
を確認してください。
評価コード
git clone https://github.com/yjoonjang/PreRanker.git
cd PreRanker/toolret_eval
python run_mteb.py
評価結果
学習詳細
学習手順
📄 ライセンス
引用
@misc{Pre:Ranker,
publisher = {Youngjoon Jang, Seongtae Hong},
year = {2025},
url = {https://github.com/yjoonjang/preranker}
},
Sentence Transformers
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
ListNetLoss
@inproceedings{cao2007learning,
title={Learning to Rank: From Pairwise Approach to Listwise Approach},
author={Cao, Zhe and Qin, Tao and Liu, Tie-Yan and Tsai, Ming-Feng and Li, Hang},
booktitle={Proceedings of the 24th international conference on Machine learning},
pages={129--136},
year={2007}
}