# Read the Docs Before Rewriting: Equip Rewriter with Domain Knowledge via Continual Pre-training

Source: [Read the Docs Before Rewriting: Equip Rewriter with Domain Knowledge via Continual Pre-training](<https://www.sota2.com/research/paper/68fa79cf1e209131cea7f7b4>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2025-11-14T05:00:58.442Z

Authors: Qi Wang, Yixuan Cao, Yifan Liu, Jiangtao Zhao, Ping Luo

Published: 2025-07-01T06:51:00.000Z

## Abstract

A Retrieval-Augmented Generation (RAG)-based question-answering (QA) system enhances a large language model's knowledge by retrieving relevant documents based on user queries. Discrepancies between user queries and document phrasings often necessitate query rewriting. However, in specialized domains, the rewriter model may struggle due to limited domain-specific knowledge. To resolve this, we propose the R\\&R (Read the doc before Rewriting) rewriter, which involves continual pre-training on professional documents, akin to how students prepare for open-book exams by reviewing textbooks. Additionally, it can be combined with supervised fine-tuning for improved results. Experiments on multiple datasets demonstrate that R\\&R excels in professional QA across multiple domains, effectively bridging the query-document gap, while maintaining good performance in general scenarios, thus advancing the application of RAG-based QA systems in specialized fields.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2507.00477>)

[PDF](<https://arxiv.org/pdf/2507.00477.pdf>)
