MACRec: A Multi-Agent Collaboration Framework for Recommendation

Zhefan Wang, Yuanqing Yu, Wendi Zheng, Weizhi Ma, Min Zhang

Abstract

MACRec is an open-source framework that leverages a team of specialized LLM-based agents to function as a recommendation system. By partitioning tasks among roles such as Manager, Analyst, and Reflector, the framework improves performance on complex recommendation scenarios like conversational and sequential tasks. This multi-agent approach addresses the limitations of single-agent models by incorporating iterative reflection and tool-augmented reasoning.

Introduction

While Large Language Models (LLMs) have shown great promise in understanding user preferences, current agent-based recommendation research usually falls into two narrow camps: simulation (mimicking user behavior to test other systems) or single-agent recommenders. Single-agent systems often struggle with complex reasoning, external data retrieval, or following strict output formats. MACRec addresses these issues by introducing multi-agent collaboration, mimicking a human workflow where different specialists work together to produce a final recommendation.

Framework Architecture

MACRec defines a modular architecture where specific agents are called based on the task requirements. The system is built around a central orchestrator that manages the flow of information between specialized components.

Overview of the specialized agent roles within the MACRec framework.

The core roles include:

  • Manager: The central orchestrator. It uses a "Thought-Action-Observation" loop to plan which agents to call and how to synthesize their findings.
  • Task Interpreter: Specifically for conversational tasks, this agent summarizes long dialogue histories into concise, executable instructions.
  • User/Item Analyst: These agents have access to internal tools (databases and interaction logs) to perform deep dives into a user’s history or an item’s specific attributes.
  • Searcher: A RAG-style (Retrieval-Augmented Generation) agent that uses external tools (like Wikipedia) to find information not present in the primary dataset.
  • Reflector: Acting as the "quality control" layer, this agent reviews the Manager’s initial output to catch errors and suggests corrections.

Workflow and Reflection

One of the most significant components of MACRec is the Reflector. LLMs are notorious for "hallucinating" or failing to follow complex formatting (such as ranking a specific list of IDs). By having a dedicated agent whose only job is to critique the output, the system significantly improves its reliability.

A detailed example of the multi-agent collaboration process for a sequential recommendation task.

As shown in the example above, the framework handles a sequential recommendation task by coordinating multiple agents. The Reflector identifies if the agent failed to ensure the response contained the correct number of IDs, prompting a correction that leads to a valid output.

Key Insights and Results

MACRec succeeds by combining modular task mapping with tool-augmented reasoning. Rather than relying solely on the LLM's internal weights, MACRec gives agents specific tools (Info DB, Search Engine), allowing the system to stay updated and provide factual, context-aware suggestions.

The framework has been successfully applied to four distinct scenarios: Rating Prediction (RP), Sequential Recommendation (SR), Explanation Generation (EG), and Conversational Recommendation (CR). It is the first open-source framework to support multi-type agents for diverse recommendation scenarios, providing a web-based UI for researchers to visualize the "chain of thought" between agents.

Limitations and Future Work

Despite its effectiveness, MACRec faces challenges regarding latency and cost. Calling multiple LLM agents for a single recommendation is significantly slower and more expensive than traditional methods. Additionally, while effective for high-quality personalized recommendations, scaling this to millions of real-time requests remains an engineering challenge. Future work will involve rigorous quantitative benchmarking against state-of-the-art non-agentic models.

Summary updated

BibTeX
@inproceedings{wang2024macrec,
  author = {Zhefan Wang and Yuanqing Yu and Wendi Zheng and Weizhi Ma and Min Zhang},
  title = {{MACRec: A Multi-Agent Collaboration Framework for Recommendation}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2024},
  doi = {10.1145/3626772.3657669},
}
Figure