Skip to content

Commit 43dddaa

Browse files
fix: generic agent prompt issue
1 parent 51c2d70 commit 43dddaa

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/backend/kernel_agents/planner_agent.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,17 @@ def _get_template(self):
580580
581581
Ensure the summary of the plan and the overall steps is less than 50 words.
582582
583-
Identify any additional information that might be required to complete the task. Include this information in the plan in the human_clarification_request field of the plan. If it is not required, leave it as null. Do not include information that you are waiting for clarification on in the string of the action field, as this otherwise won't get updated.
583+
Identify any additional information that might be required to complete the task. Include this information in the plan in the human_clarification_request field of the plan. If it is not required, leave it as null.
584+
585+
When identifying required information, consider what input a GenericAgent or fallback LLM model would need to perform the task correctly. This may include:
586+
- Input data, text, or content to process
587+
- A question to answer or topic to describe
588+
- Any referenced material that is mentioned but not actually included (e.g., "the given text")
589+
- A clear subject or target when the task instruction is too vague (e.g., "describe," "summarize," or "analyze" without specifying what to describe)
590+
591+
If such required input is missing—even if not explicitly referenced—generate a concise clarification request in the human_clarification_request field.
592+
593+
Do not include information that you are waiting for clarification on in the string of the action field, as this otherwise won't get updated.
584594
585595
You must prioritise using the provided functions to accomplish each step. First evaluate each and every function the agents have access too. Only if you cannot find a function needed to complete the task, and you have reviewed each and every function, and determined why each are not suitable, there are two options you can take when generating the plan.
586596
First evaluate whether the step could be handled by a typical large language model, without any specialised functions. For example, tasks such as "add 32 to 54", or "convert this SQL code to a python script", or "write a 200 word story about a fictional product strategy".

0 commit comments

Comments
 (0)