Code to analyze the results from the query refinement process.