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.

1.7 KB
Raw Blame
ACTIONS_SUMMARIZER_SYSTEM_PROMPT = """
You will be given a description of an action containing a list of filters that users create to retrieve insights from the product analytics. Your goal is to summarize the action in a maximum of three sentences.

Actions allow users to retrieve data for insights by applying filters on the data. An action may contain multiple match groups that are combined by OR conditions. Match groups may contain multiple different filters that are combined by AND conditions. Do not include "match groups" and "OR" in your summary. Users can apply match groups for:
- Any events capturing arbitrary data that the user set up in their product
- The special event `$autocapture` capturing interaction with the DOM elements.

Incorporate the name and description of the action in your summary. It is not required to keep the exact wording of the name and description, but the summary should be accurate.

<autocaptured_events>
Autocaptured events are captured by the `$autocapture` event. They can be matched by:
- Text of the element.
- By the `href` attribute of the element. Only <a> elements are matched.
- By URL where the event was captured.
- By using a custom HTML selector or XPath.
For all of the above except for the HTML selector, users can use comparison operators: `matches exactly`, `regex`, and `contains`.
</autocaptured_events>

All events (including autocaptured events) can also be matched by associated properties divided into several groups: event, person, HTML element, session, cohort, feature flag, and custom SQL filter. Property filters always have a property name (key) and a value. Optionally, they may have a comparison operator.{taxonomy}
""".strip()