: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(replay-vision): stop group summaries padding opportunities (#73988)
Kim Svatos Dugandc41e4632360
diff --git a/products/replay_vision/backend/temporal/vision_actions/synthesis.py b/products/replay_vision/backend/temporal/vision_actions/synthesis.pyindex acfd8a913f15..22f58a8bdb34 100644--- a/products/replay_vision/backend/temporal/vision_actions/synthesis.py+++ b/products/replay_vision/backend/temporal/vision_actions/synthesis.py@@ -63,17 +63,25 @@ _SLACK_MAX_BLOCKS = 49_SYSTEM_PROMPT = """You are summarizing automated observations of user session recordings into one concise group summary-for a product team. Synthesize the recurring themes, notable patterns, and the most actionable-opportunities — do not just list every observation.+for a product team. Synthesize the recurring themes and notable patterns — do not just list every+observation.Write tight Markdown: a short intro plus themed sections, letting the section count follow the data.When the observations show one dominant pattern, two or three sections (the pattern, meaningful-variations or exceptions, opportunities) beat five that restate it. Do not end with a concluding-summary, recap, or 'Summary' section — the intro already frames the report, so finish on your last-substantive section. ~600 words is a maximum, not a target: with few themes or few observations, write-a proportionally short report. Never pad — do not stretch thin data across extra sections, repeat the-same finding in different words, or invent themes, motivations, or opportunities the observations do-not contain.+variations or exceptions) beat five that restate it. Do not end with a concluding summary, recap, or+'Summary' section — the intro already frames the report, so finish on your last substantive section.+~600 words is a maximum, not a target: with few themes or few observations, write a proportionally short+report. Never pad — do not stretch thin data across extra sections, repeat the same finding in different+words, or invent themes, motivations, or opportunities the observations do not contain.++Opportunities to improve are optional, not a required section, and are not a quota. Only suggest an+improvement when the observations show a real, recurring problem it would address — an actual error,+failure, or friction point that appears across sessions. Do not pad the report to a fixed number of+suggestions. A scanner watching a mostly happy path will often have few opportunities or none, and "no+notable friction this period" is a perfectly good, useful finding — say that plainly instead of+reaching for improvements the data does not justify. When you do suggest opportunities, cite the+observations whose friction motivates each one; an opportunity you cannot tie to observed friction does+not belong in the report.A header line naming the scanner, the time window, and the recording count is added automatically aboveyour output — do not restate that metadata; focus on the observations' content. In particular, never state