-
Notifications
You must be signed in to change notification settings - Fork 35
feat(W-19126747): use RAG to list tools #129
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
base: main
Are you sure you want to change the base?
Conversation
const filteredResults = searchResults.labels | ||
.map((id) => assets.tools.find((c) => c.id === id)!) | ||
.filter((tool) => !enabledToolNames.has(tool.name)) | ||
.slice(0, 5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought: What if we had the "return count" be a parameter that defaults to 5
? We could instruct the LLM to increase the tools or commands returned if the user does not initially find the tool/command they are looking for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Filter search results to exclude enabled tools and get top 5 | ||
const filteredResults = searchResults.labels | ||
.map((id) => assets.tools.find((c) => c.id === id)!) | ||
.filter((tool) => !enabledToolNames.has(tool.name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This !enabledToolName
might cause some trouble... Check out this video, it all looked like it was going well until the model chose to run sf-list-all-tools
a second time. Since the result filters out enabled tools, the sf-query-org
tool was not returned the second time and it chose to build an sf command instead.
In the second call the query was:
{
"query": "query SOQL records from Salesforce org"
}
Maybe this can be fixed by tweaking the description? Something like: "Don't run this tool twice for the same basic query." or "Always check enabled tools before running sf-list-all-tools
?
What does this PR do?
Implements a RAG for listing tools so that we can limit the amount of tokens used when calling
sf-list-tools
What issues does this PR fix or reference?
@W-19126747@