Skip to content

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

fix: add strict data grounding rules to prevent hallucination

Saurav Panda032ee15c1999
diff --git a/browser_use/agent/system_prompts/system_prompt.md b/browser_use/agent/system_prompts/system_prompt.md
index fe023907f..9dbe92a53 100644
--- a/browser_use/agent/system_prompts/system_prompt.md
+++ b/browser_use/agent/system_prompts/system_prompt.md
@@ -96,6 +96,7 @@ Strictly follow these rules while using the browser and navigating the web:
- Handle popups, modals, cookie banners, and overlays immediately before attempting other actions. Look for close buttons (X, Close, Dismiss, No thanks, Skip) or accept/reject options. If a popup blocks interaction with the main page, handle it first.
- If you encounter access denied (403), bot detection, or rate limiting, do NOT repeatedly retry the same URL. Try alternative approaches or report the limitation.
- Detect and break out of unproductive loops: if you are on the same URL for 3+ steps without meaningful progress, or the same action fails 2-3 times, try a different approach. Track what you have tried in memory to avoid repeating failed approaches.
+- DATA GROUNDING: Only report data observed in browser_state or tool outputs. Never fabricate URLs, prices, or values — including "representative" ones. If not extracted, say not found.
</browser_rules>
<file_system>
- You have access to a persistent file system which you can use to track progress, store results, and manage long tasks.
@@ -145,8 +146,7 @@ BEFORE calling `done` with `success=true`, you MUST perform this verification:
3. **Verify actions actually completed:**
- If you submitted a form, posted a comment, or saved a file — check the page state or screenshot to confirm it happened.
- If you took a screenshot or downloaded a file — verify it exists in your file system.
-4. **Check for fabricated content:**
- - Every fact, price, name, and date in your response must come from the page you visited — never generate plausible-sounding data.
+4. **Verify data grounding:** Every URL, price, name, and value must appear verbatim in your tool outputs or browser_state. Never construct URLs or use "representative" values. If not extracted, say not found — do not substitute.
5. **If ANY requirement is unmet, uncertain, or unverifiable — set `success` to `false`.**
Partial results with `success=false` are more valuable than overclaiming success.
</pre_done_verification>
@@ -255,6 +255,7 @@ Action list should NEVER be empty.
10. When at max_steps, call done with whatever results you have
11. Always compare current trajectory against the user's original request
12. Be efficient - combine actions when possible but verify results between major steps
+13. NEVER fabricate URLs, image links, prices, or any data — only report values actually observed in browser state or tool outputs; if not found, say so
</critical_reminders>
<error_recovery>
When encountering errors or unexpected states:
diff --git a/browser_use/agent/system_prompts/system_prompt_anthropic_flash.md b/browser_use/agent/system_prompts/system_prompt_anthropic_flash.md
index ae16b37de..6b653542d 100644
--- a/browser_use/agent/system_prompts/system_prompt_anthropic_flash.md
+++ b/browser_use/agent/system_prompts/system_prompt_anthropic_flash.md
@@ -52,6 +52,7 @@ Strictly follow these rules while using the browser and navigating the web:
- If you encounter access denied (403), bot detection, or rate limiting, do NOT repeatedly retry the same URL. Try alternative approaches or report the limitation. Consider using a search engine to find alternative sources for the same information.
- Detect and break out of unproductive loops: if you are on the same URL for 3+ steps without meaningful progress, or the same action fails 2-3 times, try a different approach. Track what you have tried in memory to avoid repeating failed approaches.
- When scrolling through results or lists, keep track of what you have already seen to avoid re-processing the same items.
+- DATA GROUNDING: Only report data observed in browser_state or tool outputs. Never fabricate URLs, prices, or values — including "representative" ones. If not extracted, say not found.
- If a form submission fails, check for validation errors or missing required fields before retrying.
- When dealing with date pickers, calendars, or other complex widgets, interact with them step by step and verify each selection.
</browser_rules>
@@ -93,8 +94,7 @@ BEFORE calling `done` with `success=true`, you MUST perform this verification:
3. **Verify actions actually completed:**
- If you submitted a form, posted a comment, or saved a file — check the page state or screenshot to confirm it happened.
- If you took a screenshot or downloaded a file — verify it exists in your file system.
-4. **Check for fabricated content:**
- - Every fact, price, name, and date in your response must come from the page you visited — never generate plausible-sounding data.
+4. **Verify data grounding:** Every URL, price, name, and value must appear verbatim in your tool outputs or browser_state. Never construct URLs or use "representative" values. If not extracted, say not found — do not substitute.
5. **If ANY requirement is unmet, uncertain, or unverifiable — set `success` to `false`.**
Partial results with `success=false` are more valuable than overclaiming success.
</pre_done_verification>
@@ -237,4 +237,5 @@ When encountering errors or unexpected states:
10. When at max_steps, call done with whatever results you have
11. Always compare current trajectory against the user's original request
12. Be efficient - combine actions when possible but verify results between major steps
+13. NEVER fabricate URLs, image links, prices, or any data — only report values actually observed in browser state or tool outputs; if not found, say so
</critical_reminders>
diff --git a/browser_use/agent/system_prompts/system_prompt_browser_use.md b/browser_use/agent/system_prompts/system_prompt_browser_use.md
index 2971d9b10..d48d7c01c 100644
--- a/browser_use/agent/system_prompts/system_prompt_browser_use.md
+++ b/browser_use/agent/system_prompts/system_prompt_browser_use.md
@@ -10,4 +10,5 @@ You must ALWAYS respond with a valid JSON in this exact format:
"action": [{{"action_name": {{...params...}}}}]
}}
Action list should NEVER be empty.
+DATA GROUNDING: Only report data observed in browser state or tool outputs. Never fabricate URLs, prices, or values. If not found, say so.
</output>
diff --git a/browser_use/agent/system_prompts/system_prompt_browser_use_flash.md b/browser_use/agent/system_prompts/system_prompt_browser_use_flash.md
index e4cb73ea8..4d2c45474 100644
--- a/browser_use/agent/system_prompts/system_prompt_browser_use_flash.md
+++ b/browser_use/agent/system_prompts/system_prompt_browser_use_flash.md
@@ -7,4 +7,5 @@ You must respond with a valid JSON in this exact format:
"action": [{{"action_name": {{...params...}}}}]
}}
Action list should NEVER be empty.
+DATA GROUNDING: Only report data observed in browser state or tool outputs. Never fabricate URLs, prices, or values. If not found, say so.
</output>
diff --git a/browser_use/agent/system_prompts/system_prompt_browser_use_no_thinking.md b/browser_use/agent/system_prompts/system_prompt_browser_use_no_thinking.md
index 6d1936e78..fb97836bc 100644
--- a/browser_use/agent/system_prompts/system_prompt_browser_use_no_thinking.md
+++ b/browser_use/agent/system_prompts/system_prompt_browser_use_no_thinking.md
@@ -9,4 +9,5 @@ You must ALWAYS respond with a valid JSON in this exact format:
"action": [{{"action_name": {{...params...}}}}]
}}
Action list should NEVER be empty.
+DATA GROUNDING: Only report data observed in browser state or tool outputs. Never fabricate URLs, prices, or values. If not found, say so.
</output>
diff --git a/browser_use/agent/system_prompts/system_prompt_flash.md b/browser_use/agent/system_prompts/system_prompt_flash.md
index 4ef82501c..d9a5fbb6a 100644
--- a/browser_use/agent/system_prompts/system_prompt_flash.md
+++ b/browser_use/agent/system_prompts/system_prompt_flash.md
@@ -12,4 +12,5 @@ You are allowed to use a maximum of {max_actions} actions per step. Check the br
"action":[{{"navigate": {{ "url": "url_value"}}}}]
}}
Before calling `done` with `success=true`: re-read the user request, verify every requirement is met (correct count, filters applied, format matched), confirm actions actually completed via page state/screenshot, and ensure no data was fabricated. If anything is unmet or uncertain, set `success` to `false`.
+DATA GROUNDING: Only report data observed in browser state or tool outputs. Never fabricate URLs, prices, or values — including "representative" ones. If not found, say so.
</output>
diff --git a/browser_use/agent/system_prompts/system_prompt_flash_anthropic.md b/browser_use/agent/system_prompts/system_prompt_flash_anthropic.md
index fa0291b12..23d624886 100644
--- a/browser_use/agent/system_prompts/system_prompt_flash_anthropic.md
+++ b/browser_use/agent/system_prompts/system_prompt_flash_anthropic.md
@@ -27,4 +27,5 @@ You are allowed to use a maximum of {max_actions} actions per step. Check the br
Always put `memory` field before the `action` field.
Before calling `done` with `success=true`: re-read the user request, verify every requirement is met (correct count, filters applied, format matched), confirm actions actually completed via page state/screenshot, and ensure no data was fabricated. If anything is unmet or uncertain, set `success` to `false`.
+DATA GROUNDING: Only report data observed in browser state or tool outputs. Never fabricate URLs, prices, or values — including "representative" ones. If not found, say so.
</output>
diff --git a/browser_use/agent/system_prompts/system_prompt_no_thinking.md b/browser_use/agent/system_prompts/system_prompt_no_thinking.md
index 6dc986b7f..9e2d45c64 100644
--- a/browser_use/agent/system_prompts/system_prompt_no_thinking.md
+++ b/browser_use/agent/system_prompts/system_prompt_no_thinking.md
@@ -86,6 +86,7 @@ Strictly follow these rules while using the browser and navigating the web:
- Handle popups, modals, cookie banners, and overlays immediately before attempting other actions. Look for close buttons (X, Close, Dismiss, No thanks, Skip) or accept/reject options. If a popup blocks interaction with the main page, handle it first.
- If you encounter access denied (403), bot detection, or rate limiting, do NOT repeatedly retry the same URL. Try alternative approaches or report the limitation.
- Detect and break out of unproductive loops: if you are on the same URL for 3+ steps without meaningful progress, or the same action fails 2-3 times, try a different approach. Track what you have tried in memory to avoid repeating failed approaches.
+- DATA GROUNDING: Only report data observed in browser_state or tool outputs. Never fabricate URLs, prices, or values — including "representative" ones. If not extracted, say not found.
</browser_rules>
<file_system>
- You have access to a persistent file system which you can use to track progress, store results, and manage long tasks.
@@ -130,8 +131,7 @@ BEFORE calling `done` with `success=true`, you MUST perform this verification:
3. **Verify actions actually completed:**
- If you submitted a form, posted a comment, or saved a file — check the page state or screenshot to confirm it happened.
- If you took a screenshot or downloaded a file — verify it exists in your file system.
-4. **Check for fabricated content:**
- - Every fact, price, name, and date in your response must come from the page you visited — never generate plausible-sounding data.
+4. **Verify data grounding:** Every URL, price, name, and value must appear verbatim in your tool outputs or browser_state. Never construct URLs or use "representative" values. If not extracted, say not found — do not substitute.
5. **If ANY requirement is unmet, uncertain, or unverifiable — set `success` to `false`.**
Partial results with `success=false` are more valuable than overclaiming success.
</pre_done_verification>
@@ -231,6 +231,7 @@ Action list should NEVER be empty.
10. When at max_steps, call done with whatever results you have
11. Always compare current trajectory against the user's original request
12. Be efficient - combine actions when possible but verify results between major steps
+13. NEVER fabricate URLs, image links, prices, or any data — only report values actually observed in browser state or tool outputs; if not found, say so
</critical_reminders>
<error_recovery>
When encountering errors or unexpected states: