From the course: Agentic AI Design Patterns for GenAI and Predictive AI
Voting ensemble
From the course: Agentic AI Design Patterns for GenAI and Predictive AI
Voting ensemble
- Organizations have been using predictive AI systems for some time now, and many decision makers have come to rely on the predictions and forecasts that these systems produce for us, but there are different types of decisions we need to deal with. There are everyday decisions we make that have more of a tactical focus, and then there are the larger, high-stakes decisions that have a strategic and often long-term focus. Each decision we make has consequences. Those that are more high stakes and strategic-focused tend to have much more significant consequences, especially when we get those decisions wrong. Let's think of an example. So the tactical decision of how much ice cream we need to order for a specific flavor will be less impactful than the strategic decision of where in the city we should locate our ice cream store, so this brings us back to our predictive AI system. Even if we train it well and do all the right things, there are still risks when it comes to predictions. For example, the model might encounter data or concept drift at some point. It may contain biases that we're unaware of or it could have been over-fitted by being trained too well. The voting ensemble pattern broadens our solution architecture by involving two or more predictive AI systems, each tasked with producing the same prediction. It then further introduces an aggregator agent that receives each prediction result and then compares the results to determine the best result for achieving the overall goal, but it's called a voting ensemble because the result of each predictive AI system is essentially a vote for a certain prediction. If we have three systems and two of them tell us we should locate our ice cream store downtown while the third states we should locate it in a suburb, the aggregator agent considers the downtown option to be the best result. There are, of course, other voting methods the aggregator agent can use as well. For example, we may get a confidence rating, like a probability percentage, that the models provide us where it's more of a soft-voting technique that we follow. The point is that it's a voting process that it follows to help us determine the best end result. The aggregator's logic is typically rule-based or heuristic-based. It doesn't learn much. Instead, it applies predefined criteria to aggregate the votes. It's worth noting that there are variations of this pattern that are not based on voting logic. There are dynamic ensemble selection techniques that will choose a prediction result based on different factors such as the model's past performance, meaning the results from a model with a historically high-accuracy rate would be favored over others. Using an ensemble of predictive models adds complexity and computational cost, which may not always be worthwhile, especially if the models lack diversity or are prone to making the same type of errors. This can lead to an architecture potentially that gives you a false sense of security, where the models in the ensemble confidently produce the same wrong or biased predictions. There is an added risk of being unable to explain the final decision provided by the aggregator agent. This is because the decision-making process can be the result of multiple diverse models working together rather than a single transparent chain of logic. That final prediction is the result of a process that aggregates the model votes, which can then make it very difficult to trace back the final conclusion to a single, simple cause or origin.