Task-Adaptive Embedding Refinement via Test-time LLM Guidance

Ariel Gera, Shir Ashury-Tahan, Gal Bloch, Ohad Eytan, Assaf Toledo
5/12/2026
cs.CLcs.IRcs.LG

Official code: IBM/task-aware-embedding-refinement (14 stars, Apache-2.0, last commit 2026-05-12).

Abstract

We explore the effectiveness of an LLM-guided query refinement paradigm for extending the usability of embedding models to challenging zero-shot search and classification tasks. Our approach refines the embedding representation of a user query using feedback from a generative LLM on a small set of documents, enabling embeddings to adapt in real time to the target task. We conduct extensive experiments with state-of-the-art text embedding models across a diverse set of challenging search and classification benchmarks. Empirical results indicate that LLM-guided query refinement yields consistent gains across all models and datasets, with relative improvements of up to +25% in literature search, intent detection, key-point matching, and nuanced query-instruction following. The refined queries improve ranking quality and induce clearer binary separation across the corpus, enabling the embedding space to better reflect the nuanced, task-specific constraints of each ad-hoc user query. Importantly, this expands the range of practical settings in which embedding models can be effectively deployed, making them a compelling alternative when costly LLM pipelines are not viable at corpus-scale. We release our experimental code for reproducibility, at https://github.com/IBM/task-aware-embedding-refinement.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Test-time optimization of query embedding representations for zero-shot classification and retrieval

141PythonMay 12, 20265 months agoApache-2.0

Similar Papers

Cite this paper

@article{gera2026taskadaptive,
  title  = {Task-Adaptive Embedding Refinement via Test-time LLM Guidance},
  author = {Ariel Gera and Shir Ashury-Tahan and Gal Bloch and Ohad Eytan and Assaf Toledo},
  year   = {2026},
  eprint = {2605.12487},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.12487v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.12487.svg)](https://codeofpaper.com/paper/2605.12487)

Discussion