add eda prompt

This commit is contained in:
lidanyang 2024-02-07 12:02:46 +08:00
parent 7fff68d564
commit f51df40ebb
2 changed files with 13 additions and 1 deletions

View file

@ -1,3 +1,10 @@
# Prompt for using tools of "eda" type
EDA_PROMPT = """
The current task is about exploratory data analysis, please note the following:
- Distinguish column types with `select_dtypes` for tailored analysis and visualization, such as correlation.
- Remember to `import numpy as np` before using Numpy functions.
"""
# Prompt for using tools of "data_preprocess" type
DATA_PREPROCESS_PROMPT = """
The current task is about data preprocessing, please note the following:

View file

@ -1,6 +1,7 @@
from enum import Enum
from metagpt.prompts.tool_types import (
EDA_PROMPT,
DATA_PREPROCESS_PROMPT,
FEATURE_ENGINEERING_PROMPT,
IMAGE2WEBPAGE_PROMPT,
@ -11,7 +12,11 @@ from metagpt.tools.tool_data_type import ToolTypeDef
class ToolType(Enum):
EDA = ToolTypeDef(name="eda", desc="For performing exploratory data analysis")
EDA = ToolTypeDef(
name="eda",
desc="For performing exploratory data analysis",
usage_prompt=EDA_PROMPT,
)
DATA_PREPROCESS = ToolTypeDef(
name="data_preprocess",
desc="Only for changing value inplace.",