Quote

The core of RAG is a general-purpose fine-tuning approach where both the retriever and the generator are trained jointly and end-to-end on downstream NLP tasks. This means that theparameters of the retriever (specifically the query encoder) and the generator are adjusted based on the task-specific data

Extracted from: rag-reigns-supreme-why-retrieval.md