Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(replay-vision): tighten monitor yes that never looked up events in prompt (#100912)

Hayne Ryu3a74e7d15db6
diff --git a/products/replay_vision/backend/temporal/scanners/prompts/monitor_step.jinja b/products/replay_vision/backend/temporal/scanners/prompts/monitor_step.jinja
index 2a4cc980ec38..2a4f1b3c0eaa 100644
--- a/products/replay_vision/backend/temporal/scanners/prompts/monitor_step.jinja
+++ b/products/replay_vision/backend/temporal/scanners/prompts/monitor_step.jinja
@@ -2,7 +2,7 @@
Before deciding, verify each moment that bears on this condition with `get_events_around`: the video alone is easy to misread, and what the events record at a moment outranks a visual impression of it.
-In `reasoning`, weigh the evidence for and against, noting what the events confirmed or contradicted; then set `verdict` to {% if allow_inconclusive %}`yes` if there's direct visual or event-level evidence the condition occurred, `no` if there's direct evidence it did not, or `inconclusive` only when the session genuinely doesn't provide enough signal to decide.{% else %}`yes` only if there's direct visual or event-level evidence the condition occurred, otherwise `no` — never `inconclusive`.{% endif %} A `yes` needs at least one specific moment you checked with `get_events_around`. A plausible story the events do not support is not a `yes`.
+In `reasoning`, weigh the evidence for and against, noting what the events confirmed or contradicted; then set `verdict` to {% if allow_inconclusive %}`yes` if there's direct visual or event-level evidence the condition occurred, `no` if there's direct evidence it did not, or `inconclusive` only when the session genuinely doesn't provide enough signal to decide.{% else %}`yes` only if there's direct visual or event-level evidence the condition occurred, otherwise `no` — never `inconclusive`.{% endif %} A `yes` needs at least one specific moment you checked with `get_events_around`. A plausible story the events do not support is not a `yes`. Never say you checked the events at a moment unless you called `get_events_around` for it; if a claim rests on the video alone, say so.
{{ cite_in('reasoning') }}
diff --git a/products/replay_vision/backend/tests/test_scanners.py b/products/replay_vision/backend/tests/test_scanners.py
index 2e2e89ef26b1..aa6d22fb6e31 100644
--- a/products/replay_vision/backend/tests/test_scanners.py
+++ b/products/replay_vision/backend/tests/test_scanners.py
@@ -249,6 +249,7 @@ class TestMonitorScanner:
# A `yes` must be corroborated with the events tool, not read off the video alone.
assert "get_events_around" in instruction
assert "A plausible story the events do not support is not a `yes`." in instruction
+ assert "Never say you checked the events at a moment unless you called `get_events_around`" in instruction
def test_core_step_escapes_left_angle_in_user_prompt(self) -> None:
# Scanner creator content is "trusted" but escaped anyway — defense in depth.