← Latest papers
💻 computer science

JTPRO: A Joint Tool-Prompt Reflective Optimization Framework for Language Agents

The paper introduces JTPRO, a framework that iteratively co-optimizes global agent instructions and per-tool schema descriptions through rollout-driven reflection to significantly improve tool selection and argument instantiation accuracy in large, domain-specific tool inventories.

Original authors: Sandip Ghoshal, Anshul Mittal, Jyotika Singh, Miguel Ballesteros, Weiyi Sun, Fang Tu, Shailender Singh, Yassine Benajiba, Fahad Shah, Sujeeth Bharadwaj, Sujith Ravi, Dan Roth

Published 2026-04-23
📖 4 min read☕ Coffee break read

Original authors: Sandip Ghoshal, Anshul Mittal, Jyotika Singh, Miguel Ballesteros, Weiyi Sun, Fang Tu, Shailender Singh, Yassine Benajiba, Fahad Shah, Sujeeth Bharadwaj, Sujith Ravi, Dan Roth

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

Imagine you have a brilliant, super-smart assistant (the AI Agent) who is incredibly good at talking and thinking. However, this assistant doesn't know how to do everything on its own. To get things done, it has to use a giant toolbox filled with thousands of specialized tools (like a calculator, a map, a weather report, a stock ticker, etc.).

The problem? As the toolbox gets bigger and more complex, the assistant starts getting confused. It picks the wrong tool, or it picks the right tool but fills out the forms incorrectly.

This paper introduces a new method called JTPRO to fix this mess. Here is how it works, explained with some everyday analogies.

The Problem: The "Overwhelmed Librarian"

Imagine your assistant is a librarian trying to find a specific book for you.

  • The Issue: The library has grown from 100 books to 10,000. The books have very similar titles (e.g., "Get All Countries" vs. "Get Countries List for Investors").
  • The Mistake: When you ask for investment advice, the librarian grabs the generic book because the labels are too vague. Or, they grab the right book but fill out the "borrowing form" with the wrong date format.
  • The Old Way: Previously, people tried to fix this by writing a massive, 50-page instruction manual for the librarian. But the librarian gets overwhelmed, ignores the fine print, and still makes mistakes.

The Solution: JTPRO (The "Smart Editor")

JTPRO is like a smart editor that doesn't just rewrite the instruction manual; it also rewrites the labels on the books themselves. It does this through a process of trial, error, and reflection.

Here is the step-by-step process:

1. The "Practice Run" (Rollouts)

The editor lets the assistant try to solve a bunch of practice problems using the current tools and instructions.

  • Analogy: The librarian tries to find books for 100 different customers and fails on 20 of them.

2. The "Post-Mortem" (Reflection)

The editor looks at the failures and asks: "Why did we fail?"

  • Did the librarian pick the wrong book? (Tool Selection Error)
  • Did they pick the right book but write the wrong date on the form? (Slot Filling Error)
  • Analogy: The editor realizes, "Ah, the label on the 'Investor' book was too blurry, and the 'Date' form didn't say clearly that it needs to be in YYYY-MM-DD format."

3. The "Targeted Fix" (Joint Optimization)

This is the magic part. Instead of just changing the big instruction manual, JTPRO changes two things at once:

  • The Global Rules (The Manual): It adds a clear rule: "If the customer asks about stocks, always look for the 'Investor' book."
  • The Tool Labels (The Book Covers): It rewrites the specific description of the 'Investor' book to say: "Use this ONLY for stock market questions. Do NOT use for general geography."

4. The "Cleanup Crew" (Globalization)

As the editor fixes things, it notices that many tools have the same confusing instructions (e.g., "Enter date as YYYY-MM-DD" appears 50 times).

  • Analogy: Instead of writing "Enter date as YYYY-MM-DD" on 50 different forms, the editor writes it once at the top of the library wall and puts a tiny arrow on every form saying, "See Wall Rule #1."
  • This keeps the instructions short, consistent, and less confusing.

Why is this better than before?

  • Old Way: "Here is a 50-page manual. Good luck." (The assistant gets lost).
  • JTPRO Way: "Here is a clear rule for when to use a tool, and a clear label on the tool itself explaining how to use it. Also, we removed all the repetitive text so you aren't bored."

The Results

The paper tested this on three different scenarios:

  1. Huge Toolboxes: When the number of tools grew from 500 to 1,000, other methods failed, but JTPRO kept getting better.
  2. Complex Forms: When the forms had many confusing fields (like dates, currencies, and numbers), JTPRO helped the assistant fill them out correctly much more often.
  3. Multiple Tasks: When the assistant had to use three tools at once to solve one problem, JTPRO ensured it didn't mix up the order or the details.

The Bottom Line

JTPRO is a system that teaches an AI how to use its tools by learning from its mistakes. It doesn't just tell the AI "be careful"; it specifically tweaks the instructions and the tool descriptions to make them crystal clear, ensuring the AI picks the right tool and fills out the paperwork correctly every time.

It's the difference between giving a confused tourist a giant, blurry map versus giving them a GPS that updates the route in real-time and highlights exactly which turn to take.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →