In the RAG application, some retrievers use the same embed-
ding model to encode the query and doc, while others use two
models to separately encode the query and doc. Moreover, the
original query of the user may have problems of poor expres-
sion and lack of semantic information. Therefore, aligning
the semantic space of the user’s query and documents is very
necessary. This section introduces two key technologies to
achieve this goal.
Query Rewrite
semantics of
The most
query and document
As
mentioned in Query2Doc[Wang et al., 2023b] and ITER-
RETGEN[Shao et al., 2023],
the inherent capabilities of
large language models are utilized to generate a pseudo-
document by guiding it, and then the original query is
merged with this pseudo-document to form a new query.
In HyDE[Gao et al., 2022], query vectors are established
through the use of text indicators, using these indicators to
generate a ’hypothetical’ document that is relevant, yet may
Retrieval-AugmentedGenerationforLargeLanguageModels-ASurvey