Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unnecessary info in action result history #248

Merged
merged 1 commit into from
May 8, 2024

Conversation

ykeremy
Copy link
Contributor

@ykeremy ykeremy commented Apr 30, 2024

here's an example of a current action history:

[
{
   "action":{
      "action_type":"click",
      "description":null,
      "reasoning":"The user needs to submit a support request to resolve the issue with the job application submission flagged as bot traffic. The 'Submit a new support request' link with id 11 is the relevant element to click to access the support request form, as indicated by the previous successful action results and the current screenshot showing the Greenhouse support bot prompt.",
      "element_id":11,
      "file_url":null
   },
   "results":[
      {
         "success":false,
         "exception_type":"MissingElement",
         "exception_message":"Found no elements. Might be due to previous actions which removed this element. xpath=//*[@unique_id='11'] element_id=11",
         "data":null,
         "step_retry_number":0,
         "step_order":8,
         "javascript_triggered":false,
         "interacted_with_sibling":false,
         "interacted_with_parent":false
      }
   ]
},
{
   "action":{
      "action_type":"click",
      "description":null,
      "reasoning":"The user needs to submit a support request to resolve the issue with the job application submission flagged as bot traffic. The 'Get help' button with id 8 is the relevant element to click to access the support request form, as indicated by the current screenshot showing the Greenhouse support bot prompt.",
      "element_id":8,
      "file_url":null
   },
   "results":[
      {
         "success":true,
         "exception_type":null,
         "exception_message":null,
         "data":null,
         "step_retry_number":2,
         "step_order":8,
         "javascript_triggered":false,
         "interacted_with_sibling":false,
         "interacted_with_parent":false
      }
   ]
},
{
   "action":{
      "action_type":"input_text",
      "description":null,
      "reasoning":"The user needs to interact with the Greenhouse support bot to resolve the issue with the job application submission flagged as bot traffic. The 'Write a message' input field is the relevant element to input text into, as indicated by the current screenshot showing the Greenhouse support bot prompt. The user will explain the situation and request assistance.",
      "element_id":44,
      "file_url":null
   },
   "results":[
      {
         "success":false,
         "exception_type":"Error",
         "exception_message":"Error: Node is not an <input>, <textarea> or <select> element",
         "data":null,
         "step_retry_number":0,
         "step_order":9,
         "javascript_triggered":false,
         "interacted_with_sibling":false,
         "interacted_with_parent":false
      }
   ]
}
]
  1. let's remove null
  2.         "javascript_triggered":false,
      "interacted_with_sibling":false,
      "interacted_with_parent":false
    

these are definitely useless so let's remove them

  1. TBD: I'm not sure how important successful actions are - shall we remove?
  2.         "step_retry_number":0,
      "step_order":9,
    

TBD: are these important at all?

@ykeremy ykeremy added the sync label Apr 30, 2024
@wintonzheng wintonzheng force-pushed the shu/reduce_success_history_context branch from 681745b to b3bdccb Compare May 5, 2024 05:42
here's an example of a current action history:
```
[
   {
      "action":{
         "action_type":"click",
         "description":null,
         "reasoning":"The user needs to submit a support request to resolve the issue with the job application submission flagged as bot traffic. The 'Submit a new support request' link with id 11 is the relevant element to click to access the support request form, as indicated by the previous successful action results and the current screenshot showing the Greenhouse support bot prompt.",
         "element_id":11,
         "file_url":null
      },
      "results":[
         {
            "success":false,
            "exception_type":"MissingElement",
            "exception_message":"Found no elements. Might be due to previous actions which removed this element. xpath=//*[@unique_id='11'] element_id=11",
            "data":null,
            "step_retry_number":0,
            "step_order":8,
            "javascript_triggered":false,
            "interacted_with_sibling":false,
            "interacted_with_parent":false
         }
      ]
   },
   {
      "action":{
         "action_type":"click",
         "description":null,
         "reasoning":"The user needs to submit a support request to resolve the issue with the job application submission flagged as bot traffic. The 'Get help' button with id 8 is the relevant element to click to access the support request form, as indicated by the current screenshot showing the Greenhouse support bot prompt.",
         "element_id":8,
         "file_url":null
      },
      "results":[
         {
            "success":true,
            "exception_type":null,
            "exception_message":null,
            "data":null,
            "step_retry_number":2,
            "step_order":8,
            "javascript_triggered":false,
            "interacted_with_sibling":false,
            "interacted_with_parent":false
         }
      ]
   },
   {
      "action":{
         "action_type":"input_text",
         "description":null,
         "reasoning":"The user needs to interact with the Greenhouse support bot to resolve the issue with the job application submission flagged as bot traffic. The 'Write a message' input field is the relevant element to input text into, as indicated by the current screenshot showing the Greenhouse support bot prompt. The user will explain the situation and request assistance.",
         "element_id":44,
         "file_url":null
      },
      "results":[
         {
            "success":false,
            "exception_type":"Error",
            "exception_message":"Error: Node is not an <input>, <textarea> or <select> element",
            "data":null,
            "step_retry_number":0,
            "step_order":9,
            "javascript_triggered":false,
            "interacted_with_sibling":false,
            "interacted_with_parent":false
         }
      ]
   }
]
```

1. let's remove null
2.             "javascript_triggered":false,
            "interacted_with_sibling":false,
            "interacted_with_parent":false
these are definitely useless so let's remove them

3. TBD: I'm not sure how important successful actions are - shall we remove?
4.             "step_retry_number":0,
            "step_order":9,
TBD: are these important at all?
@wintonzheng wintonzheng force-pushed the shu/reduce_success_history_context branch from b3bdccb to 35931f5 Compare May 8, 2024 03:54
@wintonzheng wintonzheng merged commit d7599a2 into main May 8, 2024
2 checks passed
@wintonzheng wintonzheng deleted the shu/reduce_success_history_context branch May 8, 2024 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants