How to Define Key Nodes & Evaluation Functions
How to define key nodes
Definition: When there are multiple ways to complete a task, but no matter which method is used, it will go through a certain step(such as navigation to certain webpages or the performance of specific actions on web pages), we define it as a "key node".
The Dota 2 task in the previous section is an example. Reviewing this process:
To accomplish the task, entering the Steam website is a necessary step. Thus it's the first key nodes.
Searching for Dota 2 on Steam is not mandatory; I could also find Dota 2 through a Google search instead of Steam search.
There are some operations that must be followed, such as entering the Dota 2 interface page.
The Dota 2 interface URL is:
https://store.steampowered.com/app/570/Dota_2/
Comparing with Steam's URL:
https://store.steampowered.com/
We notice the differing part is:
app/570/Dota_2/
Therefore, we add a URL include match:
app/570/Dota_2/
(how to choose this is explained in the last section).
The third key node is pressing the "Add to Cart" button, for which we use path exact match.
Q: Why not use an exact match?
A: Because the main URL may not be
https://store.steampowered.com/
, it could be the non-http versionstore.steampowered.com
, orstore.steampowered.us
with country domains like us, cn, jp, etc(of course, this URL may not exist). Therefore, when comparing the entire URL, try not to use URL exact match.
How to define evaluation functions
For all input operations on the page:
First, determine whether it is a necessary condition for task completion.
If it is a necessary condition, then judge whether the execution result can be reflected by the change of the URL. If so, simply take the state after execution as the key node and select the evaluation function as
URL exactly/included/semantic match
.If it cannot be reflected by changes in the URL, it needs to be defined as a key node based on click or input operations. Select
element path exactly match
orelement value exactly/included/semantic match
for input operations (to determine whether the content of the input element matches).
For all click operations on the page:
Firstly, determine whether it is a necessary condition for completing the task.
If it is a necessary condition, then judge whether the execution result can be reflected by the change of the URL. If so, simply take the state after execution as the key node and select the match rule as
URL exactly/included/semantic match
.If it cannot be reflected by the change of url, each click operation should be defined as a key node, and the match can be selected as
element element path exactly match
orelement value/included/semantic match
Last updated