-
Couldn't load subscription status.
- Fork 2
Add CombinedCodeSearchTool for unified code search #77
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
- Added a combined tool that uses MS Marco MiniLM cross encoder for reranking - Fixed a minor bug in _sort_results
- updated constructor to invoke base constructor first to avoid explicitly setting the config
|
@pranath-reddy could you confirm if it can also accept the code search input schema? |
|
And in the usage section could you also add different code search tools as parameters list to let know that it's the original purpose |
It doesn't work. Should I add |
Yes. Let's do it |
- added `top_k` as a computed field directly to `CodeSearchToolInputSchema`
Summary 📝
This PR adds the implementation of the
CombinedCodeSearchTool, which aggregates results from multiple code search tools and reranks them using a pretrainedCrossEncodermodel. The combined tool queries the local semantic code search, GitHub keyword-based search (via SearxNG), and the SDE API-based search, returning a unified and ranked list of relevant code repositories.Details
CombinedCodeSearchToolunderakd.tools.code_searchto support unified querying across multiple search tools.LocalRepoCodeSearchToolfor vector similarity search over local repositoriesGitHubCodeSearchToolfor keyword-based GitHub repository search via SearxNGSDECodeSearchToolfor querying the NASA SDE code search APICrossEncodermodel (e.g.,cross-encoder/ms-marco-MiniLM-L6-v2)SearchResultItemformat with additional metadata:extra["tool"]stores the source tool nameextra["score"]stores the reranker score assigned by the CrossEncoderUsage
Bugfixes 🐛
_sort_resultswhereresult["extra"]was incorrectly used to access theextrafield ofSearchResultItem. It is now correctly accessed asresult.extra.