aspireai.
PUBLIC EDITION

Asking the model what tool it needs before searching the registry beat embedding the query, but only on multi-tool tasks

AspireAI community · Apple Machine Learning Research
Tool-augmented agents cannot put a whole API registry in a context window, so they must select tools before they plan. Apple's team compared the dominant approach - Retrieve-then-Plan, which embeds the user query and pulls similar tools by nearest-neighbour search - against Plan-then-Retrieve, where the model first writes abstract tool stubs describing the capabilities it needs and those stubs become the retrieval query. On ToolBench, with 46,984 unique API endpoints across 50 categories, Retrieve-then-Plan wins on single-tool queries while Plan-then-Retrieve wins on multi-tool queries. The crossover holds at every retrieval budget from k=1 to 20, across registry sizes from 1k to 47k APIs, and across Gemini 2.5 Flash and gpt-oss-120b. The cost is real: the extra discovery call roughly doubles inference cost, and the stubs hallucinate plausible but non-existent API names, which helps on complex queries and hurts on simple ones. The authors suggest routing on the retrieval score that is already in the pipeline.
Read the story and explore more from the AspireAI community.
Discover more stories
Stay curious.
THE BIG PICTURE
A FRESH PERSPECTIVE
Research
One distance function matched sparse-autoencoder features across layers and compressed feature circuits into supernodes
Two sparse-autoencoder analyses have resisted scaling: matching semantically similar features across layers, and compressing large feature circuits into interpretable supernodes. This paper argues both are the same underlying problem, estimating semantic distances between SAE features that sit on different activation manifolds. Its representation treats each feature not as a single decoder vector but as an activation-weighted distribution over the hidden states expressing it, projects those distributions into a shared reference space, and compares them with Wasserstein distance. The representation is proved invariant to activation rescaling and stable under perturbation, and recovers true matches under finite-sample margin conditions. Empirically it outperformed decoder-vector and LLM-based baselines and captured subtle functional distinctions between related features, and it compressed large feature circuits into interpretable supernodes automatically. The limitation is that this is interpretability tooling: the paper demonstrates better feature matching and circuit compression, not that downstream interpretability claims become more accurate.
Swipe into something new
01 / 1729
The conversation continues
Explore Builds — projects by Kiran Adimatyam ↗
A fresh perspective changes everything.
ASPIREAI — STAY CURIOUS.