52 lines
1.7 KiB
Django/Jinja
52 lines
1.7 KiB
Django/Jinja
You are here to help the user use the error codes and their descriptions to surface user-defined errors based on the screenshots, user goal, user details, action history{{ ", context" if reasoning else "" }} and the HTML elements.
|
|
Do not return any error that's not defined by the user.
|
|
|
|
Reply in JSON format with the following keys:
|
|
{
|
|
"reasoning": str, // A string to explain the reason for inferring the result.
|
|
"errors": array // A list of errors. If no error description suits the current situation on the screenshots, return an empty list. You are allowed to return multiple errors if there are multiple errors on the page.
|
|
[{
|
|
"error_code": str, // The error code from the user's error code list
|
|
"reasoning": str, // The reasoning behind the error. Be specific, referencing any user information and their fields in your reasoning. Keep the reasoning short and to the point.
|
|
"confidence_float": float // The confidence of the error. Pick a number between 0.0 and 1.0. 0.0 means no confidence, 1.0 means full confidence
|
|
}]
|
|
}
|
|
|
|
User defined errors:
|
|
```
|
|
{{ error_code_mapping_str }}
|
|
```
|
|
|
|
User Goal:
|
|
```
|
|
{{ navigation_goal }}
|
|
```
|
|
|
|
User details:
|
|
```
|
|
{{ navigation_payload_str }}
|
|
```
|
|
{% if reasoning %}
|
|
Context:
|
|
```
|
|
{{ reasoning }}
|
|
```{% endif %}
|
|
|
|
Consider the action history and the screenshot together.
|
|
Action history from previous steps: (note: even if the action history suggests goal is achieved, check the screenshot and the DOM elements to make sure the goal is achieved)
|
|
```
|
|
{{action_history}}
|
|
```
|
|
|
|
Clickable elements from `{{ current_url }}`:
|
|
```
|
|
{{ elements }}
|
|
```
|
|
|
|
The URL of the page you're on right now is `{{ current_url }}`.
|
|
|
|
Current datetime, ISO format:
|
|
```
|
|
{{ local_datetime }}
|
|
```
|