CoHyDE: Iteratieve Co-Training van LLM-herschrijver en Dense Encoder voor Tool Retrieval
CoHyDE: Iterative Co-Training of LLM Rewriter & Dense Encoder for Tool Retrieval
May 28, 2026
Auteurs: Vaishali Senthil, Ashutosh Hathidara, Sebastian Schreiber
cs.AI
Samenvatting
Het ophalen van tools uit grote API-catalogi vormt een kernknelpunt voor LLM-agenten: gebruikersquery's komen binnen in alledaagse, vaak ondergespecificeerde taal, terwijl de catalogus gebruikmaakt van technische API-vocabulaire die geen vaste encoder zelfstandig kan overbruggen. De twee dominante trainingsbenaderingen, contrastieve encoder-fijnafstemming en HyDE-achtige query-uitbreiding met een bevroren LLM, benaderen dit probleem vanuit tegenovergestelde richtingen en falen op complementaire wijze: de fijngestemde encoder blinkt uit wanneer de oppervlaktevorm van de query al overeenkomt met de catalogus, maar stort in wanneer dat niet het geval is, terwijl zero-shot HyDE robuuster is voor ondergespecificeerde query's, maar catalogus-onbewuste hypothetische beschrijvingen genereert die de retrieval verslechteren wanneer query's goed gevormd zijn. We introduceren CoHyDE, een iteratieve procedure die de dense encoder en de LLM-herschrijver traint als één enkel co-evoluerend systeem: de encoder wordt opnieuw getraind met InfoNCE op hypothetische beschrijvingen in catalogusstijl die door de herschrijver zijn geproduceerd, en de herschrijver wordt voorkeursafgestemd via DPO op basis van de retriever-scores van de encoder, waarbij beide zijden warmgestart worden op de toolcatalogus voordat de lus begint. Op een ~10k tool-subset van de ToolBench-catalogus verbetert CoHyDE na drie rondes de sterkste enkelcomponentbaseline met +2,5 pp NDCG@5 voor standaardquery's en +6,3 pp voor achtergehouden vage query's, met winsten tot +8 pp op de moeilijkste vage categorie. Ablatie-experimenten bevestigen dat co-training het cruciale ingrediënt is: het gebruik van een van beide componenten afzonderlijk slaagt er niet in om CoHyDE te evenaren voor zowel goed gevormde als vage query's, met verliezen tot -8 pp op vage query's.
English
Tool retrieval over large API catalogs is a core bottleneck for LLM agents: user queries arrive in colloquial, often underspecified language, while the catalog uses technical API vocabulary that no fixed encoder can bridge on its own. The two dominant training approaches, contrastive encoder fine-tuning and HyDE-style query expansion with a frozen LLM, address this problem from opposite ends and fail in complementary directions: the fine-tuned encoder excels when the query's surface form already matches the catalog but collapses when it does not, while zero-shot HyDE is more robust to underspecified queries yet generates catalog-unaware hypothetical descriptions that degrade retrieval when queries are well-formed. We introduce CoHyDE, an iterative procedure that trains the dense encoder and the LLM rewriter as a single co-evolving system: the encoder is retrained with InfoNCE on catalog-style hypothetical descriptions produced by the rewriter, and the rewriter is preference-aligned via DPO against the encoder's retrieval scores, with both sides warm-started on the tool catalog before the loop begins. On a ~10k tool subset of the ToolBench catalog, three rounds of CoHyDE improve over the strongest single-component baseline by +2.5 pp NDCG@5 on standard queries and +6.3 pp on held-out vague queries, with gains as large as +8 pp on the hardest vague tier. Ablations confirm that co-training is the key ingredient: using either component in isolation fails to match CoHyDE on both well-formed and vague queries, with losses of up to -8 pp on vague queries.