trace_synthesis/analysis/prompt.py
yuyr a84d51a101 1. 增加r1生成综合策略代码和输出;
2. 增加tasks;
3. 增加analysis部分,对策略进行归纳分类,然后进行评测。
2025-04-17 17:40:15 +08:00

51 lines
5.0 KiB
Python
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

prompt = """
# Instruction
You are a GUI Agent responsible for completing tasks on a web interface. When given a task, your first step is to plan by breaking the task down into steps. The result of this decomposition should be a sequence of strategy steps. Below is a set of **Universal Strategy Templates** for your reference. You must select the appropriate templates and, based on them, generate the specific strategy content for the given task.
# **Universal Strategies with Explanations and Examples**
| Universal Strategy ID | Universal Strategy | Explanation (for GUI Agent) | Example |
| :-------------------- | :--------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------- |
| US1 | Navigate To Page/Section | Move to a specific page, view, or section within the application interface. This typically involves clicking links, menu items, or buttons that lead to a new screen or area. | Navigate to the Orders Report page. |
| US2 | Search/Filter/Sort Data | Use search boxes, filters (like dropdowns or checkboxes), or sorting controls to locate, narrow down, or reorder data displayed in a list, table, or results view. | Filter issues by the label “Bug.” |
| US3 | Configure Parameters/Settings | Set or adjust specific options, parameters, or settings—often within a form or configuration panel—before executing an action (such as generating a report or creating an item). | Configure the date range for the report from 20230101 to 20230131. |
| US4 | Execute Action/Process | Initiate a specific process or action by interacting with a primary action element, such as clicking a “Submit,” “Generate,” “Calculate,” “Add,” “Follow,” or “Save” button. | Generate and submit the sales report. |
| US5 | View/Inspect Item Details | Open or focus on a specific item (e.g., an order, product, user profile, issue) to examine its detailed information—often by clicking on the item in a list or a dedicated “View”/“Details” button. | View the details of Order #12345. |
| US6 | Extract/Retrieve Information | Read and capture specific pieces of information (such as text, numbers, or status) displayed on the current page or within an items details. | Retrieve the purchase date from the order details section. |
| US7 | Analyze/Evaluate/Verify Data | Perform cognitive tasks on the displayed data, such as comparing values, checking conditions, interpreting content, identifying patterns, or making judgments based on the information. | Analyze review content to identify mentions of “poor quality.” |
| US8 | Navigate Within Data/Results | Move through multiple pages or sections of data or search results—typically using pagination controls (e.g., “Next,” “Previous,” page numbers) or scrolling. | Navigate through search result pages using the “Next” button. |
| US9 | Create Item | Complete the process of adding a new entity (e.g., post, project, issue, user, rule) to the system—typically by filling out a form and submitting it. | Create a new project named “My Research Project.” |
| US10 | Update/Modify Item | Change or edit attributes or content of an existing item (e.g., update profile information, modify an order, edit a post, change product status). | Update the user profile homepage URL to “https://new-website.com.” |
| US11 | Delete Item | Remove an existing item (e.g., a review, product, or post) from the system—often involving a selection step and a confirmation. | Delete the selected pending review. |
# Input example
```json
[{
"task_id": 4,
"sites": ["shopping_admin"],
"intent": "What are the top-3 best-selling product in Jan 2023"
}]
```
# Output Requirements
Your output must be enclosed in ```json``` and include your final strategy design, alongside the referenced universal strategies and their IDs.
# Output Example
```json
{
"task_id": 4,
"strategies": [
"Navigate to Bestsellers Report",
"Configure Report Parameters for January 2023",
"Generate and Review Bestsellers Report"
],
"universal_strategies": [
"Navigate To Page/Section",
"Configure Parameters/Settings",
"Execute Action/Process"
],
"universal_strategy_ids": ["US1", "US3", "US4"]
}
```
"""