Adaptive GEPA improves language model handling of mixed requests

Adaptive-GEPA: Make Your Harness Fit Heterogeneous Requests

Software EngineeringArtificial Intelligence

Summary

Different tasks sometimes need different ways of reasoning and tools to solve them, but usually one program tries to handle all tasks at once. The authors introduce Adaptive-GEPA, a method that learns to split various tasks and assign each to specialized programs. It evolves both a router to decide task type and multiple expert programs to solve them, improving performance without being told task categories in advance. This approach leads to better scores on mixed tasks than previous methods that used one program or separate programs fixed beforehand.

What this means in practice

  • For software developers: Build AI systems that handle multiple types of requests by automatically routing tasks to specialized code modules for better accuracy.
  • For ai product teams: Create adaptive language model-based tools that improve their responses by evolving specialized expert subprograms based on diverse user inputs.$Commercial implications: Enables development of customizable AI services that dynamically allocate processing for heterogeneous user requests, improving product quality.

Authors

Tianyu Chen, Yasi Zhang, Ruiyi Wang, Xinran Zhao, Taoran Li, Mingyuan Zhou

Abstract

Reflective optimizers such as GEPA improve language model prompts from execution traces and evaluator feedback; full-program extensions can also rewrite tools and control flow. In practice, a user hands the same endpoint heterogeneous requests whose effective solutions require different tools, reasoning modes, and control flow. Optimizing one shared program leaves this division of work implicit in source-code search, while optimizing a separate program per request family fixes it beforehand. We introduce Adaptive-GEPA, which learns both how to divide requests and how to solve them. It evolves a router and a library of specialist programs under one search budget. The router's instructions, each specialist's description, and its program code are plain, human-readable text, edited from feedback. To combine branches, it aligns specialists by the requests they handle and inherits descriptions together with programs. On a fixed mixture of four task families, the reported Qwen3-8B run evolves four experts without supplying family labels to the router or reflection model; its routing matches the task partition on all 651 test requests. Its family-mean test score (x100) rises from 52.6 to 70.6, compared with 62.5 for GEPA's full-program adapter and 54.0 for GRPO at a nominal budget of 18,000 scored calls. These counts do not equate total compute. Figure 1 summarizes the learning curves, final test scores, and routing agreement.