Learning to Retrieve, Generate, and Compress: A Unified View of Efficient RAG | Synapse