The Artificial Bee Colony (ABC) algorithm, a swarm intelligence technique inspired by honey bee foraging, is adapted for unsupervised clustering optimization using Google's Gemini LLM as agentic AI. Three bee agent types (Scout, Employed, Onlooker) are implemented via natural language prompts to explore, refine, and select clustering solutions on the Iris dataset. The approach demonstrates how LLMs can autonomously optimize hyperparameters for scikit-learn clustering algorithms, achieving improved Adjusted Rand Index scores compared to baseline models. The implementation includes parallel execution with ThreadPoolExecutor, fitness evaluation, and addresses practical challenges like prompt compliance, schema enforcement, and API reliability issues with Gemini.
Table of contents
Table of ContentsPython NotebookIntroductionExample ABC Agent Search ProgressAgent Lifecycle in Swarm OptimizationThe 3 Bee Agent RolesIris DatasetClustering – No labels? No problem!Fitness Model for ClusteringConfusion Matrix as a Diagnostic ToolRunning the Agentic AI LoopReporting ResultsDesigning Agent Prompts for GeminiGemini Agentic AI IssuesAgentic AI Competitive Landscape towards 2026Conclusion and Future WorkSort: