Skip to content

⚡ Bolt: [performance improvement] Concurrent tool execution in Retrieval Pipelines#90

Draft
ishaanxgupta wants to merge 1 commit intomainfrom
bolt-concurrent-tools-3952276918833983431
Draft

⚡ Bolt: [performance improvement] Concurrent tool execution in Retrieval Pipelines#90
ishaanxgupta wants to merge 1 commit intomainfrom
bolt-concurrent-tools-3952276918833983431

Conversation

@ishaanxgupta
Copy link
Member

💡 What: The optimization refactors sequential for loops into concurrent execution using asyncio.gather for LLM tool executions (_execute_tool) in both RetrievalPipeline and CodeRetrievalPipeline. It also refactors _search_symbols and _search_files to search multiple repositories in parallel.

🎯 Why: When an LLM decides to use multiple tools (e.g., searching for semantic vectors, asking a graph database, looking up profiles), these calls are independent. Sequentially executing them in a for loop unnecessarily throttles the process and compounds external latency. Fetching them concurrently hides the latency behind the slowest request.

📊 Impact: Reduces total tool execution time significantly. If the LLM makes 3 tool calls taking 200ms, 300ms, and 400ms respectively, the wait time drops from ~900ms to ~400ms. Similarly, querying 5 repositories will now be as fast as the single slowest repository query.

🔬 Measurement: Use telemetry logs; trace the elapsed time tool_ms for tool execution blocks and note the overall turn execution time dropping linearly with the number of parallel tools called.


PR created automatically by Jules for task 3952276918833983431 started by @ishaanxgupta

…val pipelines to use asyncio.gather for parallel tool calls and multi-repo searches, drastically reducing latency by avoiding sequential network bottlenecks.
@google-labs-jules
Copy link

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant