← Latest papers
🤖 AI

FitText: Evolving Agent Tool Ecologies via Memetic Retrieval

FitText is a training-free framework that bridges the semantic gap between user tasks and API documentation by embedding dynamic, evolutionary "Memetic Retrieval" into an agent's reasoning loop, significantly improving tool selection accuracy across diverse benchmarks compared to static retrieval methods.

Original authors: Kyle Zheng, Han Zhang, Renliang Sun, Chenchen Ye, Wei Wang

Published 2026-05-06
📖 6 min read🧠 Deep dive

Original authors: Kyle Zheng, Han Zhang, Renliang Sun, Chenchen Ye, Wei Wang

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

The Big Problem: The "Lost in Translation" Moment

Imagine you are a highly intelligent robot (an AI agent) trying to fix a complex problem, like getting a refund for a cancelled flight. You have a massive library of tools (APIs) available to you—thousands of them, like "Check Flight Status," "Issue Refund," or "Call Customer Service."

The problem is a language gap.

  • You (the User) say: "My flight was cancelled, help me get my money back." (This is high-level and emotional).
  • The Tools are described like: "Process a refund for eligible booking ID." (This is technical and rigid).

If you just ask the library for tools based on your exact words, you might get the wrong ones. The old way of doing this was to pick a few tools at the very start and stick with them. But as the robot thinks through the problem, it realizes, "Wait, I need to check the ticket rules before I can ask for a refund." The old tools don't fit anymore, but the robot is stuck with them.

The Solution: FitText (The "Hypothetical Tool" Generator)

The authors introduce FitText, a new way for the robot to find the right tools while it is thinking. Instead of just searching for the tools, the robot first writes a fake description of the tool it thinks it needs.

Think of this like a translator or a sketch artist.

  1. The Sketch: The robot looks at your request ("I need a refund") and draws a rough sketch of the tool it needs: "A tool that checks if a flight is cancelled and finds the booking ID."
  2. The Search: It uses this sketch to search the library. Because the sketch sounds more like the tool descriptions than your original sentence did, it finds better matches.
  3. The Feedback Loop: Once it finds some tools, it looks at them. "Oh, I see the real tools are called 'CheckFlightStatus' and 'FindBookingInfo'." It then updates its sketch to match the real tools better and searches again.

The Four Strategies (From Simple to Super-Organic)

The paper tests four different ways to use this "sketching" method, ranging from simple to complex:

  1. Single-Pass (The One-Shot): The robot draws one sketch, searches once, and hopes for the best. It's fast but might miss the mark.
  2. Multi-Turn Refinement (The Polishing): The robot draws a sketch, finds some tools, sees what they look like, and then redraws the sketch to be more accurate. It does this a few times, slowly polishing the description until it fits perfectly.
  3. Scattershot (The Crowd-Sourcing): Instead of drawing one sketch, the robot draws many different sketches at once (e.g., "Maybe I need a tool for checking status?" and "Maybe I need a tool for finding the ticket number?"). It searches for all of them and combines the best results. This is great for when the robot isn't sure what it needs.
  4. Memetic Retrieval (The Evolutionary Garden): This is the paper's star feature. It treats the sketches like plants in a garden.
    • Generation: The robot creates a population of different sketches.
    • Selection: It checks which sketches find the best tools. The "fittest" sketches survive; the bad ones are thrown out.
    • Crossover & Mutation: It takes two good sketches and "breeds" them together (mixing their ideas) or slightly mutates them (changing a word) to see if a new, better sketch emerges.
    • Memory: It keeps a list of what it has already tried so it doesn't waste time searching the same dead ends again.

This "Memetic" approach is like natural selection. Over a few rounds of "generations," the population of sketches evolves to become perfectly tuned to find the exact tools needed, even for very confusing tasks.

The Results: What Worked?

The team tested this on two huge datasets containing tens of thousands of tools.

  • The Win: FitText, especially the Memetic strategy, was a huge success. It found the right tools much more often than the old methods.
    • On one test, it improved the ranking of the correct tool from being 8th place down to 2nd place.
    • On another test, it increased the success rate of completing tasks by 24 percentage points.
  • The Catch (The "Brain" Requirement): The paper found a crucial limit. This evolutionary "breeding" of sketches only works if the robot's brain (the base AI model) is smart enough to understand the nuances of the sketches.
    • With a smart model, the evolutionary process refines the signal and finds the right tools.
    • With a weaker model, the evolutionary process amplifies noise. It's like trying to breed a better race car, but the mechanic is bad at fixing engines; the "offspring" just get worse and worse. The paper notes that for this method to work, you need a capable "semantic operator" (a smart AI) to do the breeding.

Summary Analogy

Imagine you are looking for a specific, rare book in a library with 50,000 books, but you only know the feeling of the story, not the title.

  • Old Way: You ask the librarian, "Do you have a book about a sad flight?" The librarian gives you a list of books with "flight" in the title, but none are about refunds. You give up.
  • FitText (Memetic): You write a fake book blurb: "A story about a cancelled trip and getting money back." You ask the librarian. They show you a few books. You realize the library uses specific terms like "Travel Voucher." You rewrite your blurb to match those terms. You do this again, mixing and matching ideas from the books you found, until you write a blurb that is so perfect the librarian hands you the exact book you need immediately.

The paper proves that by letting the AI "evolve" its own search queries in real-time, it can navigate massive tool ecosystems much better than before.

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 →