PromptPilot: Game-Theoretic Multi-Agent Prompt Optimization for Segment Anything
Abstract
Optimizing prompts for foundation models like SAM represents a challenging high-dimensional black-box optimization problem, fundamentally plagued by the credit assignment ambiguity. To address this, we introduce PromptPilot, a task-agnostic reinforcement learning framework that structurally decomposes the search space into orthogonal semantic and spatial subspaces. Specifically, a centralized manager orchestrates two specialized agents, a feature agent ensuring semantic coherence and a physical agent maximizing spatial coverage, to navigate conflicting optimization objectives. Crucially, our reward mechanism synergizes global segmentation feedback with an efficient approximation of Shapley values, enabling fine-grained attribution of performance gains to individual prompt actions. PromptPilot functions as an inference-time optimization strategy without parameter updates. Extensive experiments demonstrate that our game-theoretic approach significantly improves segmentation performance and generalization, offering a principled solution for automated prompt engineering.