use single prompt to generate error code (#3396)

This commit is contained in:
LawyZheng
2025-09-10 02:45:07 +08:00
committed by GitHub
parent ceec64d201
commit 3b8789d045
5 changed files with 68 additions and 27 deletions

View File

@@ -0,0 +1,39 @@
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 and the HTML elements.
Do not return any error that's not defined by the user.
Reply in JSON format with the following keys:
{
"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 }}
```
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 }}
```