| CPC G06F 16/338 (2019.01) | 20 Claims |

|
1. A system comprising:
a processor; and
a memory that stores a program configured to be executed by the processor, the program comprising instructions that when executed by the processor perform acts that:
receive a query and a context from a user interface of a source code editor, wherein the query is related to code elements from a codebase, wherein the context identifies the codebase;
access a codebase segment table, wherein the codebase segment table comprises a plurality of code segments from the codebase, wherein a code segment of the plurality of code segments is associated with metadata, wherein the metadata comprises a filename of the code segment, a local file path of the code segment, and a natural language summary of the code segment;
search for an example that is similar to the query and context from the plurality of code segments of the codebase stored in the codebase segment table, wherein the search is based on an embedding of the query and context similar to an embedding associated with a particular code segment of the codebase and metadata associated with the particular code segment;
generate a prompt to a large language model, wherein the prompt comprises the query, the context of the query and the example;
cause the large language model to generate a response to the query given the prompt;
receive a response from the large language model given the prompt; and
display the response in the user interface of the source code editor.
|