From 6cf39446ebe89ded54f8342bce846111ee0f15be Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Sat, 12 Apr 2025 15:17:10 -0700 Subject: [PATCH] improve task generation data extraction goal (#2137) --- skyvern/forge/agent.py | 2 ++ skyvern/forge/prompts/skyvern/generate-task.j2 | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/skyvern/forge/agent.py b/skyvern/forge/agent.py index efbe4b11..94f14da1 100644 --- a/skyvern/forge/agent.py +++ b/skyvern/forge/agent.py @@ -1245,6 +1245,7 @@ class ForgeAgent: "generate_summary": "concise", }, truncation="auto", + temperature=0, ) previous_response = first_response input_tokens = first_response.usage.input_tokens or 0 @@ -1299,6 +1300,7 @@ class ForgeAgent: "generate_summary": "concise", }, truncation="auto", + temperature=0, ) input_tokens = current_response.usage.input_tokens or 0 output_tokens = current_response.usage.output_tokens or 0 diff --git a/skyvern/forge/prompts/skyvern/generate-task.j2 b/skyvern/forge/prompts/skyvern/generate-task.j2 index a9317874..e6f410cb 100644 --- a/skyvern/forge/prompts/skyvern/generate-task.j2 +++ b/skyvern/forge/prompts/skyvern/generate-task.j2 @@ -8,7 +8,7 @@ navigation_goal_reasoning: str. This is a required field. The reason why navigat is_navigation_goal_required: bool. This is a required field. Based on the navigation_goal_reasoning, whether the navigation goal is required to achieve the task. navigation_goal: str. This is an optional field. If is_navigation_goal_required is true, then this field should be provided. Otherwise, provide the value null. The value should be a string that we can use as an input to a Large Language Modal. It needs to tell the agent what actions need to be taken to achieve the task. It needs to define a single goal. If this field is provided, you must include explicit completion criteria. Provide completion criteria by completing the sentence: "COMPLETE when...". You can define guardrails that could help the agent from taking certain actions or getting derailed. -data_extraction_goal_reasoning: str. This is a required field. The reason why data extraction goal is needed to achieve the goal. Data extraction goal is needed when the agent needs to extract data from the website to achieve the goal. +data_extraction_goal_reasoning: str. This is a required field. The reason why data extraction goal is needed to achieve the goal. Data extraction goal is needed when the agent needs to extract data from the website to achieve the goal. If the user is searching for something, looking for information or specifically trying to extract information along side the goal, consider it an intention to extract information. Phrases like "find something", "show me something", "search something", "return something" and so on indicate the intention to extract information. is_data_extraction_goal_required: bool. This is a required field. Based on data_extraction_goal_reasoning, whether the data extraction goal is required to achieve the goal. data_extraction_goal: str. This is an optional field. The value should be a string that we can use as an input to a Large Language Modal. It needs to tell the agent the goal in terms of extracting data. It needs to be a single goal. navigation_payload: json. This is an optional field. The value should be JSON. Use this field if there is any information for the agent to be able to complete the task such as values that can help fill a form, parameters for queries and so on.