Conversation
| def ds_serve_search( | ||
| query: str, | ||
| n_docs: int = 10, | ||
| backend: str = "diskann", |
There was a problem hiding this comment.
[optional] Consider removing the number of parameters in the ds_serve_search function.
If someone else uses the vanilla MCP server, all the arguments will be exposed to the llm. The model may not work relatively poorly when fed with this many options (and they are not sure how to parse it). We can simply remove some of the options from the function args?
| ## Calling Tools (<call_tool name="...">query</call_tool>) | ||
| - You can use the following tools: | ||
|
|
||
| 1. ds_serve_search |
There was a problem hiding this comment.
Perhaps we should make the name more generalizable, e.g., something like semantic search?
This is debatable, but in my view, our agent model do not need know the exact configuration of the tool -- what matters more is its intended purposes (and functions). My hunch is that if calling this with a more general name (e.g., semantic/vector search) then the LM can use some of the pre-trained knowledge to come up with search queries, compared to using a very specific name like DS_Search?
| @@ -0,0 +1,52 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
this feels less of a test for this library, but for testing if the ds server is functioning? I guess then we can move it to the tool documentations etc (which I should have added one lmao)
Add DS Serve Search Tool Integration
Summary
This PR integrates the DS Serve API as a new search tool (
ds_serve_search) for dense passage retrieval from CompactDS (2B passages) using dual ANN backends (DiskANN + IVFPQ).Tool Details
Tool Name
ds_serve_searchTool Parameters
Example Usage
System Prompt
Added new system prompt version
v20250907_with_ds_servethat includes documentation for theds_serve_searchtool. The prompt instructs the model to:ds_serve_searchfor dense passage retrieval from a 2B passage collectionImplementation
agent/dr_agent/mcp_backend/apis/ds_serve_apis.py- Handles API communication and response parsingagent/dr_agent/mcp_backend/main.py- Registersds_serve_searchas an MCP toolagent/dr_agent/tool_interface/mcp_tools.py-DSServeSearchToolclass for Python integrationagent/dr_agent/shared_prompts/unified_tool_calling_v20250907_with_ds_serve.yamlauto_search_sft.pyto support DS Serve as a search tool optionConfiguration
The tool can be configured via YAML config files (e.g.,
auto_search_sft_ds_serve.yaml) with options for: