A computer system for tuning large language models, the computer system comprising one or more processors, one or more computer readable tangible storage devices, and program instructions stored on at least one of the one or more computer readable tangible storage devices for execution by at least one of the one or more processors, the program instructions executable to:
- receive pairs of textual prompts and ground truth labels;
- create a data selection scoring function, by repurposing one or more reward functions to compute similarity between the textual prompts and the ground truth labels, wherein the one or more reward functions measure similarity between textual outputs produced by a large language model and the ground truth labels;
- select a training dataset from the pairs of the textual prompts and the ground truth labels, by using the data selection scoring function;
- and
- tune the large language model using the training dataset and reinforcement learning with the one or more reward functions.