Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve check user goal by doing zero prompt shot with 'step by step' thinking #992

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions skyvern/forge/prompts/skyvern/check-user-goal.j2
Original file line number Diff line number Diff line change
@@ -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 }}

Expand Down
Loading