Hello, I discovered a strange thing and maybe you guys have an ideea what could generate this.
Backstory: In attempt to create a flow of crews I generated a crew with the role of manager which will decide what problem the user has, a crew that will deal with sql related stuff if the manager decides that the user will need info from db and finally a crew that will deal with customer_service problems that may appear on the website.
When the execution is going from the manager to sql (user want something from the db) everything works fine.
BUT when the manager decides that the user has a customer service related problem and the customer service crew enters to do their job i get the following error from azure:
litellm.
ContentPolicyViolationError: AzureException - Error code: 400 - {‘error’: {‘message’: “The response was filtered due to the prompt triggering Azure OpenAI’s content management policy. Please modify your prompt and retry. To learn more about our content filtering policies please read our documentation: Azure OpenAI Service content filtering - Azure OpenAI | Microsoft Learn”, ‘type’: None, ‘param’: ‘prompt’, ‘code’: ‘content_filter’, ‘status’: 400, ‘innererror’: {‘code’: ‘ResponsibleAIPolicyViolation’, ‘content_filter_result’: {‘hate’: {‘filtered’: False, ‘severity’: ‘safe’}, ‘jailbreak’: {‘filtered’: True, ‘detected’: True}, ‘self_harm’: {‘filtered’: False, ‘severity’: ‘safe’}, ‘sexual’: {‘filtered’: False, ‘severity’: ‘safe’}, ‘violence’: {‘filtered’: False, ‘severity’: ‘safe’}}}}}
I am using the Azure-openai models (gpt-4o-mini)
The prompts and tasks for manager and customer_service are the following:
Manager:
manager_agent = Agent(role=“Manager”,
goal=“You have to understand the users problem and categorize it in order to decide which tasks should run so the agents cant solve the users problem.”,
backstory=“”“You are the manager of the team and your job is to manage the other agents and their Tasks.
You have 50 years of experience in talking to customers and understanding their problems and you have a deep understanding of your team and what tasks
you should run in order to solve the users problem.
Your job was always to understand the users problem and categorize it into the following categories:
{task_categories}
“””,
allow_delegation=False,
verbose=True,
llm=get_llm()
)manager_task = Task(name=“manager_task”,
description=“”“Your task is to interact with the user to fully understand their problem. Use your experience to ask clarifying questions and gather detailed insights.
After gathering this information, categorize the problem into one of the following categories: {task_categories}.
For each category, outline the specific tasks and agents you would assign to address the issue. Be as detailed as possible when explaining your decision-making process, including why you selected the category and the agents/tasks to handle the problem.
Now you have to help user: {user_name}.
{user_name} has this problem/question: {user_question}”“”,
expected_output=“an object with the categories of the problem”,
output_pydantic=CategoryOutput,
agent=manager_agent,
human_input=True,
)
Customer_service:
customer_support_agent = Agent(role=“Customer Support”,
goal=“Help users with general questions and issues”,
backstory=“”“You are a customer support agent who is here to help users with general questions and issues.
You have a deep understanding of the product and can help users with any questions they may have.
Use the ‘rag_tool’ to find all available information that are related to the user question. And then use that info to respond and help the user.”“”,
allow_delegation=False,
verbose=True,
llm=get_llm(),
tools=[rag_tool])customer_support_task = Task(description=“”“Your task is to help users with general questions and issues. Use the
rag_tool
to find all available information that are related to the user question. And then use that info to respond and help the user.
The user question is: {user_question}
The user’s full name is :{user_name}
Task_category: customer_service”“”,
expected_output=“A response for the user”,
tools=[rag_tool],
agent=customer_support_agent,
)
Knowing that is an Azure problem. Maybe they have some Guardrails not so well implemented apperently i was just curious what do you think about the prompt is there a problem or maybe i am missing something.
Thanks!