arXiv:2412.11014cs.LGcs.AI2024-12被引 12

用竞争协作机制提升Verilog代码生成质量,避免错误传播。

CoopetitiveV: Leveraging LLM-powered Coopetitive Multi-Agent Prompting for High-quality Verilog Generation

  • 引入竞争协作多智能体框架,避免单智能体退化和多智能体错误传播。
  • 在多个数据集上达到99%以上通过率,最高达100%语法正确率。
  • 适合需要高可靠硬件设计的工程师或自动化工具开发者。

近期基于智能体的大型语言模型在Verilog代码生成方面展现出强大能力。然而,现有方法要么采用单一智能体提示,导致错误检测与修正能力下降;要么仅依赖多智能体协作,使前序错误通过提示传递给后续智能体,引发代码缺陷。本文提出一种基于大模型的竞争协作多智能体提示框架,各智能体既不直接协作形成生成流水线,又通过健康竞争机制提升生成质量。实验表明,该框架有效缓解了退化风险,减少错误传播,并增强代码纠错能力。在VerilogEval Machine和Human数据集上,CoopetitiveV+GPT-4分别取得99.2%和99.1%的pass@10得分;在RTLLM数据集上,语法通过率达100%,功能通过率为99.9%(pass@5)。

原文摘要 · Abstract (English)

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.

Verilog生成多智能体竞争协作代码质量

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。