Create Insights
Quick Start
To create an insight:
- Analyze data to identify a finding
- Choose the appropriate insight type (SQL, Semantic, Segmentation, Funnel, Retention)
- Render or draft the insight to validate it
- Save the insight with
create_insight when the user wants a persistent chart
When to Use This Skill
- Found a notable pattern or anomaly
- User asks to save or share findings
- Creating a visualization from analysis
- Generating reports or dashboards content
Insight Types
| Type |
Use Case |
Visualization |
| SQL |
Custom query results |
Yes |
| Semantic |
Metrics from semantic layer |
Yes |
| Segmentation |
Event metrics over time, compared across property-based segments |
Yes |
| Funnel |
Conversion analysis |
Yes |
| Retention |
Do users come back after an event? |
Yes |
Core Workflow
Step 1: Identify the Finding
Before creating an insight:
- What is the key observation?
- Is it significant enough to share?
- What action should it drive?
Step 2: Choose Insight Type
Before choosing, triage through these questions:
- Is the metric available in the semantic layer? Yes → Semantic. Not sure → check the model first.
- Is the finding about sequential user behavior (steps, conversion, drop-off)? Yes → Funnel.
- Is the finding about whether users come back after a starting event? Yes → Retention.
- Is the finding about comparing event metrics across cohorts or property breakdowns (without ordered step dependencies)? Yes → Segmentation.
- Does it require custom joins, calculations, or raw data not covered above? Yes → SQL.
Select based on the analysis:
- Funnel Insight: Sequential steps, progression, conversion, drop-off between stages
- Retention Insight: Whether users return after a starting event (start event → returning event over time)
- Semantic Insight: Standard metrics from semantic models, trends, breakdowns
- SQL Insight: Custom query with specific logic, joins, calculations not in the semantic layer
- Segmentation Insight: Event analysis over time with breakdowns by event, user, or session properties to compare segment behavior
See the decide-actions skill for the full decision matrix and disambiguation rules.
Step 3: Preview and Validate
Always render or draft before creating:
- Verify data is correct
- Check visualization renders properly
- Ensure timeframe is appropriate
Use render_insight when the user wants to inspect a chart without saving it. Use draft_insight when the user is iterating on a chart in the UI. Use create_insight only when the user wants a saved insight.
Step 4: Save the Output
Use the current MCP tools:
create_insight saves SQL, semantic, segmentation, funnel, or retention insights. Dispatch on kind and provide the matching definition (sql_statement, semantic_definition, segmentation_definition, funnel_definition, or retention_definition).
Create each saved insight with:
- Clear, actionable title
- Concise description
- Appropriate visualization
- Relevant metadata
Creating SQL Insights
For custom query-based insights:
1. Write and validate SQL query
2. Render SQL insight with the query
3. Choose appropriate visualization
4. Create insight
SQL Insight Parameters
kind: sql
sql_statement: The DuckDB SQL query
visualization: Chart type (Line, Bar, Table, etc.)
Best Practices
- Use CTEs for readability
- Include time filters
- Limit result size for performance
- Add column aliases for display
Creating Semantic Insights
For metrics from the semantic layer:
1. Select source and measures
2. Add dimensions for grouping
3. Apply filters
4. Preview and validate
5. Create insight
Semantic Insight Parameters
kind: semantic
semantic_definition: Semantic model, measures, dimensions, filters, and visualization settings
measures: List of measures to aggregate
dimensions: Dimensions for grouping
filters: Filter conditions
visualization: Chart type
Creating Segmentation Insights
For segment and cohort comparisons:
1. Select the events/metrics to analyze
2. Choose aggregation (count, unique users, sum, average)
3. Add breakdowns by event, user, or session properties
4. Set filters and time range
5. Render segment results
6. Create insight
Segmentation Parameters
kind: segmentation
segmentation_definition: Events, aggregation, breakdowns, filters, and visualization settings
event_definitions: Which events to analyze
aggregation_mode: How to aggregate results (count, unique users, sum, average)
breakdowns: Properties used to compare segments
filters: Segment/filter criteria
timeframe: Analysis period
Creating Funnel Insights
For conversion analysis:
1. Define funnel steps (events)
2. Set conversion window
3. Choose ordering (strict/any)
4. Render funnel metrics
5. Create insight
Funnel Parameters
kind: funnel
funnel_definition: Steps, filters, conversion window, and ordering
steps: Ordered list of events
conversion_window: Time allowed between steps
ordering: Strict sequence or any order
Creating Retention Insights
For analyzing whether users come back after a starting event:
1. Define the start event
2. Define the returning event
3. Set time range
4. Render retention results
5. Create insight
Retention Parameters
kind: retention
retention_definition: Starting event, returning event, filters, and retention settings
start_event: The initial event that begins the retention window
returning_event: The event that counts as a return
timeframe: Analysis period
Writing Effective Titles
Good titles are:
- Actionable: "Revenue dropped 15% last week"
- Specific: Include key metric and timeframe
- Concise: Under 100 characters
Examples
| Good |
Bad |
| "Mobile conversion rate dropped 20% in Q4" |
"Conversion issue" |
| "New users from organic search up 3x" |
"Traffic increase" |
| "Cart abandonment spikes on weekends" |
"Weekend pattern" |
Writing Descriptions
Descriptions must be 200 characters or less.
Include:
- What: The key observation
- Context: Comparison or benchmark
- Impact: Business significance
- Recommendation: Suggested action (if space permits)
Example
Mobile conversion dropped 20% (3.2% to 2.5%) last month, coinciding with the March 1st checkout redesign. Consider A/B testing the previous flow.
Visualization Selection
| Data Type |
Recommended |
| Time series |
Line, Area |
| Comparison |
Bar, BarList |
| Distribution |
Pie, Bar |
| Single metric |
Metric |
| Detailed data |
Table |
| Funnel |
Funnel (built-in) |
| Retention |
Retention (built-in) |
Common Pitfalls
- Creating insights without clear value
- Vague titles that don't convey the finding
- Missing context in descriptions
- Wrong visualization for data type
- Not previewing before creating
- Creating duplicates of existing insights
Reference Files
- SQL insights
- Semantic insights
- Segmentation insights
- Funnel insights
1---2name: create-insights3description: Drafts, renders, and saves insights of every type (SQL, semantic, segmentation, funnel, retention). Use to build, preview, or share a visualization. Returns a saved insight.4---56# Create Insights78## Quick Start910To create an insight:11121. Analyze data to identify a finding132. Choose the appropriate insight type (SQL, Semantic, Segmentation, Funnel, Retention)143. Render or draft the insight to validate it154. Save the insight with `create_insight` when the user wants a persistent chart1617## When to Use This Skill1819- Found a notable pattern or anomaly20- User asks to save or share findings21- Creating a visualization from analysis22- Generating reports or dashboards content2324## Insight Types2526| Type | Use Case | Visualization |27| ------------ | ---------------------------------------------------------------- | ------------- |28| SQL | Custom query results | Yes |29| Semantic | Metrics from semantic layer | Yes |30| Segmentation | Event metrics over time, compared across property-based segments | Yes |31| Funnel | Conversion analysis | Yes |32| Retention | Do users come back after an event? | Yes |3334## Core Workflow3536### Step 1: Identify the Finding3738Before creating an insight:3940- What is the key observation?41- Is it significant enough to share?42- What action should it drive?4344### Step 2: Choose Insight Type4546Before choosing, triage through these questions:47481. **Is the metric available in the semantic layer?** Yes → **Semantic**. Not sure → check the model first.492. **Is the finding about sequential user behavior** (steps, conversion, drop-off)? Yes → **Funnel**.503. **Is the finding about whether users come back** after a starting event? Yes → **Retention**.514. **Is the finding about comparing event metrics across cohorts or property breakdowns** (without ordered step dependencies)? Yes → **Segmentation**.525. **Does it require custom joins, calculations, or raw data not covered above?** Yes → **SQL**.5354Select based on the analysis:5556- **Funnel Insight**: Sequential steps, progression, conversion, drop-off between stages57- **Retention Insight**: Whether users return after a starting event (start event → returning event over time)58- **Semantic Insight**: Standard metrics from semantic models, trends, breakdowns59- **SQL Insight**: Custom query with specific logic, joins, calculations not in the semantic layer60- **Segmentation Insight**: Event analysis over time with breakdowns by event, user, or session properties to compare segment behavior6162See the [`decide-actions`](../decide-actions/SKILL.md) skill for the full decision matrix and disambiguation rules.6364### Step 3: Preview and Validate6566Always render or draft before creating:6768- Verify data is correct69- Check visualization renders properly70- Ensure timeframe is appropriate7172Use `render_insight` when the user wants to inspect a chart without saving it. Use `draft_insight` when the user is iterating on a chart in the UI. Use `create_insight` only when the user wants a saved insight.7374### Step 4: Save the Output7576Use the current MCP tools:7778- `create_insight` saves SQL, semantic, segmentation, funnel, or retention insights. Dispatch on `kind` and provide the matching definition (`sql_statement`, `semantic_definition`, `segmentation_definition`, `funnel_definition`, or `retention_definition`).7980Create each saved insight with:8182- Clear, actionable title83- Concise description84- Appropriate visualization85- Relevant metadata8687## Creating SQL Insights8889For custom query-based insights:9091```921. Write and validate SQL query932. Render SQL insight with the query943. Choose appropriate visualization954. Create insight96```9798### SQL Insight Parameters99100- `kind`: `sql`101- `sql_statement`: The DuckDB SQL query102- `visualization`: Chart type (Line, Bar, Table, etc.)103104### Best Practices105106- Use CTEs for readability107- Include time filters108- Limit result size for performance109- Add column aliases for display110111## Creating Semantic Insights112113For metrics from the semantic layer:114115```1161. Select source and measures1172. Add dimensions for grouping1183. Apply filters1194. Preview and validate1205. Create insight121```122123### Semantic Insight Parameters124125- `kind`: `semantic`126- `semantic_definition`: Semantic model, measures, dimensions, filters, and visualization settings127- `measures`: List of measures to aggregate128- `dimensions`: Dimensions for grouping129- `filters`: Filter conditions130- `visualization`: Chart type131132## Creating Segmentation Insights133134For segment and cohort comparisons:135136```1371. Select the events/metrics to analyze1382. Choose aggregation (count, unique users, sum, average)1393. Add breakdowns by event, user, or session properties1404. Set filters and time range1415. Render segment results1426. Create insight143```144145### Segmentation Parameters146147- `kind`: `segmentation`148- `segmentation_definition`: Events, aggregation, breakdowns, filters, and visualization settings149- `event_definitions`: Which events to analyze150- `aggregation_mode`: How to aggregate results (count, unique users, sum, average)151- `breakdowns`: Properties used to compare segments152- `filters`: Segment/filter criteria153- `timeframe`: Analysis period154155## Creating Funnel Insights156157For conversion analysis:158159```1601. Define funnel steps (events)1612. Set conversion window1623. Choose ordering (strict/any)1634. Render funnel metrics1645. Create insight165```166167### Funnel Parameters168169- `kind`: `funnel`170- `funnel_definition`: Steps, filters, conversion window, and ordering171- `steps`: Ordered list of events172- `conversion_window`: Time allowed between steps173- `ordering`: Strict sequence or any order174175## Creating Retention Insights176177For analyzing whether users come back after a starting event:178179```1801. Define the start event1812. Define the returning event1823. Set time range1834. Render retention results1845. Create insight185```186187### Retention Parameters188189- `kind`: `retention`190- `retention_definition`: Starting event, returning event, filters, and retention settings191- `start_event`: The initial event that begins the retention window192- `returning_event`: The event that counts as a return193- `timeframe`: Analysis period194195## Writing Effective Titles196197Good titles are:198199- **Actionable**: "Revenue dropped 15% last week"200- **Specific**: Include key metric and timeframe201- **Concise**: Under 100 characters202203### Examples204205| Good | Bad |206| ------------------------------------------ | ------------------ |207| "Mobile conversion rate dropped 20% in Q4" | "Conversion issue" |208| "New users from organic search up 3x" | "Traffic increase" |209| "Cart abandonment spikes on weekends" | "Weekend pattern" |210211## Writing Descriptions212213**Descriptions must be 200 characters or less.**214215Include:216217- **What**: The key observation218- **Context**: Comparison or benchmark219- **Impact**: Business significance220- **Recommendation**: Suggested action (if space permits)221222### Example223224> Mobile conversion dropped 20% (3.2% to 2.5%) last month, coinciding with the March 1st checkout redesign. Consider A/B testing the previous flow.225226## Visualization Selection227228| Data Type | Recommended |229| ------------- | -------------------- |230| Time series | Line, Area |231| Comparison | Bar, BarList |232| Distribution | Pie, Bar |233| Single metric | Metric |234| Detailed data | Table |235| Funnel | Funnel (built-in) |236| Retention | Retention (built-in) |237238## Common Pitfalls239240- Creating insights without clear value241- Vague titles that don't convey the finding242- Missing context in descriptions243- Wrong visualization for data type244- Not previewing before creating245- Creating duplicates of existing insights246247## Reference Files248249- [SQL insights](references/sql-insights.md)250- [Semantic insights](references/semantic-insights.md)251- [Segmentation insights](references/segmentation-insights.md)252- [Funnel insights](references/funnel-insights.md)