Abstract
Prompt-based offline methods are commonly used to optimize large language model (LLM) responses, but evaluating these responses is computationally intensive and often fails to accommodate diverse response styles. This study introduces a novel online evaluation framework that employs a multi-agent conversational bandit model to select optimal responses while aligning with user preferences dynamically. To tackle challenges such as high-dimensional features, large response sets, adaptive conversational needs, and multi-device access, we propose MACO, Multi-Agent Conversational Online Learning, which comprises two key components: (1) MACO-A: Executed by local agents, it employs an online elimination mechanism to filter out low-quality responses. (2) MACO-S: Executed by the cloud server, it adaptively adjusts selection strategies based on aggregated preference data. An adaptive preference mechanism triggers asynchronous conversations to enhance alignment efficiency. Theoretical analysis demonstrates that MACO achieves near-optimal regret bounds, matching state-of-the-art performance in various degenerate cases. Extensive experiments utilizing Google and OpenAI text embedding models on the real-world datasets with different response styles, combined with Llama and GPT-4o, show that MACO consistently outperforms baseline methods by at least 8.29% across varying response set sizes and numbers of agents.
Introduction
Optimizing large language model (LLM) responses typically relies on "offline" evaluation—generating a massive pool of responses and scoring them individually using another LLM or a set of metrics. This approach is computationally ruinous and fails to capture personal nuances, such as a user's preference for a specific coding style or tone. While "online" evaluation (learning from live user feedback) is more efficient, it faces significant hurdles: high-dimensional response embeddings, large candidate sets (arms), multi-device data fragmentation, and high communication costs.
Methodology: The MACO Framework
We propose MACO (Multi-Agent Conversational Online Learning), a distributed system designed to move LLM response evaluation to a dynamic, user-aligned online process. The architecture is split into two main components:
- MACO-A (Agent-side): Executed locally on the user's device, it uses an online elimination mechanism to quickly discard low-quality responses. It identifies "under-explored" directions in the feature space and uploads these aggregated directions to the server, rather than raw user data, thus preserving privacy.
- MACO-S (Server-side): Executed in the cloud, it aggregates data from all agents. Instead of random exploration, it selects "key terms" (e.g., "Pythonic," "Formal") to query the user. This conversational element allows the system to bridge knowledge gaps significantly faster than traditional trial-and-error.
A core innovation is the Adaptive Conversational Trigger. Unlike prior models that interact with users on a fixed schedule, MACO initiates a conversation only when the uncertainty (mathematically, the eigenvalue of the information matrix) in a specific direction crosses a threshold. This ensures the system only requests user feedback when it is most beneficial for improving predictions.
Experimental Evaluation and Results
The framework was evaluated using robust benchmarks, including StyleEval and Gretel Multilingual, with response sets generated by Llama-3-8B-Instruct. Evaluation utilized both Google and OpenAI text embedding models to ensure architecture independence.
MACO consistently outperformed seven state-of-the-art baselines, including ConUCB and LinUCB, by at least 8.29% across various response set sizes. Key findings include:
- Sublinear Scaling: Regret scales sublinearly with the number of agents, demonstrating effective collaborative learning across devices.
- Computational Efficiency: MACO achieved a 4x to 7x speedup over traditional G-optimal design methods, making it viable for real-time applications.
- Communication Efficiency: Communication costs scale at $O(\log T)$, remaining low even over extended periods.
Conclusion and Future Work
MACO provides a scalable, efficient framework for aligning LLM responses with individual user preferences in real-time. While the current model assumes a linear reward function, future work will explore non-linear preference modeling and user clustering to provide even more tailored experiences.
Summary updated