In-context Ranking Preference Optimization