cryogenic22 commited on
Commit
a81dc95
·
verified ·
1 Parent(s): a10143f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +120 -120
app.py CHANGED
@@ -167,14 +167,14 @@ def create_research_crew(topic: str):
167
  search_tool = SerperDevTool()
168
  log_agent_activity("System", "Initialized SerperDev search tool")
169
 
170
- researcher = Agent(
171
  role='Research Analyst',
172
  goal=f'Conduct exhaustive market research about {topic} with comprehensive analysis and multiple data sources',
173
  backstory="""You are a senior market research analyst with 15+ years of experience in conducting
174
- detailed industry analysis. You excel at gathering in-depth market data, analyzing industry trends,
175
- and identifying market patterns through multiple verified sources. You always ensure data accuracy
176
- and provide contextual analysis alongside raw data. You're known for producing comprehensive
177
- research reports that combine quantitative data with qualitative insights.""",
178
  tools=[search_tool],
179
  verbose=True
180
  )
@@ -183,10 +183,10 @@ def create_research_crew(topic: str):
183
  role='Data Analyst',
184
  goal='Transform research data into profound market insights with detailed analysis and visualizations',
185
  backstory="""You are an expert data analyst and market intelligence specialist with deep expertise
186
- in converting complex market data into actionable insights. You specialize in predictive analytics,
187
- trend analysis, and creating data visualizations that tell compelling stories. You have a
188
- track record of identifying hidden market opportunities and providing nuanced analysis of market dynamics.
189
- You excel at breaking down complex market phenomena into understandable insights.""",
190
  tools=[search_tool],
191
  verbose=True
192
  )
@@ -195,10 +195,10 @@ def create_research_crew(topic: str):
195
  role='Report Writer',
196
  goal='Create extensive, professional market research reports with compelling narratives and insights',
197
  backstory="""You are a seasoned business writer and market research expert who specializes in creating
198
- comprehensive, engaging market research reports. You excel at weaving data and insights into compelling
199
- narratives that provide deep understanding of market dynamics. You're skilled at creating well-structured,
200
- detailed reports that maintain reader engagement while delivering thorough analysis. You're known for your
201
- ability to explain complex market dynamics in clear, professional language while maintaining attention to detail.""",
202
  verbose=True
203
  )
204
 
@@ -207,39 +207,39 @@ def create_research_crew(topic: str):
207
  Conduct exhaustive market research on {topic} with:
208
 
209
  1. Comprehensive Market Overview:
210
- - Detailed market size analysis (historical, current, and projected)
211
- - Growth rates and CAGR with supporting rationale
212
- - Market segmentation analysis (by type, application, region, etc.)
213
- - Value chain analysis
214
- - Pricing analysis and trends
215
- - Regional market breakdowns with specific data points
216
- - Key market metrics and KPIs
217
 
218
  2. In-depth Competitive Analysis:
219
- - Detailed profiles of key players
220
- - Market share analysis with historical trends
221
- - Competitive strategies and positioning
222
- - Recent developments and their impact
223
- - SWOT analysis of major players
224
- - Competitive advantages and differentiators
225
- - Market concentration and fragmentation analysis
226
 
227
  3. Extensive Market Dynamics:
228
- - Detailed analysis of growth drivers with specific examples
229
- - Comprehensive examination of market challenges
230
- - Emerging trends with supporting data
231
- - Regulatory landscape and its impact
232
- - Technology impact assessment
233
- - Patent analysis and innovation trends
234
- - Consumer behavior analysis
235
- - Supply-demand gap analysis
236
 
237
  4. Economic and External Factors:
238
- - Macroeconomic influences
239
- - Industry-specific economic indicators
240
- - Global and regional economic impacts
241
- - Trade dynamics and supply chain analysis
242
- - Investment patterns and M&A activity
243
 
244
  Use multiple sources for verification and cross-reference all data points.
245
  Include case studies and specific examples where relevant.
@@ -255,48 +255,48 @@ def create_research_crew(topic: str):
255
  Perform comprehensive analysis of the research findings:
256
 
257
  1. Strategic Market Analysis:
258
- - Detailed 5-year growth projections with scenario analysis
259
- - Market maturity assessment
260
- - Porter's Five Forces analysis
261
- - Market attractiveness analysis
262
- - Investment opportunity assessment
263
- - Risk analysis and mitigation strategies
264
 
265
  2. Advanced Data Analysis:
266
- - Time series analysis of key metrics
267
- - Correlation analysis between market factors
268
- - Market share evolution analysis
269
- - Price sensitivity analysis
270
- - Demand forecasting models
271
- - Regional market potential assessment
272
- - Market penetration analysis
273
 
274
  3. Competitive Intelligence:
275
- - Detailed competitor benchmarking
276
- - Market positioning matrix
277
- - Strategic group mapping
278
- - Competitive strategy analysis
279
- - Market entry barriers assessment
280
- - Future competitive scenarios
281
 
