Getting started with LLM analytics

Last updated:

|

Capture LLM conversations

LLM analytics gives you x-ray vision into your LLM applications. You can track:

  • 🗣️ Every conversation (inputs, outputs, and tokens)
  • 🤖 Model performance (cost, latency and error rates)
  • 🔍 Full traces for when you need to go detective mode
  • 💰 How much each chat/user/organization is costing you

The first step is to install a PostHog SDK to capture conversations, requests, and responses from an LLM provider.

Platforms

Install PostHog SDK

Track AI generations

Once you've installed the SDK, every LLM call automatically becomes a generation – a detailed record of what went in and what came out. Each generation captures:

  • Complete conversation context (inputs and outputs)
  • Token counts and usage metrics
  • Response latency and performance data
  • Automatic cost calculation based on model pricing
  • Trace IDs to group related LLM calls together

PostHog's SDK wrappers handle all the heavy lifting. Use your LLM provider as normal and we'll capture everything automatically.

Learn about generations

Evaluate model usage

PostHog's LLM analytics dashboard provides a comprehensive overview of your LLM performance. Break usage metrics down by model, latency, cost, and more.

LLM observability dashboard
Analyze LLM performance

Integrate customer data

Take advantage of PostHog's platform to integrate your customer data with LLM analytics.

Product analytics

All LLM analytics are captured as standard PostHog events, which means you can create dashboards, trends, funnels, custom SQL queries, alerts, and more.

LLM observability dashboard

Error tracking

LLM generated errors are automatically captured in PostHog's error tracking for you to monitor, debug, and resolve.

LLM analytics error tracking

Session replay

Watch session replays to see exactly how users interact with your LLM features.

LLM analytics session replay

Use for free

PostHog LLM analytics is designed to be cost-effective with a generous free tier and transparent usage-based pricing. Since we don't charge per seat, more than 90% of companies use PostHog for free.

TL;DR 💸

  • No credit card required to start
  • First 100K LLM events per month are free with 30-day retention
  • Above 100k we have usage-based pricing starting at $0.00006/event with discounts as volume increases
  • Set billing limits to avoid surprise charges
  • See our pricing page for more up-to-date details

That's it! You're ready to start integrating.

Install LLM analytics

Questions? Ask Max AI.

It's easier than reading through 817 pages of documentation

Community questions

Was this page useful?

Next article

Install LLM analytics with PostHog

Choose your platform below to get started with LLM analytics installation.

Read next article