15. A non-transitory computer-readable medium storing software comprising instructions executable by one or more computers which, upon such execution, cause the one or more computers to perform operations comprising: receiving an initial search query that includes (i) one or more query terms associated with an object, and (ii) one or more query terms that identify a context in which the object is to appear in images that are identified in response to the initial search query; determining a category associated with the object; generating a generalized search query that includes (i) one or more query terms associated with the category, and (ii) one or query terms that identify the context in which the object is to appear in images that are identified in response to the initial search query; obtaining (i) an initial set of one or more images that are identified as responsive to the initial search query, and (ii) a generalized set of one or more images that are identified as responsive to the generalized search query; and selecting one or more of the images of the initial set based at least on an indication of similarity between the selected one or more images and the one or more images of the generalized set of one or more images.
15. A non-transitory computer-readable medium storing software comprising instructions executable by one or more computers which, upon such execution, cause the one or more computers to perform operations comprising: receiving an initial search query that includes (i) one or more query terms associated with an object, and (ii) one or more query terms that identify a context in which the object is to appear in images that are identified in response to the initial search query; determining a category associated with the object; generating a generalized search query that includes (i) one or more query terms associated with the category, and (ii) one or query terms that identify the context in which the object is to appear in images that are identified in response to the initial search query; obtaining (i) an initial set of one or more images that are identified as responsive to the initial search query, and (ii) a generalized set of one or more images that are identified as responsive to the generalized search query; and selecting one or more of the images of the initial set based at least on an indication of similarity between the selected one or more images and the one or more images of the generalized set of one or more images. 18. The medium of claim 15 , the operations comprising generating the indication of similarity based on: determining a function based on the generalized set of one or more images and the first query; and determining to generate the indication of similarity based on evaluating the function using the selected one or more images.