57 lines
3.1 KiB
Django/Jinja
57 lines
3.1 KiB
Django/Jinja
There is an input element on an HTML page. Based on the context and information provided, you have {{ "three" if is_search else "two" }} goals:
|
|
- Confirm if an auto-completion attempt appears after the user inputs the current value.
|
|
- If auto-completion suggestions appear, assist the user in selecting the most appropriate element based on the user's goal, details, and the context.{% if is_search %}
|
|
- Confirm if direct searching is a better way compared to all suggestions based on user's goal.{% endif %}
|
|
|
|
You can confirm an auto-completion attempt based on the following rules:
|
|
- Several auto-completion suggestions appear for the input value.
|
|
- Although messages like "No results" and "No match" mean no option was matched, they still indicate an attempt to generate auto-completion suggestions.
|
|
|
|
You must identify a potential auto-completion suggestion based on the following rules:
|
|
- The option must be an element with an ID from the provided "HTML elements". Do not create or assume options outside of these elements.
|
|
- The content of the option must be meaningful. Do not consider non-message indicators like "No results" or "No match" as valid options.
|
|
|
|
MAKE SURE YOU OUTPUT VALID JSON. No text before or after JSON, no trailing commas, no comments (//), no unnecessary quotes, etc.
|
|
Each interactable element is tagged with an ID.
|
|
|
|
Reply in JSON format with the following keys:
|
|
{
|
|
"thought": str, // Think step by step. Describe your thought about how you achieve the {{ "three" if is_search else "two" }} goals with convincing evidence.{% if is_search %}
|
|
"direct_searching": bool, // True if direct searching is a better way compared to all suggestions, otherwise False.{% endif %}
|
|
"auto_completion_attempt": bool, // True if there's any auto completion attempt based on the rules. Otherwise, it should be False.
|
|
"reasoning": str, // The reasoning behind the decision. Be specific, referencing the value and the element id in your reasoning. Mention why you chose the element id. Keep the reasoning short and to the point.
|
|
"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.
|
|
"relevance_float": float, // The relative between the selected element and the provided information. You should consider how much the selected option is related to the user goal, the user details and the context. Pick a number between 0.00 and 1.00. 0.00 means no relevance, 1.00 means full relevance, the precision is 0.01.
|
|
"value": str, // The value to select.
|
|
"id": str, // The id of the most relevant and interactable element to take the action. The id must be from "HTML elements". It should be null if no element is relative or there's no auto completion suggestion.
|
|
}
|
|
|
|
Context:
|
|
```
|
|
Choose an auto-completion suggestion for "{{ field_information }}"{%if is_search %} or directly search with the input value{% endif %}
|
|
```
|
|
|
|
Input value:
|
|
```
|
|
{{ filled_value }}
|
|
```
|
|
|
|
User goal:
|
|
```
|
|
{{ navigation_goal }}
|
|
```
|
|
|
|
User details:
|
|
```
|
|
{{ navigation_payload_str }}
|
|
```
|
|
|
|
HTML elements:
|
|
```
|
|
{{ elements }}
|
|
```
|
|
|
|
Current datetime, ISO format:
|
|
```
|
|
{{ local_datetime }}
|
|
``` |