A semantic question has to resolve to the exact XBRL tag.
Public filings come with a gift for grounding: every 10-K and 10-Q is annotated with XBRL tags that anchor a number to its exact location in the filing. A fintech client wanted LLM answers grounded through them. The catch: mapping a semantic question to the right tag among thousands of candidates is nothing like keyword lookup, and the agent doing the mapping picked the correct tag only 71% of the time.
We built a query-to-tag tool and let AgentGrad optimize its definition and few-shot examples against real failures, lifting tool-calling accuracy to 93%. The optimization had a second effect: it closed the gap between Fable and Sonnet 5 on this task, so orchestration moved to the smaller model and inference cost dropped 5x.