Skip to content

Automate browser based workflows with AI

fix: improve conditional prompt for jinja+natlang consistency (SKY-8465) (#5172)

Celal Zamanoğlufe460f4bd7e4
diff --git a/skyvern/forge/prompts/skyvern/conditional-prompt-branch-evaluation.j2 b/skyvern/forge/prompts/skyvern/conditional-prompt-branch-evaluation.j2
index 1b7d09439..e62ddc824 100644
--- a/skyvern/forge/prompts/skyvern/conditional-prompt-branch-evaluation.j2
+++ b/skyvern/forge/prompts/skyvern/conditional-prompt-branch-evaluation.j2
@@ -1,4 +1,7 @@
Evaluate if the following condition(s) are TRUE or FALSE.
+
+CRITICAL RULE: If all the data needed to evaluate a condition is already present in the condition text, you MUST evaluate it using ONLY the condition text. Do NOT reference the page content. Only use the page content (screenshot/HTML) when the condition explicitly asks about what is on the page (e.g., "the date in the page", "the column under payments section").
+
{% if conditions|length == 1 %}
Condition: {{ conditions[0] }}
{% else %}