Skip to content

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

update example

yzlin83fb239bb745
diff --git a/examples/di/machine_learning_complex.py b/examples/di/machine_learning_complex.py
deleted file mode 100644
index 42059ac4f..000000000
--- a/examples/di/machine_learning_complex.py
+++ /dev/null
@@ -1,16 +0,0 @@
-import asyncio
-
-from metagpt.roles.di.data_interpreter import DataInterpreter
-
-
-async def main(requirement: str):
- role = DataInterpreter(use_reflection=True, tools=["<all>"])
- await role.run(requirement)
-
-
-if __name__ == "__main__":
- data_path = "your_path_to_icr/icr-identify-age-related-conditions"
- train_path = f"{data_path}/your_train_data.csv"
- eval_path = f"{data_path}/your_eval_data.csv"
- requirement = f"This is a medical dataset with over fifty anonymized health characteristics linked to three age-related conditions. Your goal is to predict whether a subject has or has not been diagnosed with one of these conditions.The target column is Class. Perform data analysis, data preprocessing, feature engineering, and modeling to predict the target. Report f1 score on the eval data. Train data path: {train_path}, eval data path:{eval_path}."
- asyncio.run(main(requirement))
diff --git a/examples/di/machine_learning_with_tools.py b/examples/di/machine_learning_with_tools.py
new file mode 100644
index 000000000..291e734c8
--- /dev/null
+++ b/examples/di/machine_learning_with_tools.py
@@ -0,0 +1,16 @@
+import asyncio
+
+from metagpt.roles.di.data_interpreter import DataInterpreter
+
+
+async def main(requirement: str):
+ role = DataInterpreter(use_reflection=True, tools=["<all>"])
+ await role.run(requirement)
+
+
+if __name__ == "__main__":
+ data_path = "your/path/to/titanic"
+ train_path = f"{data_path}/split_train.csv"
+ eval_path = f"{data_path}/split_eval.csv"
+ requirement = f"This is a titanic passenger survival dataset, your goal is to predict passenger survival outcome. The target column is Survived. Perform data analysis, data preprocessing, feature engineering, and modeling to predict the target. Report accuracy on the eval data. Train data path: '{train_path}', eval data path: '{eval_path}'."
+ asyncio.run(main(requirement))