This crew consists of specialized agents working together to analyze and report on a given topic.
from crewai import Agent, Crew, Process, Task#Define agents here (see full tutorial)# Create tasks for your agents with explicit context conduct_analysis_task = Task( description=f"""Conduct a comprehensive analysis of the latest developments in {topic}. Identify key trends, breakthrough technologies, and potential industry impacts. Focus on both research breakthroughs and commercial applications.""", expected_output="Full analysis report in bullet points with citations to sources", agent=researcher, context=[], # Explicitly set empty context ) fact_checking_task = Task( description=f"""Review the research findings and verify the accuracy of claims about {topic}. Identify any potential ethical concerns or societal implications. Highlight areas where hype may exceed reality and provide a balanced assessment. Suggest frameworks that should be considered for each major advancement.""", expected_output="Fact-checking report with verification status for each major claim", agent=fact_checker, context=[conduct_analysis_task], # Set context to previous task ) # Instantiate your crew with a sequential process crew = Crew( agents=[researcher, fact_checker, writer], tasks=[conduct_analysis_task, fact_checking_task, writer_task], verbose=False, process=Process.sequential, ) return crew
Next, you’ll built an experiment set to test your CrewAI Crew with Phoenix and Google Gen AI evals.When run, an Experiment will send each row of your dataset through your task, then apply each of your evaluators to the result.All traces and metrics will then be stored in Phoenix for reference and comparison.
Define as many evaluators as you’d need to evaluate your agent. In this case, you’ll use Google Gen AI’s eval library to evaluate the crew’s trajectory.
Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.Getting Started with Vertex AI Python SDK for Gen AI Evaluation Service