Retrieval augmented generation (RAG) enhances the accuracy and reliability of generative AI models by sourcing factual information from external databases, which is extensively employed in document-grounded question-answering (QA) tasks. Off-the-shelf RAG flows are well pretrained on general-purpose documents, yet they encounter significant challenges when being applied to knowledge-intensive vertical domains, such as electronic design automation (EDA). This paper addresses such issue by proposing a customized RAG framework along with three domain-specific techniques for EDA tool documentation QA, including a contrastive learning scheme for text embedding model fine-tuning, a reranker distilled from proprietary LLM, and a generative LLM fine-tuned with high-quality domain corpus. Furthermore, we have developed and released a documentation QA evaluation benchmark, ORD-QA, for OpenROAD, an advanced RTL-to-GDSII design platform. Experimental results demonstrate that our proposed RAG flow and techniques have achieved superior performance on ORD-QA as well as on a commercial tool, compared with state-of-the-arts. The ORD-QA benchmark and the training dataset for our customized RAG flow are open-source at https://github.com/lesliepy99/RAG-EDA.
翻译:检索增强生成(RAG)通过从外部数据库获取事实信息,提升了生成式AI模型的准确性和可靠性,被广泛应用于基于文档的问答(QA)任务中。现成的通用RAG流程在通用文档上进行了良好的预训练,但在应用于知识密集型垂直领域(如电子设计自动化EDA)时,仍面临显著挑战。本文针对该问题,提出了一种面向EDA工具文档问答的定制化RAG框架及三项领域专用技术,包括用于文本嵌入模型微调的对比学习方案、从专有大语言模型蒸馏得到的重排序器,以及使用高质量领域语料微调的生成式大语言模型。此外,我们为先进的RTL-to-GDSII设计平台OpenROAD开发并发布了一个文档问答评估基准——ORD-QA。实验结果表明,与现有先进技术相比,我们提出的RAG流程及技术在ORD-QA以及一个商业工具上均取得了更优的性能。ORD-QA基准及我们定制化RAG流程的训练数据集已在 https://github.com/lesliepy99/RAG-EDA 开源。