# Enhancing Online Learning Through Multi-Agent Debates for CS University Students
## 3 Materials and Methods
### Design of Evaluation System
#### 3.1.2 Multi-Agent Debate-Assisted Learning Function  
Using large language models as agents to assist users in completing various tasks is increasingly becoming a trend. In particular, multi-agent collaboration can address the limitations of a single model, resulting in improved accuracy and robustness. The study titled Multi-Agent Debate (MAD) [74], demonstrates that reflection-based methods are prone to the Degeneration-of-Thought (DoT) problem. Once a large language model becomes confident in its initial solution, it struggles to generate new ideas through further reflection, even if the initial stance is incorrect. Multi-Agent Debate, inspired by another fundamental strategy of human-like problem solving, employs two agents to express their own arguments in a \"tit-for-tat\" state. A judge then monitors and manages the debate process to generate a final answer. The core idea of MAD is outlined as follows: (1) Through debate, the distorted thinking of one agent can be corrected by the others. (2) Through debate, the resistance of one party can be counterbalanced by the support of other members participating in the debate. (3) The answers of each agent can serve as context for mutual feedback. Therefore, MAD is less vulnerable to the occurrence of the DoT problem and can explore divergent CoTsto reduce hallucinations. As shown in Table 2, for questions that require a more comprehensive understanding through multiple perspectives and dialectical discussion, the debate function is clearly more suitable than the chat function. Multi-agent debate can be applied not only to STEM (Science, Technology, Engineering, and Mathematics) education but also to humanities and history studies. We followed the idea from the work on divergent thinking based on MAD, employing three LLM-based agents to conduct multi-round debates. We utilized three roles, which are elaborated as follows: moderator, affirmative debater, and negative debater (Table 3). Based on the given topics, both sides present their arguments and provide supporting reasons. After each round, the moderator evaluates the responses and determines the winning side. After three rounds of debate, the moderator provides a final summary evaluation, along with the corresponding rationale. The specific details of the debate result in Figure 5 can be found in Table 2, which presents an example of a specific debating process. Through the debate, the reasons for the arguments can be presented, which can inspire students' dialectical thinking. The answers to the QA rely on the LLM and RAG technologies and are provided based on the speech information extracted from the video, the OCR information, and the object detection results of the objects in the images. Text generation in the debate is completely accomplished based on the knowledge inherent in the pre-trained large language model we use. Regarding the implementation of multi-agents, we referred to the open-source project available at [[https://github.com/Skytiliang/Multi-Agents-Debate](https://github.com/Skytiliang/Multi-Agents-Debate)]([https://github.com/Skytiliang/Multi-Agents-Debate](https://github.com/Skytiliang/Multi-Agents-Debate)), accessed on 6 August 2024. Specifically, we used the free online \"Qwen2.5-72B-Instruct-Turbo\" LLM API provided by Together.ai. Each agent is an instance of a large language model, and different responsibilities are assigned through different role prompts. Each agent has its own memory. The output is stored in the memory as the content of historical conversations, and its own memory is referred to when generating new responses. The moderator controls the advancement of the rounds, and its output is broadcast to everyone, indirectly affecting the next-round input of other agents. We preset the meta prompt (role setting) used by each role, the dynamic prompt template required for the moderator's judging, and the alternative judgment prompt in case of an inability to make a ruling. We also provide the detailed step-by-step procedure of MAD in Algorithm 1.