From 6848d813bf75f4065674333f8ddbe2ab60e560d6 Mon Sep 17 00:00:00 2001 From: Salman Faroz Date: Wed, 3 Jul 2024 05:47:53 +0530 Subject: [PATCH] Update Sequential.md (#849) To Resolve : pydantic_core._pydantic_core.ValidationError: 1 validation error for Task expected_output Field required [type=missing, input_value=, input_type=dict] For further information visit https://errors.pydantic.dev/2.6/v/missing "Expected Output" is mandatory now as it forces people to be specific about the expected result and get better result refer : https://github.com/joaomdmoura/crewAI/issues/308 --- docs/how-to/Sequential.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/how-to/Sequential.md b/docs/how-to/Sequential.md index ff9efcc94..ae351197b 100644 --- a/docs/how-to/Sequential.md +++ b/docs/how-to/Sequential.md @@ -37,10 +37,9 @@ writer = Agent( backstory='A skilled writer with a talent for crafting compelling narratives' ) -# Define the tasks in sequence -research_task = Task(description='Gather relevant data...', agent=researcher) -analysis_task = Task(description='Analyze the data...', agent=analyst) -writing_task = Task(description='Compose the report...', agent=writer) +research_task = Task(description='Gather relevant data...', agent=researcher, expected_output='Raw Data') +analysis_task = Task(description='Analyze the data...', agent=analyst, expected_output='Data Insights') +writing_task = Task(description='Compose the report...', agent=writer, expected_output='Final Report') # Form the crew with a sequential process report_crew = Crew( @@ -83,4 +82,4 @@ CrewAI tracks token usage across all tasks and agents. You can access these metr 1. **Order Matters**: Arrange tasks in a logical sequence where each task builds upon the previous one. 2. **Clear Task Descriptions**: Provide detailed descriptions for each task to guide the agents effectively. 3. **Appropriate Agent Selection**: Match agents' skills and roles to the requirements of each task. -4. **Use Context**: Leverage the context from previous tasks to inform subsequent ones \ No newline at end of file +4. **Use Context**: Leverage the context from previous tasks to inform subsequent ones