Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Refine evaluation criteria and system message in service.py

mertunsall3c5c3b69cb2b
diff --git a/eval/service.py b/eval/service.py
index 97b78d8d9..366379ad1 100644
--- a/eval/service.py
+++ b/eval/service.py
@@ -14,6 +14,7 @@
# We are using our langchain wrapper for the OpenAI API
# This means we changed model.generate to model.invoke. The behavior of the model should be identical.
# Added a Online_Mind2Web_eval_with_retry wrapper with retry logic in case of API rate limiting or other issues.
+# Adapting the system message to be more general and applicable to more tasks.
# @article{xue2025illusionprogressassessingcurrent,
@@ -73,7 +74,7 @@ async def identify_key_points(task, model):
2. Identify and extract **key points** directly stated in the task description.
- A **key point** is a critical element, condition, or step explicitly mentioned in the task description.
- Do not infer or add any unstated elements.
- - Words such as "best," "highest," "cheapest," "latest," "most recent," "lowest," "closest," "highest-rated," "largest," and "newest" must go through the sort function(e.g., the key point should be "Filter by highest").
+ - Words such as "best," "highest," "cheapest," "latest," "most recent," "lowest," "closest," "highest-rated," "largest," and "newest" should be included in the key points.
**Respond with**:
- **Key Points**: A numbered list of the explicit key points for completing this task, one per line, without explanations or additional details."""
@@ -148,20 +149,15 @@ async def Online_Mind2Web_eval(task, last_actions, images_path, model, score_thr
Your response must strictly follow the following evaluation criteria!
*Important Evaluation Criteria*:
-1: The filtered results must be displayed correctly. If filters were not properly applied (i.e., missing selection, missing confirmation, or no visible effect in results), the task is not considered successful.
-2: You must carefully check whether these snapshots and action history meet these key points. Ensure that specific filter conditions, such as "best," "highest," "cheapest," "latest," "most recent," "lowest," "closest," "highest-rated," "largest," and "newest" are correctly applied using the filter function(e.g., sort function).
-3: Certain key points or requirements should be applied by the filter. Otherwise, a search with all requirements as input will be deemed a failure since it cannot guarantee that all results meet the requirements!
-4: If the task requires filtering by a specific range of money, years, or the number of beds and bathrooms, the applied filter must exactly match the given requirement. Any deviation results in failure. To ensure the task is successful, the applied filter must precisely match the specified range without being too broad or too narrow.
-Examples of Failure Cases:
-- If the requirement is less than $50, but the applied filter is less than $25, it is a failure.
-- If the requirement is $1500-$2500, but the applied filter is $2000-$2500, it is a failure.
-- If the requirement is $25-$200, but the applied filter is $0-$200, it is a failure.
-- If the required years are 2004-2012, but the filter applied is 2001-2012, it is a failure.
-- If the required years are before 2015, but the applied filter is 2000-2014, it is a failure.
-- If the task requires exactly 2 beds, but the filter applied is 2+ beds, it is a failure.
-5: Some tasks require a submission action or a display of results to be considered successful.
-6: If the retrieved information is invalid or empty(e.g., No match was found), but the agent has correctly performed the required action, it should still be considered successful.
-7: If the current page already displays all available items, then applying a filter is not necessary. As long as the agent selects items that meet the requirements (e.g., the cheapest or lowest price), the task is still considered successful.
+1. If the user provided explicit instructions for the agent to follow, check if the agent followed them exactly. If the agent did not follow the instructions, the task is not considered successful.
+2. If the user asks to find a product/item/service etc. with certain criteria, you should check whether the items found by the agent meet the criteria. If the items do not meet the criteria, the task is not considered successful.
+3. If the user asks to find ALL product/item/service etc. with certain criteria, you should check whether the agent did its best to find all the items. If you see some evidence in the traces that there could be more items that agent didn't find, the task is not considered successful.
+4. You should evaluate whether the user would be happy with the results. If the results are not satisfactory, the task is not considered successful.
+5. If the user asks to apply some filters such as sort by price, filter by requirement, etc., you should check whether the agent applied the filters correctly. If the filters were not properly applied, the task is not considered successful.
+6. Some tasks require a submission action or a display of results to be considered successful.
+7. If the retrieved information is invalid or empty(e.g., No match was found), but the agent has correctly performed the required action, it should still be considered successful.
+8. If the current page already displays all available items, then applying a filter is not necessary. As long as the agent selects items that meet the requirements (e.g., the cheapest or lowest price), the task is still considered successful.
+9. Ultimately, you should check whether the user would be happy with the results. If the results are not satisfactory, the task is not considered successful.
*IMPORTANT*
Format your response into two lines as shown below: