亲爱的研友该休息了!由于当前在线用户较少,发布求助请尽量完整地填写文献信息,科研通机器人24小时在线,伴您度过漫漫科研夜!身体可是革命的本钱,早点休息,好梦!

We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMs

编码(集合论) 包装设计 R包 心理学 计算机科学 程序设计语言 工程类 制造工程 集合(抽象数据类型)
作者
Joseph Spracklen,Raveen Wijewickrama,A. H. M. Nazmus Sakib,Anindya Maiti,Murtuza Jadliwala
出处
期刊:Cornell University - arXiv [Cornell University]
被引量:2
标识
DOI:10.48550/arxiv.2406.10279
摘要

The reliance of popular programming languages such as Python and JavaScript on centralized package repositories and open-source software, combined with the emergence of code-generating Large Language Models (LLMs), has created a new type of threat to the software supply chain: package hallucinations. These hallucinations, which arise from fact-conflicting errors when generating code using LLMs, represent a novel form of package confusion attack that poses a critical threat to the integrity of the software supply chain. This paper conducts a rigorous and comprehensive evaluation of package hallucinations across different programming languages, settings, and parameters, exploring how a diverse set of models and configurations affect the likelihood of generating erroneous package recommendations and identifying the root causes of this phenomenon. Using 16 popular LLMs for code generation and two unique prompt datasets, we generate 576,000 code samples in two programming languages that we analyze for package hallucinations. Our findings reveal that that the average percentage of hallucinated packages is at least 5.2% for commercial models and 21.7% for open-source models, including a staggering 205,474 unique examples of hallucinated package names, further underscoring the severity and pervasiveness of this threat. To overcome this problem, we implement several hallucination mitigation strategies and show that they are able to significantly reduce the number of package hallucinations while maintaining code quality. Our experiments and findings highlight package hallucinations as a persistent and systemic phenomenon while using state-of-the-art LLMs for code generation, and a significant challenge which deserves the research community's urgent attention.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
共享精神应助拟南芥好壮采纳,获得10
刚刚
ding应助谈谈采纳,获得10
9秒前
糊涂的灯泡应助Benhnhk21采纳,获得10
11秒前
13秒前
着急的靖柔完成签到,获得积分10
14秒前
zhang发布了新的文献求助10
20秒前
华仔应助阮成龍采纳,获得10
21秒前
水晶鞋完成签到 ,获得积分10
25秒前
39秒前
Crystal发布了新的文献求助10
44秒前
认真大门完成签到,获得积分10
48秒前
49秒前
Jellykeke完成签到,获得积分10
52秒前
CipherSage应助kkk采纳,获得10
53秒前
认真大门发布了新的文献求助10
54秒前
56秒前
颂歌998应助谈谈采纳,获得30
58秒前
美好的香薇完成签到,获得积分10
59秒前
Xiu完成签到,获得积分10
1分钟前
lulu发布了新的文献求助10
1分钟前
mmyhn应助科研通管家采纳,获得20
1分钟前
Owen应助科研通管家采纳,获得10
1分钟前
所所应助zhang采纳,获得10
1分钟前
1分钟前
游标卡尺完成签到 ,获得积分10
1分钟前
1分钟前
kkk发布了新的文献求助10
1分钟前
老实十三完成签到,获得积分10
1分钟前
萤火虫完成签到,获得积分10
1分钟前
一只不受管束的小狸Miao完成签到 ,获得积分10
1分钟前
科研通AI6.2应助四壁雪采纳,获得10
1分钟前
Crystal完成签到,获得积分10
1分钟前
大力的美女完成签到,获得积分10
1分钟前
1分钟前
1分钟前
四壁雪发布了新的文献求助10
1分钟前
1分钟前
菜菜完成签到 ,获得积分10
1分钟前
阮成龍发布了新的文献求助10
1分钟前
光合作用完成签到,获得积分10
1分钟前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
化工安全与环保 1000
Autoparametric Resonance in Mechanical Systems 1000
基于锂离子电池正极材料回收的绿色溶剂开发及工程化应用研究 800
Effects of Two Weeks of Red Light Therapy on Choroidal Thickness and Axial Length in Young Adults 700
Cosmos as Art Object: Studies in Plato's Timaeus and Other Dialogues 600
Management and the Arts 510
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 内科学 物理 复合材料 催化作用 细胞生物学 无机化学 光电子学 物理化学 电极 基因
热门帖子
关注 科研通微信公众号,转发送积分 7656517
求助须知:如何正确求助?哪些是违规求助? 9227204
关于积分的说明 19828554
捐赠科研通 7222748
什么是DOI,文献DOI怎么找? 3280318
关于科研通互助平台的介绍 2440508
邀请新用户注册赠送积分活动 2280053