282
  4. Trend Analysis:
283
- - Technology adoption curves
284
- - Consumer trend analysis
285
- - Innovation impact assessment
286
- - Market disruption analysis
287
- - Future market scenarios
288
- - Emerging opportunities assessment
289
 
290
  Create visualization-ready data for:
291
- - Market size and growth trends
292
- - Competitive landscape maps
293
- - Regional distribution charts
294
- - Market share evolution
295
- - Value chain analysis
296
- - Technology adoption curves
297
- - Price trend analysis
298
- - Market segmentation
299
- - Key player comparison matrices
300
 
301
  Include specific metrics, percentages, and growth rates.
302
  Provide context and implications for all analyses.
@@ -312,54 +312,54 @@ def create_research_crew(topic: str):
312
  Create an extensive professional report including:
313
 
314
  1. Executive Summary (3-4 pages):
315
- - Key findings and insights
316
- - Critical market metrics
317
- - Major trends and developments
318
- - Strategic implications
319
- - Investment opportunities
320
- - Future outlook
321
- - Key recommendations
322
 
323
  2. Comprehensive Market Analysis (15-20 pages):
324
- a) Market Overview
325
- - Market definition and segmentation
326
- - Market size and growth analysis
327
- - Value chain analysis
328
- - Market structure and dynamics
329
- - Regional market analysis
330
- - Pricing analysis
331
-
332
- b) Competitive Landscape
333
- - Market share analysis
334
- - Key player profiles
335
- - Competitive strategies
336
- - Market positioning
337
- - SWOT analysis
338
- - Recent developments
339
-
340
- c) Market Dynamics
341
- - Growth drivers analysis
342
- - Market challenges
343
- - Opportunity assessment
344
- - Trend analysis
345
- - Technology impact
346
- - Regulatory framework
347
-
348
- d) Future Outlook
349
- - Market forecasts
350
- - Trend projections
351
- - Scenario analysis
352
- - Strategic recommendations
353
- - Risk analysis
354
- - Success factors
355
 
356
  3. Appendices
357
- - Detailed methodology
358
- - Data tables
359
- - Additional charts and graphs
360
- - Case studies
361
- - Glossary
362
- - Sources and citations
363
 
364
  Format as JSON:
365
  {{
@@ -401,8 +401,8 @@ def create_research_crew(topic: str):
401
  expected_output="Comprehensive JSON containing detailed executive summary and full report",
402
  context=[research_task, analysis_task]
403
  )
404
-
405
- return Crew(
406
  agents=[researcher, analyst, writer],
407
  tasks=[research_task, analysis_task, report_task],
408
  verbose=True,
 
167
  search_tool = SerperDevTool()
168
  log_agent_activity("System", "Initialized SerperDev search tool")
169
 
170
+ researcher = Agent(
171
  role='Research Analyst',
172
  goal=f'Conduct exhaustive market research about {topic} with comprehensive analysis and multiple data sources',
173
  backstory="""You are a senior market research analyst with 15+ years of experience in conducting
174
+ detailed industry analysis. You excel at gathering in-depth market data, analyzing industry trends,
175
+ and identifying market patterns through multiple verified sources. You always ensure data accuracy
176
+ and provide contextual analysis alongside raw data. You're known for producing comprehensive
177
+ research reports that combine quantitative data with qualitative insights.""",
178
  tools=[search_tool],
179
  verbose=True
180
  )
 
183
  role='Data Analyst',
184
  goal='Transform research data into profound market insights with detailed analysis and visualizations',
185
  backstory="""You are an expert data analyst and market intelligence specialist with deep expertise
186
+ in converting complex market data into actionable insights. You specialize in predictive analytics,
187
+ trend analysis, and creating data visualizations that tell compelling stories. You have a
188
+ track record of identifying hidden market opportunities and providing nuanced analysis of market dynamics.
189
+ You excel at breaking down complex market phenomena into understandable insights.""",
190
  tools=[search_tool],
191
  verbose=True
192
  )
 
195
  role='Report Writer',
196
  goal='Create extensive, professional market research reports with compelling narratives and insights',
197
  backstory="""You are a seasoned business writer and market research expert who specializes in creating
198
+ comprehensive, engaging market research reports. You excel at weaving data and insights into compelling
199
+ narratives that provide deep understanding of market dynamics. You're skilled at creating well-structured,
200
+ detailed reports that maintain reader engagement while delivering thorough analysis. You're known for your
201
+ ability to explain complex market dynamics in clear, professional language while maintaining attention to detail.""",
202
  verbose=True
203
  )
204
 
 
207
  Conduct exhaustive market research on {topic} with:
208
 
209
  1. Comprehensive Market Overview:
210
+ - Detailed market size analysis (historical, current, and projected)
211
+ - Growth rates and CAGR with supporting rationale
212
+ - Market segmentation analysis (by type, application, region, etc.)
213
+ - Value chain analysis
214
+ - Pricing analysis and trends
215
+ - Regional market breakdowns with specific data points
216
+ - Key market metrics and KPIs
217
 
