-
Notifications
You must be signed in to change notification settings - Fork 37
vector search: add reranker parameter #216
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
fd865e4 to
972b9fc
Compare
| filters=filter, | ||
| num_results=k, | ||
| query_type=query_type, | ||
| reranker=self._reranker, |
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.
Since we previously recommended that people pass reranker through kwargs, can we make sure that adding this won't accidentally break this function (duplicate keyword arg) for those who are passing reranker that way?
| filters=filter, | ||
| num_results=fetch_k, | ||
| query_type=query_type, | ||
| reranker=self._reranker, |
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.
Same thing here
972b9fc to
040644b
Compare
|
@annzhang-db updated :) |
Test Plan: ``` $ uv run ipython ... In [1]: from databricks_langchain import VectorSearchRetrieverTool, ChatDatabricks In [2]: help(VectorSearchRetrieverTool) class VectorSearchRetrieverTool(langchain_core.tools.base.BaseTool, databricks_ai_bridge.vector_search_retriever_tool.VectorSearchRetrieverToolMixin) | VectorSearchRetrieverTool( | *, ... | reranker: databricks.vector_search.reranker.DatabricksReranker | None = None, ``` `reranker` now appears in the parameter list. Tests: ``` $ uv run pytest integrations/langchain/tests/unit_tests ... =============================================== 4 failed, 194 passed, 2 skipped, 588 warnings in 2.27s =============================================== # Pre-existing issues $ uv run pytest integrations/llamaindex/tests/unit_tests ... ========================================================== 112 passed, 88 warnings in 1.60s ========================================================== $ uv run pytest integrations/openai/tests/unit_tests ... ========================================================== 50 passed, 923 warnings in 1.76s ========================================================== ```
040644b to
3591df7
Compare
Add reranker parameter to various vector search tools in our integration libraries to make it more obvious this is supported.
Test Plan:
rerankernow appears in the parameter list.Tests: