System and methods for search engine parameter tuning using genetic algorithm
A method for operating a search engine may include determining a multi-dimensional search parameter space comprising a set of possible weight values for each of a plurality of search parameters and dividing the search parameter space into a grid of evenly-spaced values that is a subset of the set of possible values. The method may further include defining one or more initial populations of search parameter weight values, wherein each population of search parameter weight values comprises a plurality of initial individuals, wherein each initial individual comprises a respective one of the evenly-spaced values for each of the search parameters. The method may further include executing one or more genetic algorithms based on the one or more initial populations to select a final set of search parameter weight values, and returning results of a user search in the search engine according to the final set of search parameter weight values.
1 . A method for operating an electronic document search engine by setting respective weights of a plurality of search parameters in the search engine, the method comprising:
receiving a search request from a user computing device over a network;
compiling a ranked list of documents relevant to the search request according to a set of search parameter weights stored in a network-based non-transitory storage device;
returning the ranked list of documents to the user computing device over the network;
receiving behavior data responsive to the ranked list of documents from the user computer device;
optimizing the set of search parameter weights based, at least in part, on the search request and the behavior data, the optimizing comprising:
defining sets of search parameter weight values in a search parameter space for the plurality of search parameters of the search engine, the sets of search parameter weight values representative of a population of a plurality of individuals, each set of search parameter weight values comprising a set of discrete values in the search parameter space, and each discrete value representative of an individual of the plurality of individuals;
tuning the sets of search parameter weight values by adding, to the population, new values representative of a plurality of children individuals in the search parameter space, each new value being selected from a range of values between a corresponding weight value of a respective first parent individual and a corresponding weight value of a respective second parent individual of a respective set of search parameter weight values;
computing a fitness of each individual of the population including the plurality of children individuals based on historical selections by a plurality of users in response to previous searches by:
executing a plurality of search queries from historical data according to the respective set of search parameter weight values for each individual to generate a set of documents relevant to each search query from historical data for each individual of the population, wherein the plurality of search queries includes the search request;
comparing the historical selections by the plurality of users associated with the plurality of search queries to the set of documents, wherein the historical selections include the behavior data; and
setting the fitness of each individual of the population based on how often each of the respective set of documents was selected by each user, according to the historical selections of each individual; and
determining a final set of search parameter weight values for compiling results by the search engine, the final set of search parameter weight values representative of a set of individuals of the population based on the computed fitness of each individual of the population, wherein determining the final set of search parameter weight values reduces a number of parameter weight values of the population of the plurality of individuals in a search parameter space; and
storing the final set of search parameter weight values in the network-based non-transitory storage device for future use.
2 . The method of claim 1 , further comprising dividing the search parameter space into evenly-spaced subsets of a set of possible weight values.
3 . The method of claim 1 , wherein the plurality of search parameters comprise metadata fields that are associated with the set of documents independent of the search engine.
4 . The method of claim 1 , further comprising:
executing a first genetic algorithm on the population to select an intermediate set of individuals;
defining a final population based on the intermediate set of individuals; and
executing a second genetic algorithm on the final population to select the final set of search parameter weight values.
5 . The method of claim 4 , wherein executing the second genetic algorithm on the final population comprises:
executing an evolution step in which a first individual in the final population is defined as a first parent and a second individual in the final population is defined as a second parent, by creating a child individual comprising a new value for each of the set of search parameter weight values, wherein the new value for each of the search parameter weight values is selected from a range of values between a value of the first parent for that weight and a value of the second parent for that weight.
6 . The method of claim 5 , wherein executing the first genetic algorithm on the population comprises:
executing an evolution step in which a first individual in the population is defined as a first parent and a second individual in the population is defined as a second parent, by creating a child individual comprising new values for each of the set of search parameter weight values, wherein the new value for each one of the search parameter weight values is selected from a value of the first parent for that weight and a value of the second parent for that weight.
7 . The method of claim 4 , further comprising:
determining a number of individuals in the population, each of the individuals having a fitness higher than a predetermined level; and
proceeding to select the intermediate set of individuals when the number exceeds a predetermined threshold.
8 . A system for operating an electronic document search engine by setting respective weights of a plurality of search parameters in the search engine, the system comprising:
a processor; and
a non-transitory, computer-readable memory storing instructions that, when executed by the processor, cause the system to perform operations comprising:
receiving a search request from a user computing device over a network;
compiling a ranked list of documents relevant to the search request according to a set of search parameter weights stored in the non-transitory, computer-readable memory;
returning the ranked list of documents to the user computing device over the network;
receiving behavior data responsive to the ranked list of documents from the user computer device;
optimizing the set of search parameter weights based, at least in part, on the search request and the behavior data, the optimizing comprising:
defining an initial population of a plurality of individuals comprising sets of search parameter weight values, each individual of the plurality of individuals comprising a discrete value of a respective set of search parameter weight values for each of the plurality of search parameters of the search engine;
tuning the sets of search parameter weight values by adding, to the initial population, a plurality of children individuals, each child individual comprising a new value for each of the respective set of search parameter weight values, each new value being selected from a range of values between a corresponding weight value of a respective first parent individual and a corresponding weight value of a respective second parent individual;
computing a fitness of each individual of the initial population based on historical selections by a plurality of users in response to previous searches by:
executing a plurality of search queries from historical data according to the respective set of search parameter weight values for each individual to generate a set of documents relevant to each search query from the historical data for each individual of the initial population, wherein the plurality of search queries includes the search request;
comparing the historical selections by the plurality of users associated with the plurality of search queries to the set of documents, wherein the historical selections include the behavior data; and
setting the fitness of each individual of the initial population based on how often each of the respective set of documents was selected by each user according to the historical selections of each individual; and
determining a final set of search parameter weight values for compiling results by the search engine, the final set of search parameter weight values representative of a set of individuals of the population based on the computed fitness of each individual of the population, wherein determining the final set of search parameter weight values reduces a number of parameter weight values of the population of the plurality of individuals in a search parameter space; and
storing the final set of search parameter weight values in the non-transitory, computer-readable memory for future use.
9 . The system of claim 8 , wherein the search parameters comprise metadata fields that are associated with the set of documents independent of the search engine.
10 . The system of claim 8 , wherein the operations further comprise:
executing a first genetic algorithm on the initial population to select an intermediate set of individuals;
defining a final population based on the intermediate set of individuals; and
executing a second genetic algorithm on the final population to select the final set of search parameter weight values.
11 . The system of claim 10 , wherein executing the second genetic algorithm on the final population comprises:
executing an evolution step in which a first individual in the final population is defined as a first parent and a second individual in the final population is defined as a second parent, by creating a child individual comprising new values for each of the set of search parameter weight values, wherein the new value for each one of the search parameter weight values is selected from a range of values between a value of the first parent for that weight and a value of the second parent for that weight.
12 . The system of claim 10 , wherein executing the first genetic algorithm on the initial population comprises:
executing an evolution step in which a first individual in the initial population is defined as a first parent and a second individual in the initial population is defined as a second parent, by creating a child individual comprising a new value for each of the set of search parameter weight values, wherein the new value for each one of the set of search parameter weight values is selected from a value of the first parent for that weight and a value of the second parent for that weight.
13 . The system of claim 10 , wherein the operations further comprising:
determining a number of individuals in the population, each of the individuals having a fitness higher than a predetermined level; and
proceeding to select the intermediate set of individuals when the number exceeds a predetermined threshold.
14 . A non-transitory, computer-readable memory storing instructions that, when executed by a processor, cause a computing system comprising the processor to perform operations comprising:
receiving a search request from a user computing device over a network;
compiling a ranked list of documents relevant to the search request according to a set of search parameter weights stored in the non-transitory, computer-readable memory;
returning the ranked list of documents to the user computing device over the network;
receiving behavior data responsive to the ranked list of documents from the user computer device;
optimizing the set of search parameter weights based, at least in part, on the search request and the behavior data, the optimizing comprising:
defining an initial population of a plurality of individuals, each individual of the plurality of individuals comprising a respective search parameter weight value of at least one set of search parameter weight values for each of a plurality of search parameters;
tuning the plurality of search parameters by adding, to the initial population, a plurality of children individuals, each child individual comprising a new value for the at least one set of search parameter weight values, each new value being selected from a range of values between a corresponding weight value of a respective first parent individual and a corresponding weight value of a respective second parent individual;
computing a fitness of each individual of the initial population including the plurality of children individuals based on historical selections by a plurality of users in response to previous searches by:
executing a plurality of search queries from historical data according to the respective set of search parameters weight values for each individual to generate a set of electronic documents relevant to each search query from historical data for each individual of the initial population, wherein the plurality of search queries include the search request;
comparing the historical selections by the plurality of users associated with the plurality of search queries to the set of electronic documents, wherein the historical selections include the behavior data; and
setting the fitness of each individual of the initial population based on how often each of the respective set of documents was selected by each user according to the historical selections of the plurality of users of each individual; and
determining a final set of search parameter weight values for compiling results by a search engine, the final set of search parameter weight values representative of a set of individuals of the population based on the computed fitness of each individual of the population, wherein determining the final set of search parameter weight values reduces a number of parameter weight values of the population of the plurality of individuals in a search parameter space; and
storing the final set of search parameter weight values in the non-transitory, computer-readable memory for future use.
15 . The non-transitory, computer-readable memory of claim 14 , wherein the search parameters comprise metadata fields that are associated with the set of electronic documents independent of the search engine.
16 . The non-transitory, computer-readable memory of claim 14 , the operations further comprising:
executing a first genetic algorithm on the initial population to select an intermediate set of individuals;
defining a final population based on the intermediate set of individuals; and
executing a second genetic algorithm on the final population to select the final set of search parameter weight values.
17 . The non-transitory, computer-readable memory of claim 16 , wherein executing the second genetic algorithm on the final population comprises:
executing an evolution step in which a first individual in the final population is defined as a first parent and a second individual in the final population is defined as a second parent, by creating a child individual comprising a new value for each of the set of search parameter weight values, wherein the new value for each one of the set of search parameter weight values is selected from a range of values between a value of the first parent for that weight and a value of the second parent for that weight.
18 . The non-transitory, computer-readable memory of claim 17 , wherein executing the first genetic algorithm on the initial population comprises:
executing an evolution step in which a first individual in the initial population is defined as a first parent and a second individual in the initial population is defined as a second parent, by creating a child individual comprising a new value for each of the search parameter weight values, wherein the new value for each one of the search parameter weight values is selected from a value of the first parent for that weight and a value of the second parent for that weight.
19 . The non-transitory, computer-readable memory of claim 16 , the operations further comprising:
determining a number of individuals in the population, each of the individuals having a fitness higher than a predetermined level; and
proceeding to select the intermediate set of individuals when the number exceeds a predetermined threshold.
20 . The non-transitory, computer-readable memory of claim 14 , further comprising dividing the search parameter space into evenly-spaced subsets of a set of possible weight values.