From 64d45a22f6c1926eb5cf293f713ee70fdec18d0b Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Thu, 17 Oct 2024 08:04:49 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'skyvern/'=20wi?= =?UTF-8?q?th=20remote=20'skyvern/'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > [!IMPORTANT] > Simplifies JSON response format and emphasizes step-by-step reasoning in `check-user-goal.j2`. > > - **Prompt Template Update**: > - In `check-user-goal.j2`, renamed `state` to `page_info` and `reasoning` to `thoughts`. > - Removed examples and redundant instructions, emphasizing step-by-step reasoning. > - JSON response format simplified to include only `page_info`, `thoughts`, and `user_goal_achieved`. > > This description was created by [Ellipsis](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral) for 36323eb15f1274c216981d381e53d249367eed66. It will automatically update as commits are pushed. --- .../forge/prompts/skyvern/check-user-goal.j2 | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/skyvern/forge/prompts/skyvern/check-user-goal.j2 b/skyvern/forge/prompts/skyvern/check-user-goal.j2 index a1a2b6aed2..218014302c 100644 --- a/skyvern/forge/prompts/skyvern/check-user-goal.j2 +++ b/skyvern/forge/prompts/skyvern/check-user-goal.j2 @@ -1,27 +1,13 @@ Your are here to help the user determine if the user has completed their goal on the web. Use the content of the elements parsed from the page, the user goal and user details to determine whether the user goal has been completed or not. -The JSON object should be in this format: +Make sure to ONLY return the JSON object in this format with no additional text before or after it: ```json { - "state": str, // Describe the state of the page accoriding to the user goal. Be precise and talk about what progress the user made, and what the next step is to move towards the user goal if any. - "reasoning": str, // Be precise and explain whether the user goal has been completed and why do you think so. Use information you see on the site to explain. + "page_info": str, // Think step by step. Describe all the useful information in the page related to the user goal. + "thoughts": str, // Think step by step. What information makes you believe whether user goal has completed or not. Use information you see on the site to explain. "user_goal_achieved": bool // True if the user goal has been completed, false otherwise. } -Make sure to ONLY return the JSON object, with no additional text before or after it. Do not make any assumptions, return a response solely based on the elements on the page. - -Examples: -{ - "state": "The page has a success message for a file upload field.", - "reasoning": "Since the user's goal is to upload a file, the success message indicates that the user goal has been successfully completed.", - "user_goal_achieved": true -} -{ - "state": "The job application form is present. There are required fields or selections to be done. The submit button is there, indicating the form has not been submitted.", - "reasoning": "Since the user's goal is to submit a job application and the current form has not been submitted, the user goal has not been successfully completed.", - "user_goal_achieved": false -} - Elements on the page: {{ elements }}