QPO: Query-dependent Prompt Optimization via Multi-Loop Offline Reinforcement Learning | Synapse