Concurrency without Model Changes: Future-based Asynchronous Function Calling for LLMs
This paper introduces AsyncFC, a framework that reduces LLM agent latency by decoupling model decoding from function execution to enable asynchronous and parallel tool use without requiring any model fine-tuning or protocol changes.
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 are a brilliant project manager (the AI) trying to get a complex job done, like planning a trip or fixing a piece of software. You have a team of specialists (the functions) who can book flights, check weather, or write code.
The Old Way: The "Waiting Room" Problem
In the current standard way of doing things, your project manager is very polite but incredibly inefficient.
- You ask a specialist to book a flight.
- The specialist goes to the counter to do the work.
- The project manager sits frozen, staring at a wall, doing absolutely nothing, until the specialist comes back with the ticket.
- Only then does the manager ask the next question (e.g., "Now, what's the weather at that airport?").
If you have three tasks that take 10 seconds each, the whole process takes 30 seconds of pure waiting time. The manager is idle for 20 of those seconds. This is what the paper calls synchronous execution.
The New Way: AsyncFC (The "Magic Clipboard")
The researchers at UC Berkeley introduced a new system called AsyncFC. Think of it as giving the project manager a Magic Clipboard and a Super-Fast Assistant.
Here is how it works:
- You ask the specialist to book a flight.
- The specialist takes the request and immediately hands you a Magic Ticket Stub (called a "Future" in the paper). This stub says, "Your flight is booked; I'll bring the actual ticket back in 10 seconds."
- Crucially, the project manager does NOT stop. They immediately look at the stub, say "Got it," and move on to the next task (checking the weather) while the flight booking is still happening in the background.
- The specialist finishes the flight booking in the background. When they are done, they quietly slip the real ticket onto the manager's desk.
- If the manager needs the ticket to book a hotel, they just look at the desk, see the ticket has arrived, and use it. If the hotel doesn't need the ticket yet, the manager keeps working on other things.
The Two Big Superpowers
This system creates two types of speedups:
1. Overlapping Work (The "Multitasking" Effect)
Instead of waiting for Task A to finish before starting Task B, the manager is doing Task B while Task A is being processed. This is like a chef chopping vegetables while a pot of soup is boiling, rather than waiting for the soup to boil before picking up the knife.
2. Parallel Specialists (The "Team Huddle" Effect)
Sometimes, you need to book a flight and rent a car. These two tasks don't depend on each other.
- Old Way: Book flight (wait 10s) -> Rent car (wait 10s). Total: 20s.
- AsyncFC: The manager asks for both at once. The system sends both requests to different specialists who work at the same time. The manager gets both stubs immediately and keeps working. The total time is just 10 seconds.
The "Smart Scheduler"
You might worry: "What if the manager asks for the hotel before the flight ticket is ready? That would be a disaster!"
The paper introduces a Smart Scheduler (a traffic cop) that sits between the manager and the specialists.
- It knows which tasks depend on others.
- If the hotel booking needs the flight ticket, the scheduler holds the hotel request in a "waiting room" until the flight ticket arrives.
- If the hotel booking doesn't need the ticket, it lets the specialist start working immediately.
- This ensures the manager never gets confused or tries to use a result that doesn't exist yet, all without the manager needing to change their behavior.
What Did They Prove?
The researchers tested this on real-world tasks like:
- Web Search: Finding information across multiple websites.
- Software Engineering: Fixing bugs in code (using a tool called SWE-agent).
- Complex Reasoning: Answering questions that require multiple steps (like HotpotQA).
The Results:
- Speed: The tasks finished much faster (up to 1.44 times faster in software engineering tasks).
- Accuracy: The quality of the answers did not drop. The AI was just as smart, just much faster.
- No Training Needed: They didn't have to re-teach the AI how to think. They just changed the "execution layer" (the system running the tasks). The AI naturally understood the "Magic Ticket Stubs" because it had seen similar concepts in its training data.
The Bottom Line
AsyncFC is like upgrading a factory from a single-lane road where cars stop at every intersection, to a smart highway system where cars can merge, overtake, and arrive at different times without crashing. It makes AI agents faster by letting them keep working while waiting for answers, without breaking the rules of how they talk to tools.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.