Enrich-Retrieve-Rank: Scaling Capability Discovery Beyond In-Context Routing
This paper introduces "Enrich-Retrieve-Rank," a scalable capability discovery pipeline that replaces inefficient in-context routing with an offline enrichment and online retrieve-then-rank approach, demonstrating significantly higher accuracy and lower costs than baseline methods as agent ecosystems grow from hundreds to thousands of components.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
In the rapidly evolving world of artificial intelligence, a new generation of systems has emerged that does not just answer questions but performs tasks. These systems, often called agents, act as digital assistants that can browse the web, write code, or manage complex workflows. To do this, they rely on a vast library of digital tools, skills, and other agents, much like a human worker relies on a toolbox filled with hammers, screwdrivers, and specialized software. As these ecosystems grow, they now contain thousands of distinct capabilities. The central challenge for these intelligent systems is discovery: when faced with a specific task, how does the system know which tool to pick from a library that might contain thousands of options? For a long time, the standard approach was to simply show the entire list of available tools to the artificial intelligence and ask it to choose. This method worked well when the list was short, but as the libraries expanded into the thousands, the systems began to struggle, often failing to find the right tool or wasting time and resources trying the wrong ones.
A team of researchers at Amazon AGI set out to solve this scaling problem by reimagining how these systems search for capabilities. They treated the problem not as a simple choice, but as a search engine query. Instead of forcing the artificial intelligence to read through a massive, unorganized list of every available tool, they built a pipeline that first organizes the information and then retrieves the most relevant options before making a final decision. The process begins with an offline step where the system takes the sparse, often brief descriptions of each tool and rewrites them into rich, detailed profiles. This is done once when a tool is added to the library, creating a searchable record that includes a summary, specific keywords, and examples of how the tool is used. When a user asks a question, the system does not ask the artificial intelligence to guess from the whole library. Instead, it quickly searches this enriched index to pull up a shortlist of the most likely candidates, and then uses a final, focused check to rank them.
The researchers tested this approach against the traditional method of showing the entire list to the artificial intelligence, known as in-context routing. They found that as the library of tools grew, the traditional method collapsed. When the library contained only ten tools, the system was correct about eighty-five percent of the time. However, as the number of tools grew to nearly seven thousand, the accuracy of the traditional method plummeted to just twelve percent. The system became overwhelmed by the sheer volume of information it had to process at once. In contrast, the new search-and-rank pipeline handled the growth much more gracefully. While its accuracy also decreased as the library grew, it remained significantly higher, dropping to thirty-nine percent at the largest scale. Crucially, the researchers discovered a tipping point around five hundred tools. Below this number, the old method of showing the whole list still worked well. Above it, the new search-based approach became essential, outperforming the old method by a wide margin.
The study also revealed that the new system was far more efficient. By retrieving a shortlist first, the system used roughly half the computing resources required by the traditional method when compared to a system that searched for candidates one by one. When compared to the method that showed the entire list, the new approach reduced costs by a factor of seventy. This efficiency is vital because every time an artificial intelligence tries a tool and fails, it consumes computing power and time, and in some cases, it might even trigger an action on an untrusted system just to learn what it does. The new pipeline avoids these wasted attempts by filtering out irrelevant options before any action is taken.
A key finding of the research was that the improvement came primarily from the retrieval step, not the final ranking step. The system's ability to find the correct tool in the initial search was the main bottleneck. Even when the search engine found the right tool, the final ranking step was highly reliable, correctly placing the best option at the top of the list between seventy and eighty-seven percent of the time, regardless of how large the library was. This suggests that the future of these systems depends less on making the final decision-maker smarter and more on building better search engines that can handle massive libraries of tools. The researchers also noted that this approach works best when the initial descriptions of the tools are sparse or incomplete. For libraries that already have very detailed descriptions, the extra step of rewriting the information provided little benefit. However, for the vast, growing libraries of real-world tools where descriptions are often brief, this enrichment step was critical for success.
The team deployed this pipeline as the default discovery layer for a large-scale multi-agent platform in production. In this real-world environment, the system manages thousands of agents, tools, and skills simultaneously. The results confirmed the laboratory findings: the search-based approach allowed the system to scale effectively where the old methods failed. The researchers emphasized that this is not a theoretical exercise but a practical solution to a problem that arises as artificial intelligence systems become more complex and capable. By treating capability discovery as a search problem rather than a selection problem, they have provided a blueprint for how these systems can continue to grow without losing their ability to find the right tools for the job. The work demonstrates that as artificial intelligence ecosystems expand, the architecture of how they find information must evolve, moving away from simple lists and toward sophisticated, layered search processes that can handle the complexity of the modern digital world.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.