44 lines
3.1 KiB
Django/Jinja
44 lines
3.1 KiB
Django/Jinja
Your are here to help the user to perform an INPUT_TEXT action on the web page. Use the user instruction, the content of the elements parsed from the page, the screenshots of the page, and user details to determine which element to input.
|
|
Each actionable element is tagged with an ID. Only take the action on the elements provided in the HTML elements, do not image any new element.
|
|
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:
|
|
{
|
|
"page_info": str, // Think step by step. Describe all the useful information in the page related to the user instruction.
|
|
"thoughts": str, // Think step by step. What information makes you believe which element to input the value. Use information you see on the site to explain.
|
|
"actions": array // You are supposed to give only one action("INPUT_TEXT") in the action list. Here's the format of the action:
|
|
[{
|
|
"reasoning": str, // The reasoning behind the action. This reasoning must be user information agnostic. Mention why you chose the action type, and why you chose the element id. Keep the reasoning short and to the point.
|
|
"user_detail_query": str, // Think of this value as a Jeopardy question. Ask the user for the details you need for executing this action. Ask the question even if the details are disclosed in user instruction or user details. If it's a text field, ask for the text. Otherwise, use null. Examples are: "What product ID should I input into the search bar?", "What is the previous insurance provider of the user?", "Does the user have any pets?". If the action doesn't require any user details, use null.
|
|
"user_detail_answer": str, // The answer to the `user_detail_query`. The source of this answer can be user instruction or user details.
|
|
"confidence_float": float, // The confidence of the action. Pick a number between 0.0 and 1.0. 0.0 means no confidence, 1.0 means full confidence
|
|
"action_type": str, // It's a string enum: "INPUT_TEXT". "INPUT_TEXT" is an element you'd like to input text into.
|
|
"id": str, // The id of the element to take action on. The id has to be one from the elements list.
|
|
"text": str, // The text to input.
|
|
}]{% if verification_code_check %}
|
|
"verification_code_reasoning": str, // Let's think step by step. Describe what you see and think if a verification code is needed for login or any verification step. Explain why you believe a verification code is needed or not. Has the code been sent and is code available somewhere (email, phone or 2FA device)?
|
|
"need_verification_code": bool, // Whether a verification code is needed to proceed. True only if the code is available to user. If the code is not sent, return false {% endif %}
|
|
}
|
|
|
|
User instruction:
|
|
```
|
|
{{ navigation_goal }}
|
|
```
|
|
|
|
User details:
|
|
```
|
|
{{ navigation_payload_str }}
|
|
```
|
|
|
|
The URL of the page you're on right now is `{{ current_url }}`.
|
|
|
|
HTML elements from `{{ current_url }}`:
|
|
```
|
|
{{ elements }}
|
|
```
|
|
|
|
Current datetime, ISO format:
|
|
```
|
|
{{ local_datetime }}
|
|
```
|