Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

use keyword retriever for DataAnalyst

lidanyang46e7c2c05c13
diff --git a/metagpt/strategy/experience_retriever.py b/metagpt/strategy/experience_retriever.py
index 63ca4fcbd..04807ebec 100644
--- a/metagpt/strategy/experience_retriever.py
+++ b/metagpt/strategy/experience_retriever.py
@@ -638,6 +638,8 @@ class KeywordExpRetriever(ExpRetriever):
return DEPLOY_EXAMPLE
elif "issue" in context.lower():
return FIX_ISSUE_EXAMPLE
+ elif "https:" or "http:" in context.lower():
+ return WEB_SCRAPING_EXAMPLE
elif exp_type == "task":
if "diagnose" in context.lower():
return SEARCH_SYMBOL_EXAMPLE
@@ -1018,10 +1020,3 @@ Here is the command to finish the current task and parse the html content:
...
"""
-
-
-class WebExpRetriever(ExpRetriever):
- """A simple experience retriever that returns manually crafted examples."""
-
- def retrieve(self, context: str = "") -> str:
- return WEB_SCRAPING_EXAMPLE
diff --git a/tests/metagpt/roles/di/run_data_analyst.py b/tests/metagpt/roles/di/run_data_analyst.py
index 9c1f72394..445f8f800 100644
--- a/tests/metagpt/roles/di/run_data_analyst.py
+++ b/tests/metagpt/roles/di/run_data_analyst.py
@@ -33,7 +33,7 @@ NEWS_36KR_REQ = """从36kr创投平台https://pitchhub.36kr.com/financing-flash
"""
WIKIPEDIA_SEARCH_REQ = """
-Search for `LLM` on Wikipedia and print all the meaningful significances of the entry.
+Search for `LLM` on https://www.wikipedia.org/ and print all the meaningful significances of the entry.
"""
STACKOVERFLOW_CLICK_REQ = """