Lune

EMNLP2025Top-tier venue

PORTS: Preference-Optimized Retrievers for Tool Selection with Large Language Models

Lorenzo Molfetta, Giacomo Frisoni, Nicolò Monaldini, Gianluca Moro

Abstract

Integrating external tools with Large Language Models (LLMs) has emerged as a promising paradigm for accomplishing complex tasks. Since LLMs still struggle to effectively manage large tool collections, researchers have begun exploring retrieval-based methods to preselect the most relevant options, addressing input length and latency constraints. However, existing retrievers are often misaligned with toolcalling LLMs due to their separate training processes. This paper presents PORTS, a novel odds ratio preference optimization method for training retrievers aimed at tool selection. Using a perplexity-inspired preference signal from a frozen LLM, our approach fine-tunes a retriever to find helpful tools by optimizing the correlation between the selection probabilities and the downstream performances while jointly enforcing a contrastive semantic loss between documentation strings. The versatility of PORTS and its ability to significantly improve tool selection accuracy are demonstrated through extensive experiments on six datasets, two encoder models, and three LLMs with diverse prior knowledge. With low computational demands, our alignment process facilitates generalization to new queries and tools, proving valuable for practical applications with evolving toolsets. 1

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Gorilla: Large Language Model Connected with Massive APIs cites Toolformer: Language Models Can Teach Themselves to Use Tools
  • Gorilla: Large Language Model Connected with Massive APIs cites HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face
  • Toolformer: Language Models Can Teach Themselves to Use Tools cites Improving Language Models by Retrieving from Trillions of Tokens
  • HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face cites Toolformer: Language Models Can Teach Themselves to Use Tools
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Sycophants in the Courtroom: Are LLMs Fragile to Juridical Authority and Evolving Legal Standards?Lorenzo Molfetta, Alessio Cocchieri, Luca Ragazzi, Ilaria Bartolini et al.ACL 2026 · 1 citation

Builds on20

  1. Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
  2. Toolformer: Language Models Can Teach Themselves to Use ToolsTimo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu et al.NeurIPS 2023 · 5,989 citations
  3. HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging FaceYongliang Shen, Kaitao Song, Xu Tan, Dongsheng Li et al.NeurIPS 2023 · 1,778 citations
  4. Gorilla: Large Language Model Connected with Massive APIsShishir G. Patil, Tianjun Zhang, Xin Wang, Joseph E. GonzalezNeurIPS 2024 · 1,715 citations
  5. Improving Language Models by Retrieving from Trillions of TokensSebastian Borgeaud, Arthur Mensch, Jordan Hoffmann, Trevor Cai et al.ICML 2022 · 1,629 citations

Related papers

  1. ToolBox-RL: Learning to Generalize Tool Use Across Massive RepositoriesXinyan Shi, Renzhi Wang, Haodong Liu, Piji LiWWW 2026
  2. LoSemB: Logic-Guided Semantic Bridging for Inductive Tool RetrievalLuyao Zhuang, Qinggang Zhang, Huachi Zhou, Yujing Zhang et al.WWW 2026 · 2 citations
  3. Dynamic Tool Dependency Retrieval for Lightweight Function CallingBhrij Patel, Davide Belli, Amir Jalalirad, Maximilian Arnold et al.ACL Findings 2026
  4. Self-Renewal Prompt Optimizing with Implicit ReasoningZihan Liang, Ben Chen, Zhuoran Ran, Zihan Wang et al.EMNLP Findings 2024 · 2 citations
  5. Tool Learning in the Wild: Empowering Language Models as Automatic Tool AgentsZhengliang Shi, Shen Gao, Lingyong Yan, Yue Feng et al.WWW 2025 · 59 citations
Dusk over the sea between two cliffs drawn in fine vertical lines