218
  2. In-depth Competitive Analysis:
219
+ - Detailed profiles of key players
220
+ - Market share analysis with historical trends
221
+ - Competitive strategies and positioning
222
+ - Recent developments and their impact
223
+ - SWOT analysis of major players
224
+ - Competitive advantages and differentiators
225
+ - Market concentration and fragmentation analysis
226
 
227
  3. Extensive Market Dynamics:
228
+ - Detailed analysis of growth drivers with specific examples
229
+ - Comprehensive examination of market challenges
230
+ - Emerging trends with supporting data
231
+ - Regulatory landscape and its impact
232
+ - Technology impact assessment
233
+ - Patent analysis and innovation trends
234
+ - Consumer behavior analysis
235
+ - Supply-demand gap analysis
236
 
237
  4. Economic and External Factors:
238
+ - Macroeconomic influences
239
+ - Industry-specific economic indicators
240
+ - Global and regional economic impacts
241
+ - Trade dynamics and supply chain analysis
242
+ - Investment patterns and M&A activity
243
 
244
  Use multiple sources for verification and cross-reference all data points.
245
  Include case studies and specific examples where relevant.
 
255
  Perform comprehensive analysis of the research findings:
256
 
257
  1. Strategic Market Analysis:
258
+ - Detailed 5-year growth projections with scenario analysis
259
+ - Market maturity assessment
260
+ - Porter's Five Forces analysis
261
+ - Market attractiveness analysis
262
+ - Investment opportunity assessment
263
+ - Risk analysis and mitigation strategies
264
 
265
  2. Advanced Data Analysis:
266
+ - Time series analysis of key metrics
267
+ - Correlation analysis between market factors
268
+ - Market share evolution analysis
269
+ - Price sensitivity analysis
270
+ - Demand forecasting models
271
+ - Regional market potential assessment
272
+ - Market penetration analysis
273
 
274
  3. Competitive Intelligence:
275
+ - Detailed competitor benchmarking
276
+ - Market positioning matrix
277
+ - Strategic group mapping
278
+ - Competitive strategy analysis
279
+ - Market entry barriers assessment
280
+ - Future competitive scenarios
281
 
282
  4. Trend Analysis:
283
+ - Technology adoption curves
284
+ - Consumer trend analysis
285
+ - Innovation impact assessment
286
+ - Market disruption analysis
287
+ - Future market scenarios
288
+ - Emerging opportunities assessment
289
 
290
  Create visualization-ready data for:
291
+ - Market size and growth trends
292
+ - Competitive landscape maps
293
+ - Regional distribution charts
294
+ - Market share evolution
295
+ - Value chain analysis
296
+ - Technology adoption curves
297
+ - Price trend analysis
298
+ - Market segmentation
299
+ - Key player comparison matrices
300
 
301
  Include specific metrics, percentages, and growth rates.
302
  Provide context and implications for all analyses.
 
312
  Create an extensive professional report including:
313
 
314
  1. Executive Summary (3-4 pages):
315
+ - Key findings and insights
316
+ - Critical market metrics
317
+ - Major trends and developments
318
+ - Strategic implications
319
+ - Investment opportunities
320
+ - Future outlook
321
+ - Key recommendations
322
 
323
  2. Comprehensive Market Analysis (15-20 pages):
324
+ a) Market Overview
325
+ - Market definition and segmentation
326
+ - Market size and growth analysis
327
+ - Value chain analysis
328
+ - Market structure and dynamics
329
+ - Regional market analysis
330
+ - Pricing analysis
331
+
332
+ b) Competitive Landscape
333
+ - Market share analysis
334
+ - Key player profiles
335
+ - Competitive strategies
336
+ - Market positioning
337
+ - SWOT analysis
338
+ - Recent developments
339
+
340
+ c) Market Dynamics
341
+ - Growth drivers analysis
342
+ - Market challenges
343
+ - Opportunity assessment
344
+ - Trend analysis
345
+ - Technology impact
346
+ - Regulatory framework
347
+
348
+ d) Future Outlook
349
+ - Market forecasts
350
+ - Trend projections
351
+ - Scenario analysis
352
+ - Strategic recommendations
353
+ - Risk analysis
354
+ - Success factors
355
 
356
  3. Appendices
357
+ - Detailed methodology
358
+ - Data tables
359
+ - Additional charts and graphs
360
+ - Case studies
361
+ - Glossary
362
+ - Sources and citations
363
 
364
  Format as JSON:
365
  {{
 
401
  expected_output="Comprehensive JSON containing detailed executive summary and full report",
402
  context=[research_task, analysis_task]
403
  )
404
+
405
+ return Crew(
406
  agents=[researcher, analyst, writer],
407
  tasks=[research_task, analysis_task, report_task],
408
  verbose=True,