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): stop group summaries padding thin data to fill length (#71373)

Kim Svatos Dugan48bbebf2372d
diff --git a/products/replay_vision/backend/temporal/vision_actions/synthesis.py b/products/replay_vision/backend/temporal/vision_actions/synthesis.py
index 19c1ce653e50..11e926c05078 100644
--- a/products/replay_vision/backend/temporal/vision_actions/synthesis.py
+++ b/products/replay_vision/backend/temporal/vision_actions/synthesis.py
@@ -66,10 +66,15 @@ _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. Write tight Markdown (a short intro plus a "
- "handful of themed sections). Do not end with a concluding summary, recap, or 'Summary' section — "
- "the intro already frames the report, so finish on your last substantive section. Aim for under "
- "~600 words. A header line naming the scanner, the time "
+ "opportunities — 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. "
+ "A header line naming the scanner, the time "
"window, and the recording count is added automatically above your output — do not restate that "
"metadata; focus on the observations' content. "
"Ground every theme and claim in the observations: when a pattern rests on only one or two observations, "