Large Language Model Can Be a Foundation for Hidden Rationale-Based Retrieval

Luo Ji, Feixiang Guo, Teng Chen, Qingqing Gu, Xiaoyu Wang, Ningyuan Xi, Yihong Wang, Peng Yu, Yue Zhao, Hongyang Lei, Zhonglin Jiang, Yong Chen

TL;DR

LaHoRe (LLM-based Hidden Rationale-based Retriever) is a new framework that shifts retrieval from simple keyword matching to complex logical reasoning. By framing retrieval as a generative binary-choice task and optimizing it with Direct Preference Optimization (DPO), the authors demonstrate that LLMs can effectively retrieve documents that are semantically different from a query but logically connected through "hidden rationales."

What Problem Does This Paper Address?

Most Retrieval-Augmented Generation (RAG) systems rely on semantic similarity. If you ask about "Taylor Swift's first album," the retriever looks for documents containing those specific keywords. This works for facts, but fails in scenarios requiring cognitive reasoning.

Consider an Emotional Support Conversation (ESC): a user says, "I'm scared about losing my job." A standard retriever might look for documents about "jobs" or "fear." However, the most helpful "document" might be a high-level strategy like "Reflection of feelings." There is zero keyword overlap here; the connection is a hidden rationale—a logical or empirical link that requires reasoning to uncover. The authors argue that traditional bi-encoders (which embed queries and documents separately) lack the "cross-talk" necessary to solve these reasoning-heavy tasks.

Comparison of fact-based vs. rationale-based retrieval

Methods

The authors propose LaHoRe, which utilizes a cross-encoder architecture where the query ($Q$) and document ($D$) are processed together by the LLM.

  1. Generative Prompting: Instead of outputting a similarity score, the model is prompted to answer a binary-choice question: "Can Q be appropriately responded with D? If you think the answer is true, choose <T>; otherwise choose <F>." The relevance score is then derived from the relative log probabilities of the tokens <T> and <F>.
  2. Efficiency via KV-Caching: Cross-encoders are notoriously slow because they require a full forward pass for every query-document pair. LaHoRe solves this by flipping the standard order to Document -> Query. Because the document comes first, its Key-Value (KV) cache can be pre-computed and stored. During real-time retrieval, the model only needs to process the new query against the cached document representations.
  3. Preference Learning: The model is fine-tuned using Direct Preference Optimization (DPO). While traditional retrievers use contrastive loss, the authors treat retrieval as a preference task, aligning the model to prefer the "True" token for positive pairs and the "False" token for negative ones.
Architectural comparison of LaHoRe vs. other LLM retrievers

Datasets

The researchers evaluated LaHoRe on four datasets focused on dialogue and emotional support:

  • ESconv: A multi-turn emotional support dataset with 8 distinct strategies.
  • PsyQA: A Chinese dataset for mental health support with 7 strategies.
  • ChatIntent & DailyStrategy: Two proprietary datasets involving 98 user intents and 82 assistant strategies.

In these datasets, the "documents" to be retrieved are not long articles, but specific conversational strategies or intents that the model must select based on the dialogue history.

Key Insights and Ideas

  • Generative > Discriminative: Moving from a discriminative similarity score to a generative "choice" task allows the LLM to leverage its full instruction-following and reasoning capabilities.
  • The Power of $I_{bc}$: The "binary-choice" instruction ($I_{bc}$) is a critical performance driver. Ablation studies showed that without this specific prompting structure, zero-shot performance dropped significantly.
  • Caching is the Great Equalizer: By placing the document before the query ($D \Rightarrow Q$), the authors reduced inference latency by over 50% (from ~47ms to ~19ms) without sacrificing accuracy.
  • DPO for Retrieval: The study suggests that DPO—typically used for RLHF in chat models—is a potent alternative to contrastive loss for training retrievers, acting as a "stronger aligner" for hidden rationale tasks.

Key Results

LaHoRe demonstrated clear superiority over both traditional bi-encoders (like BM25 and E5) and other LLM-based retrievers (like GritLM and RepLLaMA).

  • Zero-Shot Performance: On the PsyQA dataset, LaHoRe achieved a Recall@1 of 32.6%, significantly outperforming the next best 7B model, Llama2Vec, at 28.0%.
  • Fine-Tuned Gains: After DPO fine-tuning, LaHoRe's performance skyrocketed. On ChatIntent, it reached a Recall@1 of 77.3%, whereas the best baseline (E5-Mistral) only managed 31.1%.
  • End-to-End Impact: In a human evaluation of a full RAG pipeline, responses generated using LaHoRe's retrieved strategies had a 90% win-rate against a raw LLM without strategy retrieval.

Limitations and Future Work

While the $D \Rightarrow Q$ caching strategy significantly improves speed, cross-encoders still face scaling challenges when the document pool grows into the millions (as every document cache must be loaded for every query). The authors primarily tested on datasets with relatively small document pools (strategies/intents).

Future work could explore how to combine LaHoRe's reasoning power with a first-stage bi-encoder filter to handle massive datasets, or investigate its performance on other reasoning-heavy domains like legal discovery or medical diagnosis.

Summary updated

BibTeX
@inproceedings{ji2025large,
  author = {Luo Ji and Feixiang Guo and Teng Chen and Qingqing Gu and Xiaoyu Wang and Ningyuan Xi and Yihong Wang and Peng Yu and Yue Zhao and Hongyang Lei and Zhonglin Jiang and Yong Chen},
  title = {{Large Language Model Can Be a Foundation for Hidden Rationale-Based Retrieval}},
  booktitle = {ECIR},
  year = {2025},
  doi = {10.1007/978-3-031-88714-7\_27},
}
Figure