While brainstorming is a technique used to generate a large number of ideas, affinity grouping is a technique used to organize and categorize those ideas based on their similarities or common themes. Affinity grouping builds upon the output of brainstorming by providing a structured way to analyze and make sense of the data.