-
公开(公告)号:US20240403344A1
公开(公告)日:2024-12-05
申请号:US18803085
申请日:2024-08-13
Inventor: Wanpeng NIU , Junwei XING , Sai GAO , Haonan FANG , Hui LI , Bingfei ZHANG
Abstract: There is provided a code retrieval method and apparatus based on a large language model, an electronic device and a readable storage medium, which relates to the field of artificial intelligence technologies, such as large language model technologies, big data technologies, cloud service technologies, or the like. The method for code retrieval based on a large language model includes: acquiring a code retrieval query to obtain a retrieval vector of the code retrieval query; acquiring a first index of a target code library, the first index including a plurality of code blocks and a plurality of code block vectors; acquiring a target code block according to the retrieval vector and the first index; acquiring a second index of the target code library, the second index being a code architecture knowledge graph; acquiring a target code file corresponding to the target code block according to a source code file corresponding to the target code block and the second index; and acquiring a retrieval result according to the target code block and the target code file.
-
公开(公告)号:US20240403001A1
公开(公告)日:2024-12-05
申请号:US18803034
申请日:2024-08-13
Inventor: Junwei XING , Hui LI , Wanpeng NIU , Lili ZHANG , Chuqing WANG , Sai GAO , Haonan FANG , Xiangfei MIN , Jie SHAO , Yunpeng PENG
IPC: G06F8/33
Abstract: There is provided a code recommendation method and apparatus, an electronic device and a storage medium, which relates to the field of software development technologies, artificial intelligence technologies, or the like. A specific implementation includes: acquiring a relevant code segment required by a recommended code from a current code file; acquiring code dependence information required by the recommended code; and performing code recommendation based on the relevant code segment, the code dependence information and a pre-trained code recommendation model.
-