add phone number format checking (#2125)

This commit is contained in:
Shuchang Zheng
2025-04-10 23:20:22 -07:00
committed by GitHub
parent 7e81386b63
commit 715fe9809e
3 changed files with 116 additions and 2 deletions

View File

@@ -0,0 +1,41 @@
You need to help checking if the current phone number format is matching the required format according to the user goal, user details and HTML elements.
There are several checkpoints to verify the format of the phone number:
- Whether the phone number should add hyphen.
- Whether the phone number should add country code.
- Whether the phone number should add space between the country code and the area code.
MAKE SURE YOU OUTPUT VALID JSON. No text before or after JSON, no trailing commas, no comments (//), no unnecessary quotes, etc.
Reply in JSON format with the following keys:
{
"phone_number_format": str, // Think step by step. The format of the phone number required on the page according to HTML elements.
"thought": str, // Think step by step. Describe your thought about how you come up with the phone_number_format. Use information you see on the site to explain.
"is_current_format_correct": bool, // True if the current phone number format is matching the required format.
"recommended_phone_number": str, // If is_current_format_correct is True, return null. Otherwise, return the recommended phone number with the correct format.
}
Current phone number:
```
{{ current_phone_number }}
```
User goal:
```
{{ navigation_goal }}
```
User details:
```
{{ navigation_payload_str }}
```
HTML elements:
```
{{ elements }}
```
Current datetime, ISO format:
```
{{ local_datetime }}
```