can align the semantic spaces of queries and documents? 3)
How can the retriever’s output be aligned with the preferences
of the Large Language Model?
4.1 Enhancing Semantic Representations
In RAG, the semantic space is essential as it involves the mul-
tidimensional mapping of queries and documents. Retrieval
accuracy in this semantic space significantly impacts RAG
outcomes. This section will present two methods for building
accurate semantic spaces.
Chunk optimization
When managing external documents, the initial step involves
breaking them down into smaller chunks to extract fine-
grained features, which are then embedded to represent their
semantics. However, embedding overly large or excessively
small text chunks may lead to sub-optimal outcomes. There-
fore, identifying the optimal chunk size for documents within
the corpus is crucial to ensuring the accuracy and relevance
of the retrieved results.
RAG forLargeLanguageModels-ASurvey