Prompt evolution and selection using distributed neural processing units
AssigneeDell Products L.P.
InventorsJEANNIE FITZGERALD, ONUR CELEBIOGLU, RUWAN ASANKA WASALA
Life of this patent
Estimating the term…
Abstract
Methods and systems for generating and optimizing large language model (LLM) input prompts are disclosed. Proposed prompts generated by LLMs forming an evolutionary/swarm intelligence group may be evolved using a prompt evolution process involving one or more genetic operators. Optimized prompts may then be selected from the evolved prompts once the evolved prompts meet evolution termination criteria that defines an object measure for the LLMs to determine whether the evolved prompts are optimized, and subsequently used in one or more downstream processes.
Claims20
A method for generating optimized prompts, the method comprising:
- obtaining a first prompt optimization request comprising a first task description and a first evolution termination criteria;
- causing one or more trained machine learning models to generate a first prompt population for the first prompt optimization request, the first prompt population for the first prompt optimization request comprising first-generation prompts based on the first task description and each of the first-generation prompts comprising a prompt fitness score;
- making a first determination that the first prompt population for the first prompt optimization request fails to meet the first evolution termination criteria;
- performing, in response to the first determination, a prompt evolution process on the first prompt population for the first prompt optimization request to obtain a second prompt population for the first prompt optimization request, the second prompt population for the first prompt optimization request comprising second-generation prompts based on the first-generation prompts and each of the second-generation prompts comprises the prompt fitness score;
- making a second determination that the second prompt population for the first prompt optimization request meets the first evolution termination criteria;
- selecting, in response to the second determination, at least one of the second-generation prompts of the second prompt population for the first prompt optimization request as an optimized prompt for the first prompt optimization request;
- and
- using the optimized prompt for the first prompt optimization request to fulfill the first prompt optimization request.
A non-transitory machine-readable medium having instructions stored therein, which when executed by a processor, cause the processor to perform operations for generating optimized prompts, the operations comprising:
- obtaining a first prompt optimization request comprising a first task description and a first evolution termination criteria;
- causing one or more trained machine learning models to generate a first prompt population for the first prompt optimization request, the first prompt population for the first prompt optimization request comprising first-generation prompts based on the first task description and each of the first-generation prompts comprising a prompt fitness score;
- making a first determination that the first prompt population for the first prompt optimization request fails to meet the first evolution termination criteria;
- performing, in response to the first determination, a prompt evolution process on the first prompt population for the first prompt optimization request to obtain a second prompt population for the first prompt optimization request, the second prompt population for the first prompt optimization request comprising second-generation prompts based on the first-generation prompts and each of the second-generation prompts comprises the prompt fitness score;
- making a second determination that the second prompt population for the first prompt optimization request meets the first evolution termination criteria;
- selecting, in response to the second determination, at least one of the second-generation prompts of the second prompt population for the first prompt optimization request as an optimized prompt for the first prompt optimization request;
- and
- using the optimized prompt for the first prompt optimization request to fulfill the first prompt optimization request.
A data processing system comprising:
- a central processing unit (CPU);
- and
- a memory coupled to the CPU to store instructions, which when executed by the CPU, cause the CPU to perform operations for generating optimized prompts, the operations comprising:
- obtaining a first prompt optimization request comprising a first task description and a first evolution termination criteria;
- causing one or more trained machine learning models to generate a first prompt population for the first prompt optimization request, the first prompt population for the first prompt optimization request comprising first-generation prompts based on the first task description and each of the first-generation prompts comprising a prompt fitness score;
- making a first determination that the first prompt population for the first prompt optimization request fails to meet the first evolution termination criteria;
- performing, in response to the first determination, a prompt evolution process on the first prompt population for the first prompt optimization request to obtain a second prompt population for the first prompt optimization request, the second prompt population for the first prompt optimization request comprising second-generation prompts based on the first-generation prompts and each of the second-generation prompts comprises the prompt fitness score;
- making a second determination that the second prompt population for the first prompt optimization request meets the first evolution termination criteria;
- selecting, in response to the second determination, at least one of the second-generation prompts of the second prompt population for the first prompt optimization request as an optimized prompt for the first prompt optimization request;
- and
- using the optimized prompt for the first prompt optimization request to fulfill the first prompt optimization request.
Dependencies are inferred from the claim text.