-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(langchain): add a big tool middleware #8979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
3fa3ea4 to
d37d752
Compare
1da820f to
04fc794
Compare
|
Closing in favor of #9050 |
Add BigToolMiddleware for Dynamic Tool Selection
This PR introduces a new BigToolMiddleware that enables intelligent tool selection for agents with large tool sets (1000+ tools), preventing context window explosion while maintaining functionality.
When agents have access to hundreds or thousands of tools, sending all tool descriptions with every model request can:
Solution
The BigToolMiddleware dynamically selects only the most relevant tools for each query using configurable strategies:
Usage Examples
Basic Keyword Strategy
Semantic Similarity Strategy
Custom Selection Logic