Back to prompt library
Define Review Workflow and Tasks
Linked challenge: Orchestrate Scientific Integrity Agent Crew
Prompt source
planning49 lines10 sectionsNo variables1 code block
Define a set of `Task` objects that guide the agents through the scientific review process. Create tasks for summarizing the input abstract (using a Mistral Saba based agent if possible), verifying facts, checking consistency, and detecting AI slop. Finally, define the `Crew` with these agents and tasks, specifying the `Process.sequential` flow. The output of the crew should be a comprehensive review report.
```python
# ... (agents defined previously)
# Summarizer Agent (using Mistral Saba for efficiency)
# mistral_saba_llm = ChatMistralAI(model="mistral-large-latest", temperature=0.1, mistral_api_key="YOUR_MISTRAL_API_KEY")
# summarizer_agent = Agent(role='Summarizer', goal='Condense complex texts into concise summaries.', llm=mistral_saba_llm, ...)
# Define Tasks
summarize_task = Task(
description="Summarize the provided scientific abstract into 3-4 key bullet points.",
agent=None, # Assign summarizer_agent here
expected_output="A bulleted list summarizing the abstract.",
output_file="summary.md"
)
verify_facts_task = Task(
description="Verify all factual claims in the abstract using the Pinecone Fact Checker tool. Identify and justify any inaccuracies.",
agent=factual_verifier,
expected_output="A list of factual claims with their verification status and justifications.",
output_file="factual_verification.md"
)
check_consistency_task = Task(
description="Analyze the abstract for logical consistency, internal contradictions, and methodological soundness. Highlight any areas needing clarification or revision.",
agent=consistency_checker,
expected_output="A report detailing inconsistencies found and suggestions for improvement.",
output_file="consistency_check.md"
)
detect_ai_slop_task = Task(
description="Examine the writing style for signs of generic, vague, or repetitive language typical of AI-generated content. Provide specific examples and a likelihood score.",
agent=ai_slop_detector,
expected_output="A report on potential 'AI slop' indicators with examples and an AI generation likelihood score.",
output_file="ai_slop_detection.md"
)
# Final Review Task (assigned to a lead agent or the consistency_checker for synthesis)
final_review_task = Task(
description="Synthesize findings from all agents into a final comprehensive review report, including an overall verdict and actionable recommendations.",
agent=consistency_checker, # Could be a new 'Review Synthesizer' agent
expected_output="A comprehensive review report combining all findings, with an overall verdict on scientific integrity and actionable recommendations.",
context=[summarize_task, verify_facts_task, check_consistency_task, detect_ai_slop_task]
)
# Form the Crew
scientific_review_crew = Crew(
agents=[factual_verifier, consistency_checker, ai_slop_detector], # Add summarizer_agent if created
tasks=[summarize_task, verify_facts_task, check_consistency_task, detect_ai_slop_task, final_review_task],
process=Process.sequential, # Or hierarchical for more complex flows
verbose=2 # Enables detailed logging
)
# To run the crew:
# result = scientific_review_crew.kickoff(inputs={'abstract': 'Your scientific abstract text here.'})
# print(result)
```