Note
Go to the end to download the full example code or to run this example in your browser via Binder.
Panels: several evaluators, one decision#
Design decisions are often taken by groups, and a single LLM can be asked to
speak with several personas. A Panel asks every
member and aggregates: vote shares for selections, Borda, Copeland, Kemeny or
Bradley–Terry consensus for rankings. The disagreement of the members — one
minus Kendall’s coefficient of concordance W for rankings, one minus the mean
Jaccard overlap for selections — is reported as the panel’s uncertainty.
Evolving for the group#
The panel steers the GA towards palettes the whole group likes. The curves show the mean utility over the members (the group’s ground truth), averaged over six crowds, for the panel and for a single member deciding alone. The gain is modest but consistent: a lone member optimizes their own taste.
from easyiec.validation import curve_frame # noqa: E402
results, labels = [], []
for s in range(6):
crowd = make_crowd(problem, n=7, spread=0.15, seed=10 + s, noise=0.03)
group = lambda g, crowd=crowd: float(np.mean([u.true_utility(g) for u in crowd])) # noqa: E731
results.append(ei.run(problem, InteractiveGA(pop_size=9), Panel(crowd), generations=15, seed=s, oracle=group))
results.append(ei.run(problem, InteractiveGA(pop_size=9), crowd[0], generations=15, seed=s, oracle=group))
labels += ["panel of 7 (Borda)", "one member alone"]
ax = ei.viz.plot_convergence(curve_frame(results, labels=labels), title="six crowds, spread 0.15")
ax.set_ylabel("best mean utility over the group", fontsize=8)
plt.show()

Total running time of the script: (0 minutes 19.833 seconds)

