Context engine test generation
AssigneeDropbox, Inc.
InventorRajkumar Janakiraman
Life of this patent
Estimating the term…
Abstract
The present disclosure is directed toward systems, methods, and non-transitory computer-readable media for generating function code and test code to determine that the function code satisfies an intent query. For example, the disclosed systems utilize a large language model to process an intent query and generate function code that defines one or more processes whose execution satisfies the intent query. In addition, the disclosed systems also utilize the large language model to generate test code that defines a function test for determining that the function code satisfies the intent query. Moreover, the disclosed systems can execute the test code to determine that the function code satisfies the intent query.
Claims20
A method comprising:
- generating, using a context engine integrated with a large language model (LLM), a code generation prompt encoding an intent query into domain-specific language interpretable by the LLM;
- generating, using the LLM to process the code generation prompt, an LLM-generated code segment designated for an execution endpoint indicated by the domain-specific language of the code generation prompt;
- and
- validating, by an interpreter associated with the context engine and the LLM, the LLM-generated code segment by executing test code that verifies whether the LLM-generated code segment is compile-able at the execution endpoint.
A system comprising:
- at least one processor;
- and
- a non-transitory computer-readable medium storing instructions which, when executed by the at least one processor, cause the system to:
- generate, using a context engine integrated with a large language model (LLM), a code generation prompt encoding an intent query into domain-specific language interpretable by the LLM;
- generate, using the LLM to process the code generation prompt, an LLM-generated code segment designated for an execution endpoint indicated by the domain-specific language of the code generation prompt;
- validate, by an interpreter associated with the context engine and the LLM, the LLM-generated code segment by executing test code that verifies whether the LLM-generated code segment is compile-able at the execution endpoint;
- and
- based on receiving feedback regarding validity of the LLM-generated code segment, modify one or more parameters of the LLM.
A non-transitory computer-readable medium storing executable instructions which, when executed by at least one processor, cause the at least one processor to:
- generate, using a context engine integrated with a large language model (LLM), a code generation prompt encoding an intent query into domain-specific language interpretable by the LLM;
- generate, using the LLM to process the code generation prompt, an LLM-generated code segment designated for an execution endpoint indicated by the domain-specific language of the code generation prompt;
- validate, by an interpreter associated with the context engine and the LLM, the LLM-generated code segment by executing test code that verifies whether the LLM-generated code segment is compile-able at the execution endpoint;
- detect, utilizing the interpreter, whether the LLM-generated code segment comprises malicious code by executing the test code associated with the LLM-generated code segment;
- and
- rectify the LLM-generated code segment by preventing an unauthorized operation associated with the malicious code within the LLM-generated code segment.
Dependencies are inferred from the claim text.