Improving agent delegation prompt

This commit is contained in:
João Moura
2024-01-06 11:40:24 -03:00
parent e7a201a2f6
commit 4b802a15c3

View File

@@ -20,12 +20,12 @@ class AgentTools(BaseModel):
description=dedent( description=dedent(
f"""\ f"""\
Useful to delegate a specific task to one of the Useful to delegate a specific task to one of the
following co-workers: [{', '.join([agent.role for agent in self.agents])}]. following co-workers: [{', '.join([agent.role for agent in self.agents])}].
The input to this tool should be a pipe (|) separated text of length The input to this tool should be a pipe (|) separated text of length
three, representing the co-worker you want to ask it to (one of the options), three, representing the co-worker you want to ask it to (one of the options),
the task and all actual context you have for the task. the task and all actual context you have for the task.
For example, `coworker|task|context`. For example, `coworker|task|context`.
""" """
), ),
), ),
Tool.from_function( Tool.from_function(
@@ -34,12 +34,12 @@ class AgentTools(BaseModel):
description=dedent( description=dedent(
f"""\ f"""\
Useful to ask a question, opinion or take from on Useful to ask a question, opinion or take from on
of the following co-workers: [{', '.join([agent.role for agent in self.agents])}]. of the following co-workers: [{', '.join([agent.role for agent in self.agents])}].
The input to this tool should be a pipe (|) separated text of length The input to this tool should be a pipe (|) separated text of length
three, representing the co-worker you want to ask it to (one of the options), three, representing the co-worker you want to ask it to (one of the options),
the question and all actual context you have for the question. the question and all actual context you have for the question.
For example, `coworker|question|context`. For example, `coworker|question|context`.
""" """
), ),
), ),
] ]