RecCoT: Enhancing Recommendation via Chain-of-Thought

Shuo Yang, Jiangxia Cao, Haipeng Li, Yuqi Mao, Shuchao PangarXiv 2025 · DOI · arXiv

Abstract

RecCoT is a novel "Slow-Fast" framework designed to incorporate the reasoning power of Large Language Models (LLMs) into recommendation systems. By generating human-readable Chain-of-Thought (CoT) explanations for user reviews and distilling that reasoning into efficient embeddings, RecCoT achieves state-of-the-art accuracy while maintaining production-level inference speeds. The framework utilizes Group Relative Policy Optimization (GRPO) with a frequency-aware reward policy to mitigate rating bias and improve performance on long-tail data.

Introduction

Modern recommendation systems (RecSys) excel at identifying patterns in historical user-item interactions, typically through Collaborative Filtering. However, they often fail to capture the underlying "why" behind a user's preference. While user reviews provide rich semantic context, integrating them into real-time systems presents significant challenges. Traditional models often treat reviews as "black boxes," compressing them into uninterpretable latent vectors. Furthermore, the computational cost of deploying billion-parameter LLMs for every recommendation request is prohibitive for production environments. Finally, most recommendation datasets suffer from extreme rating imbalance, where a majority of interactions are positive (e.g., 5-star ratings), leading models to "cheat" by over-predicting the majority class—a phenomenon known as reward hacking.

The RecCoT Framework

To address these challenges, we propose RecCoT, a decoupled architecture that balances deep semantic reasoning with high-speed inference. The framework is divided into three distinct phases: reasoning generation, embedding alignment, and downstream recommendation.

The tripartite architecture of RecCoT: (a) Slow CoT generation, (b) Fast semantic alignment, and (c) Downstream recommendation.

1. Slow Stage: Interpretable CoT Generation

In the "Slow" stage, a large LLM (such as Qwen-2.5) is employed to generate a reasoning trace, or Chain-of-Thought (CoT), for each user review. This process transforms raw text into a structured rationale that explains the user's sentiment and rating.

To ensure the model does not succumb to the majority-class bias, we implement Group Relative Policy Optimization (GRPO). This reinforcement learning approach uses a Frequency-aware Reward Policy that dynamically scales rewards based on the rarity of a rating. By penalizing the model more heavily for misclassifying rare negative feedback compared to common positive feedback, we force the model to develop a more nuanced understanding of the text.

The Group Relative Policy Optimization (GRPO) workflow, featuring a trainable policy model and a frozen reference model to ensure stable reasoning generation.

2. Fast Stage: Semantic Embedding Alignment

To bridge the gap between heavy LLM reasoning and real-time performance, the generated CoT reasoning is distilled into a smaller, more efficient model. We concatenate the original review text with the LLM-generated CoT and feed it into a BERT-base model. This model is fine-tuned to "compress" the complex reasoning into a 768-dimensional semantic vector.

Crucially, these embeddings are stored in a CoT Token Cache. This decoupling ensures that the expensive LLM reasoning only occurs once per review. During the actual recommendation phase, the system simply retrieves the pre-computed embeddings, drastically reducing latency.

3. Execution: Downstream Recommendation

The final recommendation engine utilizes these cached embeddings through a Cross-Attention mechanism. This allows the model to weigh historical user reviews against specific item characteristics dynamically. To further enhance discriminative power, a Contrastive Learning module is integrated, ensuring the model can clearly distinguish between positive and negative user-item pairs in the latent space.

Experimental Evaluation

RecCoT was evaluated on seven diverse categories from the Amazon Item Review Dataset, including Amazon Fashion, Baby Products, and Software. To ensure data quality, the datasets were filtered to include only users and items with at least five interactions.

Key Results

  • State-of-the-Art Accuracy: RecCoT consistently outperformed established baselines. For instance, on the Amazon Fashion dataset, it achieved a Mean Squared Error (MSE) of 0.570, representing a 16.2% improvement over the LLM-based LoID model.
  • Efficiency via Caching: Ablation studies confirmed the value of the caching mechanism. Adding the cache to existing models like LoID reduced MSE on the Video Games dataset from 1.180 to 0.949.
  • Zero-Shot Generalization: The model demonstrated remarkable transferability. A RecCoT model trained on "CDs and Vinyl" could be applied to "Industrial and Scientific" products with minimal performance loss, suggesting it learns universal reasoning patterns rather than category-specific shortcuts.

Discussion and Limitations

A key insight from our study is that the process of generating a rationale (CoT) serves as a powerful feature engineering step, improving the quality of the resulting semantic embeddings. We also observed a "sweet spot" for review length; excessively long reviews (over 512 characters) often introduce noise that can degrade performance, suggesting that concise, reasoned summaries are more effective than raw text.

Despite its success, RecCoT faces challenges with highly technical jargon. For example, in musical instrument reviews, the model occasionally struggled with specific technical specifications (e.g., drum head plies), misinterpreting technical praise as neutral sentiment. Future work will focus on more advanced reinforcement learning policies to better handle domain-specific language and subtle linguistic nuances like sarcasm.

Conclusion

RecCoT demonstrates that the reasoning capabilities of LLMs can be effectively harnessed for recommendation systems without sacrificing inference speed. By decoupling reasoning from recommendation and employing frequency-aware optimization, we provide a path toward more interpretable, accurate, and efficient personalized systems.

Summary updated

Abstract

In real-world applications, users always interact with items in multiple aspects, such as through implicit binary feedback (e.g., clicks, dislikes, long views) and explicit feedback (e.g., comments, reviews). Modern recommendation systems (RecSys) learn user-item collaborative signals from these implicit feedback signals as a large-scale binary data-streaming, subsequently recommending other highly similar items based on users' personalized historical interactions. However, from this collaborative-connection perspective, the RecSys does not focus on the actual content of the items themselves but instead prioritizes higher-probability signals of behavioral co-occurrence among items. Consequently, under this binary learning paradigm, the RecSys struggles to understand why a user likes or dislikes certain items. To alleviate it, some works attempt to utilize the content-based reviews to capture the semantic knowledge to enhance recommender models. However, most of these methods focus on predicting the ratings of reviews, but do not provide a human-understandable explanation.
BibTeX
@misc{yang2025reccot,
  author = {Shuo Yang and Jiangxia Cao and Haipeng Li and Yuqi Mao and Shuchao Pang},
  title = {{RecCoT: Enhancing Recommendation via Chain-of-Thought}},
  year = {2025},
  eprint = {2506.21032},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.21032},
}
Figure