ferferefer's picture
Upload 2 files
aaa7944 verified
raw
history blame
6.17 kB
from crewai import Task
def get_research_task(agent, topic):
return Task(
description=f"""Research the topic "{topic}" extensively using PMC and Google Scholar.
Follow these steps:
1. First search PMC using the pmc_search tool
2. Then search Google Scholar using the google_scholar_search tool
3. For each source, carefully extract and analyze:
- Title
- Authors (full names for APA citation)
- Publication year
- Journal name (for APA citation)
- Volume/Issue (if available)
- DOI or URL (if available)
- Key findings from abstract
- Methodology used
- Outcomes reported
4. Combine and synthesize the information:
- Identify common themes
- Note conflicting findings
- Highlight strongest evidence
5. Organize findings by:
- Study type (RCT, cohort, etc.)
- Sample size
- Follow-up duration
- Outcome measures
If search results are limited:
1. Try alternative search terms
2. Broaden the search scope
3. Include related conditions/treatments
Output Format:
1. Summary of search strategy
2. Overview of findings
3. Detailed analysis of key studies
4. Evidence synthesis
5. Knowledge gaps identified
6. Complete reference list in APA format for ALL sources
Format: Author(s) (Year). Title. Journal, Volume(Issue), Pages. DOI/URL
Example: Smith, J. D., & Jones, M. R. (2023). Study findings. Journal of Medicine, 45(2), 123-145. https://doi.org/10.1000/med.2023""",
agent=agent,
expected_output="A comprehensive research summary with detailed analysis and APA-formatted references for all sources."
)
def get_writing_task(agent, topic):
return Task(
description=f"""Write a comprehensive scientific paper about "{topic}" based on the research provided.
Paper Structure:
1. Introduction (500-750 words):
- Current state of knowledge
- Clinical significance
- Research gaps
- Clear objectives
- Include at least 5 in-text citations
2. Materials and Methods (500-750 words):
- Search strategy
- Inclusion criteria
- Data extraction process
- Quality assessment
- Include methodology citations
3. Results (MINIMUM 1000 words):
- Study characteristics
- Patient demographics
- Primary outcomes
- Secondary outcomes
- Safety data
- Meta-analysis if applicable
- Include specific data from at least 10 studies
- Use in-text citations for every finding
4. Discussion (MINIMUM 1000 words):
- Summary of main findings
- Comparison with existing literature
- Clinical implications
- Strengths and limitations
- Future research directions
- Include at least 15 in-text citations
- Compare and contrast findings from different studies
- Address conflicting results
- Discuss potential mechanisms
5. Conclusion (250-500 words):
- Key takeaways
- Clinical recommendations
- Research priorities
6. References:
- MUST list ALL cited articles (minimum 20)
- Use proper APA format
- Include DOI/URL when available
- Alphabetical order
Writing Guidelines:
- Use clear, scientific language
- Support EVERY claim with citations
- Include relevant statistics
- Maintain objectivity
- Address conflicting findings
- Consider clinical relevance
Citation Format:
- In-text: (Author et al., Year) or Author et al. (Year)
- For 2 authors: (Smith & Jones, 2023)
- For 3+ authors: (Smith et al., 2023)
- Multiple citations: (Smith et al., 2023; Jones et al., 2022)
IMPORTANT:
- Results and Discussion MUST be at least 1000 words each
- EVERY paragraph should include at least one citation
- ALL sources from the research must be cited and listed
- Check that all in-text citations have corresponding references""",
agent=agent,
expected_output="A well-structured scientific paper with comprehensive analysis, proper citations, and complete reference list."
)