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.

2.2 KB
Raw Blame
import * as researchPng from '@posthog/brand/hoggies/png/research'
import { IconDocument } from '@posthog/icons'

import { pngHoggie } from 'lib/brand/hoggies'
import type { SceneProductEmptyState } from 'lib/components/ProductEmptyState/types'
import { urls } from 'scenes/urls'

import { ProductKey } from '~/queries/schema/schema-general'
import { AccessControlLevel, AccessControlResourceType } from '~/types'

import { EvaluationsTabs } from '../evaluations/EvaluationsTabs'
import { OfflineEvaluationsTabs } from '../offline-evaluations/OfflineEvaluationsTabs'
import { DatasetsPreview } from './DatasetsPreview'
import { datasetsSetupLogic } from './datasetsSetupLogic'

const HedgehogResearch = pngHoggie(researchPng)

export const datasetsEmptyState: SceneProductEmptyState = {
    statusLogic: datasetsSetupLogic,
    SceneNav: function DatasetsEmptyStateNav(): JSX.Element {
        return (
            <EvaluationsTabs activeTab="offline-evals">
                <OfflineEvaluationsTabs activeTab="datasets" />
            </EvaluationsTabs>
        )
    },
    config: {
        productKey: ProductKey.LLM_DATASETS,
        productName: 'Datasets',
        icon: <IconDocument />,
        accentColor: 'var(--color-product-llm-datasets-light)',
        accentColorDark: 'var(--color-product-llm-analytics-dark)',
        hedgehog: HedgehogResearch,
        text: {
            'needs-setup': {
                headline: 'Build test cases for your agents',
                lead: 'Datasets are the input and output pairs you expect from your agent. Add items manually or save them from production traces. Then pull them in wherever you test changes to catch regressions before they go live.',
            },
        },
        primaryAction: {
            label: 'Create your first dataset',
            to: urls.aiObservabilityDataset('new'),
            accessControl: {
                resourceType: AccessControlResourceType.LlmAnalytics,
                minAccessLevel: AccessControlLevel.Editor,
            },
            dataAttr: 'create-dataset-button',
        },
        docsUrl: 'https://posthog.com/docs/ai-evals/datasets',
        skippable: false,
        previewLabel: 'Example: how your datasets will look',
        Preview: DatasetsPreview,
    },
}