Mathematical reasoning is a crucial capability of large language models (LLMs). Retrieval-augmented generation (RAG) can assist LLMs in extracting contextual information to enhance their mathematical reasoning skills. However, employing RAG in mathematical tasks is non-trivial, since noisy context and misleading irrelevant examples brought by RAG may negatively impact math performance. In this work, we propose a RAG-targeted Supervised Fine-Tuning (SFT) method that enhances LLMs’ ability to adapt to the RAG reasoning strategies, outperforming standard SFT in downstream mathematical reasoning tasks. Additionally, we observed that the math questions addressed by zero-shot and RAG reasoning strategies vary, prompting us to propose the RAG Inference Trigger that leverages reward models to combine both strengths and decrease inference cost. Experimental results demonstrate that our simple method achieves impressive improvement (10.6% on MATH adopted with LLaMA3.1-8B-Instruct), with reduced RAG-related inference cost.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

RAG-Targeted SFT Improves RAG-Enhanced Math Reasoning

  • Haiye Lin,
  • Ruobing Xie,
  • Hao Zhang,
  • Wenjie Liang,
  • Jin Xu,
  • Ding Zhang,
  • Jiale Wang,
  • Hai-Tao Zheng,
  • Yanfeng Chen,
  • Saiyong Yang,
  • Xingwu Sun,
  • Zhanhui Kang

摘要

Mathematical reasoning is a crucial capability of large language models (LLMs). Retrieval-augmented generation (RAG) can assist LLMs in extracting contextual information to enhance their mathematical reasoning skills. However, employing RAG in mathematical tasks is non-trivial, since noisy context and misleading irrelevant examples brought by RAG may negatively impact math performance. In this work, we propose a RAG-targeted Supervised Fine-Tuning (SFT) method that enhances LLMs’ ability to adapt to the RAG reasoning strategies, outperforming standard SFT in downstream mathematical reasoning tasks. Additionally, we observed that the math questions addressed by zero-shot and RAG reasoning strategies vary, prompting us to propose the RAG Inference Trigger that leverages reward models to combine both strengths and decrease inference cost. Experimental results demonstrate that our simple method achieves impressive improvement (10.6% on MATH adopted with LLaMA3.1-8B-Instruct), with reduced RAG-related inference cost.