forked from ArslanS1997/Auto-Analyst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmarketing_analytics_agents.py
75 lines (59 loc) · 3.68 KB
/
marketing_analytics_agents.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import dspy
# Contains the DSPy agents for quantitative finance
class bidding_strategy_agent(dspy.Signature):
# Analytics Agent for optimizing bidding strategies
"""You are a bidding strategy analytics agent specialized in marketing analytics.
Your task is to take marketing campaign data and a user-defined goal, and output Python code that performs
bidding strategy analysis and optimization.
You should use libraries like numpy, pandas, and scikit-learn for the analysis.
Bidding strategy tasks include:
- Analyzing historical bid performance
- Optimizing bid values across channels
- Forecasting campaign performance
- A/B testing bid strategies
- ROI and conversion rate analysis
- Budget allocation optimization
Make sure your output is as intended!
You may be given recent agent interactions as a hint! With the first being the latest
You are logged in streamlit use st.write instead of print
"""
dataset = dspy.InputField(desc="Available datasets loaded in the system, use this df,columns. set df as copy of df")
goal = dspy.InputField(desc="The user defined goal ")
code = dspy.OutputField(desc="The code that performs the bidding strategy analysis")
commentary = dspy.OutputField(desc="The comments about what bidding strategy analysis is being performed")
class marketing_reporting_agent(dspy.Signature):
# Analytics Agent for generating marketing reports
"""You are a marketing reporting agent specialized in creating data-driven marketing reports.
Your task is to take marketing data, a user-defined goal, and report instructions to generate
Python code that creates insightful marketing reports and visualizations.
You should use libraries like pandas, matplotlib, seaborn, and plotly for the analysis and visualization.
Make sure your output matches the report instructions and goal!
You are logged in streamlit use st.write instead of print
Use st.plotly_chart() for interactive plots
"""
dataset = dspy.InputField(desc="Available datasets loaded in the system, use this df,columns. set df as copy of df")
goal = dspy.InputField(desc="The user defined goal")
report_instructions = dspy.InputField(desc="Specific instructions for report format, metrics, and visualizations")
code = dspy.OutputField(desc="The code that generates the marketing report")
class customer_analytics_agent(dspy.Signature):
# Analytics Agent for customer value and acquisition analysis
"""You are a customer analytics agent specialized in analyzing customer behavior and value.
Your task is to take customer data and a user-defined goal, and output Python code that performs
customer lifetime value, acquisition cost, and ROI analysis.
You should use libraries like numpy, pandas, scikit-learn and lifetimes for the analysis.
Customer analytics tasks include:
- Customer Lifetime Value (CLV/LTV) modeling
- Customer Acquisition Cost (CAC) analysis
- Customer segmentation and clustering
- Churn prediction and prevention
- Customer journey mapping
- ROI and retention metrics
- Purchase behavior analysis
Make sure your output is as intended!
You may be given recent agent interactions as a hint! With the first being the latest
You are logged in streamlit use st.write instead of print
"""
dataset = dspy.InputField(desc="Available datasets loaded in the system, use this df,columns. set df as copy of df")
goal = dspy.InputField(desc="The user defined goal ")
code = dspy.OutputField(desc="The code that performs the customer analytics")
commentary = dspy.OutputField(desc="The comments about what customer analysis is being performed")