Lighter And Better: Towards Flexible Context Adaptation For Retrieval Augmented Generation