Commit
·
43c89ca
1
Parent(s):
b4020b9
Update args limit
Browse filesSigned-off-by: Aivin V. Solatorio <avsolatorio@gmail.com>
- mcp_client.py +2 -0
- wdi_mcp_server.py +2 -2
mcp_client.py
CHANGED
@@ -39,6 +39,8 @@ SYSTEM_PROMPT = f"""You are a helpful assistant. Today is {datetime.now().strfti
|
|
39 |
|
40 |
You **do not** have prior knowledge of the World Development Indicators (WDI) data. Instead, you must rely entirely on the tools available to you to answer the user's questions.
|
41 |
|
|
|
|
|
42 |
### Your Instructions:
|
43 |
|
44 |
1. **Tool Use Only**:
|
|
|
39 |
|
40 |
You **do not** have prior knowledge of the World Development Indicators (WDI) data. Instead, you must rely entirely on the tools available to you to answer the user's questions.
|
41 |
|
42 |
+
When responding you must always plan the steps and enumerate all the tools that you plan to use to answer the user's query.
|
43 |
+
|
44 |
### Your Instructions:
|
45 |
|
46 |
1. **Tool Use Only**:
|
wdi_mcp_server.py
CHANGED
@@ -13,11 +13,11 @@ mcp = FastMCP("wdi_data_mcp")
|
|
13 |
async def search_relevant_indicators(
|
14 |
query: str, top_k: int = 1
|
15 |
) -> dict[str, list[services.SearchOutput] | str]:
|
16 |
-
"""Search for a shortlist of relevant indicators from the World Development Indicators (WDI) given the query. The search ranking may not be optimal, so the LLM may use this as shortlist and pick the most relevant from the list (if any).
|
17 |
|
18 |
Args:
|
19 |
query: The search query by the user or one formulated by an LLM based on the user's prompt.
|
20 |
-
top_k: The number of shortlisted indicators that will be returned that are semantically related to the query.
|
21 |
|
22 |
Returns:
|
23 |
A dictionary with keys `indicators` and `note`. The `indicators` key contains a list of indicator objects with keys indicator code/idno and name. The `note` key contains a note about the search.
|
|
|
13 |
async def search_relevant_indicators(
|
14 |
query: str, top_k: int = 1
|
15 |
) -> dict[str, list[services.SearchOutput] | str]:
|
16 |
+
"""Search for a shortlist of relevant indicators from the World Development Indicators (WDI) given the query. The search ranking may not be optimal, so the LLM may use this as shortlist and pick the most relevant from the list (if any). You, as an LLM, must always get at least `top_k=20` for better recall.
|
17 |
|
18 |
Args:
|
19 |
query: The search query by the user or one formulated by an LLM based on the user's prompt.
|
20 |
+
top_k: The number of shortlisted indicators that will be returned that are semantically related to the query. IMPORTANT: You, as an LLM, must ALWAYS set this argument to at least 20.
|
21 |
|
22 |
Returns:
|
23 |
A dictionary with keys `indicators` and `note`. The `indicators` key contains a list of indicator objects with keys indicator code/idno and name. The `note` key contains a note about the search.
|