{"id":"https://openalex.org/W4408868317","doi":"https://doi.org/10.1145/3725812","title":"Prompt-Based Code Completion via Multi-Retrieval Augmented Generation","display_name":"Prompt-Based Code Completion via Multi-Retrieval Augmented Generation","publication_year":2025,"publication_date":"2025-03-26","ids":{"openalex":"https://openalex.org/W4408868317","doi":"https://doi.org/10.1145/3725812"},"language":"en","primary_location":{"id":"doi:10.1145/3725812","is_oa":true,"landing_page_url":"https://doi.org/10.1145/3725812","pdf_url":null,"source":{"id":"https://openalex.org/S142627899","display_name":"ACM Transactions on Software Engineering and Methodology","issn_l":"1049-331X","issn":["1049-331X","1557-7392"],"is_oa":false,"is_in_doaj":false,"is_core":true,"host_organization":"https://openalex.org/P4310319798","host_organization_name":"Association for Computing Machinery","host_organization_lineage":["https://openalex.org/P4310319798"],"host_organization_lineage_names":["Association for Computing Machinery"],"type":"journal"},"license":"cc-by","license_id":"https://openalex.org/licenses/cc-by","version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"ACM Transactions on Software Engineering and Methodology","raw_type":"journal-article"},"type":"article","indexed_in":["crossref"],"open_access":{"is_oa":true,"oa_status":"hybrid","oa_url":"https://doi.org/10.1145/3725812","any_repository_has_fulltext":false},"authorships":[{"author_position":"first","author":{"id":"https://openalex.org/A5059294724","display_name":"Hanzhuo Tan","orcid":"https://orcid.org/0000-0001-5392-5435"},"institutions":[{"id":"https://openalex.org/I14243506","display_name":"Hong Kong Polytechnic University","ror":"https://ror.org/0030zas98","country_code":"HK","type":"education","lineage":["https://openalex.org/I14243506"]},{"id":"https://openalex.org/I3045169105","display_name":"Southern University of Science and Technology","ror":"https://ror.org/049tv2d57","country_code":"CN","type":"education","lineage":["https://openalex.org/I3045169105"]}],"countries":["CN","HK"],"is_corresponding":true,"raw_author_name":"Hanzhuo Tan","raw_affiliation_strings":["Computer Science and Engineering, Southern University of Science and Technology, Shenzhen, China and Computing, Hong Kong Polytechnic University, Hong Kong, China","Research Institute of Trustworthy Autonomous Systems, Southern University of Science and Technology, China"],"affiliations":[{"raw_affiliation_string":"Computer Science and Engineering, Southern University of Science and Technology, Shenzhen, China and Computing, Hong Kong Polytechnic University, Hong Kong, China","institution_ids":["https://openalex.org/I14243506"]},{"raw_affiliation_string":"Research Institute of Trustworthy Autonomous Systems, Southern University of Science and Technology, China","institution_ids":["https://openalex.org/I3045169105"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5100579386","display_name":"Qi Luo","orcid":"https://orcid.org/0009-0003-0931-8314"},"institutions":[{"id":"https://openalex.org/I3045169105","display_name":"Southern University of Science and Technology","ror":"https://ror.org/049tv2d57","country_code":"CN","type":"education","lineage":["https://openalex.org/I3045169105"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Qi Luo","raw_affiliation_strings":["Department of Computer Science and Engineering, Southern University of\u00a0Science and Technology, Shenzhen, China","Department of Computer Science and Engineering, Southern University of Science and Technology, China"],"affiliations":[{"raw_affiliation_string":"Department of Computer Science and Engineering, Southern University of\u00a0Science and Technology, Shenzhen, China","institution_ids":["https://openalex.org/I3045169105"]},{"raw_affiliation_string":"Department of Computer Science and Engineering, Southern University of Science and Technology, China","institution_ids":["https://openalex.org/I3045169105"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5102894249","display_name":"Ling Jiang","orcid":"https://orcid.org/0009-0006-3134-1811"},"institutions":[{"id":"https://openalex.org/I3045169105","display_name":"Southern University of Science and Technology","ror":"https://ror.org/049tv2d57","country_code":"CN","type":"education","lineage":["https://openalex.org/I3045169105"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Ling Jiang","raw_affiliation_strings":["Department of Computer Science and Engineering, Southern University of\u00a0Science and Technology, Shenzhen, China","Department of Computer Science and Engineering, Southern University of Science and Technology, China"],"affiliations":[{"raw_affiliation_string":"Department of Computer Science and Engineering, Southern University of\u00a0Science and Technology, Shenzhen, China","institution_ids":["https://openalex.org/I3045169105"]},{"raw_affiliation_string":"Department of Computer Science and Engineering, Southern University of Science and Technology, China","institution_ids":["https://openalex.org/I3045169105"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5101353845","display_name":"Zizheng Zhan","orcid":null},"institutions":[{"id":"https://openalex.org/I4401726859","display_name":"Kuaishou (China)","ror":"https://ror.org/0258as409","country_code":null,"type":"company","lineage":["https://openalex.org/I4401726859"]},{"id":"https://openalex.org/I4210161752","display_name":"Beijing Haidian Hospital","ror":"https://ror.org/058x5eq06","country_code":"CN","type":"healthcare","lineage":["https://openalex.org/I4210161752"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Zizheng Zhan","raw_affiliation_strings":["Beijing Kuaishou Technology Co Ltd, Haidian, China","Kuaishou Technology, China"],"affiliations":[{"raw_affiliation_string":"Beijing Kuaishou Technology Co Ltd, Haidian, China","institution_ids":["https://openalex.org/I4210161752"]},{"raw_affiliation_string":"Kuaishou Technology, China","institution_ids":["https://openalex.org/I4401726859"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5100336998","display_name":"Jing Li","orcid":"https://orcid.org/0000-0002-8044-2284"},"institutions":[{"id":"https://openalex.org/I14243506","display_name":"Hong Kong Polytechnic University","ror":"https://ror.org/0030zas98","country_code":"HK","type":"education","lineage":["https://openalex.org/I14243506"]}],"countries":["HK"],"is_corresponding":false,"raw_author_name":"Jing Li","raw_affiliation_strings":["Department of Computing and the Research Centre on Data Science and Artificial Intelligence (RC-DSAI), The Hong Kong Polytechnic University, Hong Kong, China","Department of Computing and the Research Centre on Data Science and Artificial Intelligence (RCDSAI), the Hong Kong Polytechnic University, China"],"affiliations":[{"raw_affiliation_string":"Department of Computing and the Research Centre on Data Science and Artificial Intelligence (RC-DSAI), The Hong Kong Polytechnic University, Hong Kong, China","institution_ids":["https://openalex.org/I14243506"]},{"raw_affiliation_string":"Department of Computing and the Research Centre on Data Science and Artificial Intelligence (RCDSAI), the Hong Kong Polytechnic University, China","institution_ids":["https://openalex.org/I14243506"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5115594786","display_name":"Haotian Zhang","orcid":"https://orcid.org/0009-0008-1415-6221"},"institutions":[{"id":"https://openalex.org/I4401726859","display_name":"Kuaishou (China)","ror":"https://ror.org/0258as409","country_code":null,"type":"company","lineage":["https://openalex.org/I4401726859"]},{"id":"https://openalex.org/I4210161752","display_name":"Beijing Haidian Hospital","ror":"https://ror.org/058x5eq06","country_code":"CN","type":"healthcare","lineage":["https://openalex.org/I4210161752"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Haotian Zhang","raw_affiliation_strings":["Beijing Kuaishou Technology Co Ltd, Haidian, China","Kuaishou Technology, China"],"affiliations":[{"raw_affiliation_string":"Beijing Kuaishou Technology Co Ltd, Haidian, China","institution_ids":["https://openalex.org/I4210161752"]},{"raw_affiliation_string":"Kuaishou Technology, China","institution_ids":["https://openalex.org/I4401726859"]}]},{"author_position":"last","author":{"id":"https://openalex.org/A5030322956","display_name":"Yuqun Zhang","orcid":"https://orcid.org/0000-0002-1499-5729"},"institutions":[{"id":"https://openalex.org/I3045169105","display_name":"Southern University of Science and Technology","ror":"https://ror.org/049tv2d57","country_code":"CN","type":"education","lineage":["https://openalex.org/I3045169105"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Yuqun Zhang","raw_affiliation_strings":["Computer Science and Engineering, Southern University of Science and Technology, Shenzhen, China","Research Institute of Trustworthy Autonomous Systems, Southern University of Science and Technology, China"],"affiliations":[{"raw_affiliation_string":"Computer Science and Engineering, Southern University of Science and Technology, Shenzhen, China","institution_ids":["https://openalex.org/I3045169105"]},{"raw_affiliation_string":"Research Institute of Trustworthy Autonomous Systems, Southern University of Science and Technology, China","institution_ids":["https://openalex.org/I3045169105"]}]}],"institutions":[],"countries_distinct_count":2,"institutions_distinct_count":7,"corresponding_author_ids":["https://openalex.org/A5059294724"],"corresponding_institution_ids":["https://openalex.org/I14243506","https://openalex.org/I3045169105"],"apc_list":null,"apc_paid":null,"fwci":17.479,"has_fulltext":false,"cited_by_count":5,"citation_normalized_percentile":{"value":0.98784022,"is_in_top_1_percent":false,"is_in_top_10_percent":true},"cited_by_percentile_year":{"min":97,"max":98},"biblio":{"volume":"35","issue":"1","first_page":"1","last_page":"28"},"is_retracted":false,"is_paratext":false,"is_xpac":false,"primary_topic":{"id":"https://openalex.org/T10260","display_name":"Software Engineering Research","score":0.9980000257492065,"subfield":{"id":"https://openalex.org/subfields/1710","display_name":"Information Systems"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}},"topics":[{"id":"https://openalex.org/T10260","display_name":"Software Engineering Research","score":0.9980000257492065,"subfield":{"id":"https://openalex.org/subfields/1710","display_name":"Information Systems"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}},{"id":"https://openalex.org/T10181","display_name":"Natural Language Processing Techniques","score":0.9972000122070312,"subfield":{"id":"https://openalex.org/subfields/1702","display_name":"Artificial Intelligence"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}},{"id":"https://openalex.org/T10743","display_name":"Software Testing and Debugging Techniques","score":0.9922999739646912,"subfield":{"id":"https://openalex.org/subfields/1712","display_name":"Software"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}}],"keywords":[{"id":"https://openalex.org/keywords/computer-science","display_name":"Computer science","score":0.8431301116943359},{"id":"https://openalex.org/keywords/code","display_name":"Code (set theory)","score":0.4571513831615448},{"id":"https://openalex.org/keywords/information-retrieval","display_name":"Information retrieval","score":0.3489544689655304},{"id":"https://openalex.org/keywords/programming-language","display_name":"Programming language","score":0.31118887662887573},{"id":"https://openalex.org/keywords/set","display_name":"Set (abstract data type)","score":0.07042938470840454}],"concepts":[{"id":"https://openalex.org/C41008148","wikidata":"https://www.wikidata.org/wiki/Q21198","display_name":"Computer science","level":0,"score":0.8431301116943359},{"id":"https://openalex.org/C2776760102","wikidata":"https://www.wikidata.org/wiki/Q5139990","display_name":"Code (set theory)","level":3,"score":0.4571513831615448},{"id":"https://openalex.org/C23123220","wikidata":"https://www.wikidata.org/wiki/Q816826","display_name":"Information retrieval","level":1,"score":0.3489544689655304},{"id":"https://openalex.org/C199360897","wikidata":"https://www.wikidata.org/wiki/Q9143","display_name":"Programming language","level":1,"score":0.31118887662887573},{"id":"https://openalex.org/C177264268","wikidata":"https://www.wikidata.org/wiki/Q1514741","display_name":"Set (abstract data type)","level":2,"score":0.07042938470840454}],"mesh":[],"locations_count":1,"locations":[{"id":"doi:10.1145/3725812","is_oa":true,"landing_page_url":"https://doi.org/10.1145/3725812","pdf_url":null,"source":{"id":"https://openalex.org/S142627899","display_name":"ACM Transactions on Software Engineering and Methodology","issn_l":"1049-331X","issn":["1049-331X","1557-7392"],"is_oa":false,"is_in_doaj":false,"is_core":true,"host_organization":"https://openalex.org/P4310319798","host_organization_name":"Association for Computing Machinery","host_organization_lineage":["https://openalex.org/P4310319798"],"host_organization_lineage_names":["Association for Computing Machinery"],"type":"journal"},"license":"cc-by","license_id":"https://openalex.org/licenses/cc-by","version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"ACM Transactions on Software Engineering and Methodology","raw_type":"journal-article"}],"best_oa_location":{"id":"doi:10.1145/3725812","is_oa":true,"landing_page_url":"https://doi.org/10.1145/3725812","pdf_url":null,"source":{"id":"https://openalex.org/S142627899","display_name":"ACM Transactions on Software Engineering and Methodology","issn_l":"1049-331X","issn":["1049-331X","1557-7392"],"is_oa":false,"is_in_doaj":false,"is_core":true,"host_organization":"https://openalex.org/P4310319798","host_organization_name":"Association for Computing Machinery","host_organization_lineage":["https://openalex.org/P4310319798"],"host_organization_lineage_names":["Association for Computing Machinery"],"type":"journal"},"license":"cc-by","license_id":"https://openalex.org/licenses/cc-by","version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"ACM Transactions on Software Engineering and Methodology","raw_type":"journal-article"},"sustainable_development_goals":[],"awards":[],"funders":[],"has_content":{"pdf":false,"grobid_xml":false},"content_urls":null,"referenced_works_count":23,"referenced_works":["https://openalex.org/W1498436455","https://openalex.org/W2097335450","https://openalex.org/W2143861926","https://openalex.org/W2153943889","https://openalex.org/W2899575547","https://openalex.org/W2979486033","https://openalex.org/W2979826702","https://openalex.org/W3027879771","https://openalex.org/W3215436034","https://openalex.org/W4240458412","https://openalex.org/W4245743185","https://openalex.org/W4252076394","https://openalex.org/W4285490465","https://openalex.org/W4387321091","https://openalex.org/W4387421660","https://openalex.org/W4387835442","https://openalex.org/W4389159031","https://openalex.org/W4393927401","https://openalex.org/W4394745954","https://openalex.org/W4399759108","https://openalex.org/W4403536437","https://openalex.org/W4406866655","https://openalex.org/W6727233892"],"related_works":["https://openalex.org/W4391375266","https://openalex.org/W2899084033","https://openalex.org/W2748952813","https://openalex.org/W2390279801","https://openalex.org/W4391913857","https://openalex.org/W2358668433","https://openalex.org/W4396701345","https://openalex.org/W2376932109","https://openalex.org/W2001405890","https://openalex.org/W4396696052"],"abstract_inverted_index":{"Automated":[0],"code":[1,37,58,73,99,109,148,164,193],"completion,":[2],"aiming":[3],"at":[4],"generating":[5],"subsequent":[6],"tokens":[7],"from":[8,14,28,222],"unfinished":[9],"code,":[10],"has":[11],"significantly":[12],"benefited":[13],"recent":[15],"progress":[16],"in":[17,98,205,225,236],"pre-trained":[18],"Large":[19],"Language":[20],"Models":[21],"(LLMs).":[22],"However,":[23,75],"these":[24,53],"models":[25],"often":[26],"suffer":[27],"coherence":[29],"issues":[30,54],"and":[31,95,115,124,214],"hallucinations":[32],"when":[33],"dealing":[34],"with":[35,59,150],"complex":[36],"logic":[38],"or":[39],"extrapolating":[40],"beyond":[41],"their":[42,76],"training":[43],"data.":[44],"Existing":[45],"Retrieval":[46],"Augmented":[47],"Generation":[48],"(RAG)":[49],"techniques":[50,235],"partially":[51],"address":[52,102],"by":[55,86,197],"retrieving":[56],"relevant":[57],"a":[60,82,108,134,190,237],"separate":[61],"encoding":[62,88],"model":[63],"where":[64],"the":[65,87,93,116,157,167,172,178,182,200,217,246],"retrieved":[66],"snippet":[67],"serves":[68],"as":[69],"contextual":[70,117],"reference":[71],"for":[72,177],"completion.":[74],"retrieval":[77,152,159,175],"scope":[78],"is":[79],"subject":[80],"to":[81,121,126,142,146,162,170,180],"singular":[83],"perspective":[84,176],"defined":[85],"model,":[89],"which":[90,138],"largely":[91],"overlooks":[92],"complexity":[94],"diversity":[96],"inherent":[97],"semantics.":[100],"To":[101],"this":[103],"limitation,":[104],"we":[105],"propose":[106],"ProCC,":[107],"completion":[110,194],"framework":[111],"leveraging":[112],"prompt":[113,140],"engineering":[114],"multi-armed":[118],"bandits":[119],"algorithm":[120,161],"flexibly":[122],"incorporate":[123,163],"adapt":[125],"multiple":[127,151],"perspectives":[128],"of":[129,227],"code.":[130,183],"ProCC":[131,188,230],"first":[132],"employs":[133],"prompt-based":[135],"multi-retriever":[136],"system":[137],"crafts":[139],"templates":[141],"elicit":[143],"LLM":[144,179],"knowledge":[145],"understand":[147],"semantics":[149],"perspectives.":[153],"Then,":[154],"it":[155],"adopts":[156],"adaptive":[158],"selection":[160],"similarity":[165],"into":[166],"decision-making":[168],"process":[169],"determine":[171],"most":[173],"suitable":[174],"complete":[181],"Experimental":[184],"results":[185],"demonstrate":[186],"that":[187],"outperforms":[189],"widely":[191],"studied":[192],"technique":[195],"RepoCoder":[196],"7.92%":[198],"on":[199,208,216],"public":[201],"benchmark":[202,212,219],"CCEval,":[203],"3.19%":[204],"HumanEval-Infilling,":[206],"2.80%":[207],"our":[209],"collected":[210,221],"open-source":[211],"suite,":[213],"4.48%":[215],"private-domain":[218],"suite":[220],"Kuaishou":[223],"Technology":[224],"terms":[226],"Exact":[228],"Match.":[229],"also":[231],"allows":[232],"augmenting":[233],"fine-tuned":[234,247],"plug-and-play":[238],"manner,":[239],"yielding":[240],"an":[241],"averaged":[242],"6.5%":[243],"improvement":[244],"over":[245],"model.":[248]},"counts_by_year":[{"year":2025,"cited_by_count":5}],"updated_date":"2025-12-19T19:40:27.379048","created_date":"2025-10-10T00:00:00"}
