Code retrieval method and apparatus based on large language model
AssigneeBeijing Baidu Netcom Science Technology Co., Ltd.
InventorsWanpeng NIU, Junwei XING, Sai GAO, Haonan FANG, Hui LI, Bingfei ZHANG
Life of this patent
Estimating the term…
Loading patent…
AssigneeBeijing Baidu Netcom Science Technology Co., Ltd.
InventorsWanpeng NIU, Junwei XING, Sai GAO, Haonan FANG, Hui LI, Bingfei ZHANG
Estimating the term…
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.
A method for code retrieval based on a large language model, comprising:
An electronic device, comprising:
A non-transitory computer readable storage medium with computer instructions stored thereon, wherein the computer instructions are used for causing a method for code retrieval based on a large language model, wherein the method for code retrieval based on a large language model comprises:
Dependencies are inferred from the claim text.