CoopetitiveV:利用 LLM 驱动的竞合多智能体提示实现高质量 Verilog 生成
CoopetitiveV: Leveraging LLM-powered Coopetitive Multi-Agent Prompting for High-quality Verilog Generation
AI总结:
本文提出 CoopetitiveV 竞合多智能体提示框架,通过协作与竞争机制缓解单智能体退化并减少错误传播,在 VerilogEval 和 RTLLM 上显著提升 Verilog 生成质量。
摘要:
近年来,智能体化大语言模型(agentic LLMs)在 Verilog 代码生成方面展现出强大能力。然而,现有方法要么采用 LLM 辅助的单智能体提示,要么采用仅合作式的多智能体学习,这会带来以下问题:(i)单智能体学习的退化问题:表现为错误检测与纠正能力下降;(ii)仅合作式多智能体学习中的错误传播:前一个智能体的错误信息会通过提示传播给后一个智能体,导致后续智能体生成有缺陷的代码。本文提出一种基于 LLM 的竞合(coopetitive)多智能体提示框架,其中智能体不仅能够相互协作以构成生成流水线,还建立了健康的竞争机制以提高生成质量。实验结果表明,竞合多智能体框架能够有效缓解退化风险并减少错误传播,同时提升代码纠错能力,从而实现更高质量的 Verilog 代码生成。该方法的有效性通过大量实验得到验证。在 VerilogEval Machine 和 Human 数据集上,CoopetitiveV+GPT-4 分别取得了 99.2% 和 99.1% 的 pass@10 分数;在 RTLLM 上,CoopetitiveV+GPT-4 获得了 100% 的语法 pass@5 分数和 99.9% 的功能 pass@5 分数。
英文摘要:
Recent advances in agentic LLMs have demonstrated great capabilities in Verilog code generation. However, existing approaches either use LLM-assisted single-agent prompting or cooperation-only multi-agent learning, which will lead to: (i) Degeneration issue for single-agent learning: characterized by diminished error detection and correction capabilities; (ii) Error propagation in cooperation-only multi-agent learning: erroneous information from the former agent will be propagated to the latter through prompts, which can make the latter agents generate buggy code. In this paper, we propose an LLM-based coopetitive multi-agent prompting framework, in which the agents cannot collaborate with each other to form the generation pipeline, but also create a healthy competitive mechanism to improve the generating quality. Our experimental results show that the coopetitive multi-agent framework can effectively mitigate the degeneration risk and reduce the error propagation while improving code error correction capabilities, resulting in higher quality Verilog code generation. The effectiveness of our approach is validated through extensive experiments. On VerilogEval Machine and Human dataset, CoopetitiveV+GPT-4 achieves 99.2% and 99.1% pass@10 scores, respectively. While on RTLLM, CoopetitiveV+GPT-4 obtains 100% syntax and 99.9% functionality pass@5 scores.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。