Skip to content

PostHog with text analytics extensions, serving as an advanced LLM analytics platform.

License

Notifications You must be signed in to change notification settings

postlang/posthog-llm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

posthoglogo

Discord Community PRs Welcome Docker Pulls GitHub commit activity GitHub closed issues

Docs - Community - Roadmap - Changelog - Bug reports

PostHog-LLM

PostHog-LLM is a fork of PostHog with extensions to use PostHog as a LLM text analytics platform and be able to display the LLM interactions while exploring insights. Understand user behavior interacting with your LLMs to gain insights into their preferences, identify patterns and discover how you can improve your LLMs products to better serve your users.

Get started

Self-hosted

You can deploy a hobby instance in one line on Linux with Docker (recommended 4GB memory):

 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/postlang/posthog-llm/HEAD/bin/deploy-hobby)"

Uploading data

To start uploading some user-LLM interactions to PostHog-LLM, checkout our demo-data folder or check out our repository with examples on how to upload data to PostHog-LLM.

Install Plugins

To maximize the capabilities of PostHog-LLM for analytics in LLMs, it's important to augment LLM interactions with additional metadata. This enhancement can be done through the deployment of machine learning models as PostHog plugins. Examples of such plugins, which are available in their respective repositories, include:

LLM conversation flow classifier: Enhances understanding of the conversation with specific agent and user flow labels.

Emotion classifier: Identifies emotions in text, providing a deeper insight into the emotional context of interactions.

Toxicity classifier: Detects toxic content in text, allowing for a safer and more positive user experience.

Prompt attack detection: Detects prompt attacks in text, providing a safeguard against malicious behavior.

These plugins link the PostHog data ingestion process with the machine learning models. These models need to be hosted on separate servers, a setup process that is detailed within each model's repository.

To install a plugin, navigate to the Data Pipeline section within the PostHog-LLM user interface, select the 'Manage apps tab' tab, click on Install app advanced button and enter the GitHub repository URL of the plugin into the designated field. This action will fetch the plugin's code from GitHub and initiate its installation. Hit the Save button and then go to the Apps tab to specify the address and port of your model server in the API_SERVER_URL (e.g. http:https://localhost:9612) field.

PostHog's plugin system is designed to facilitate the configuration of a model pipeline, enabling sequential data processing where each model can access and use properties appended by preceding models. The order of these models, as displayed in the PostHog UI, is important for ensuring that each model operates on the enriched dataset provided by its predecessors. PostHog-LLM adheres to a naming convention for LLM properties, and the machine learning models above are triggered exclusively for LLM events that include interaction texts.

PostHog is an all-in-one, open source platform for building better products

  • Specify events manually, or use autocapture to get started quickly
  • Analyze data with ready-made visualizations, or do it yourself with SQL
  • Gather insights by capturing session replays, console logs, and network monitoring
  • Improve your product with A/B testing that automatically analyzes performance
  • Safely roll out features to select users or cohorts with feature flags
  • Send out fully customizable surveys to specific cohorts of users
  • Connect to external services and manage data flows with PostHog CDP

Table of Contents

Docs

ui-demo

Want to find out more? Request a demo!

PostHog brings all the tools and data you need to build better products.

Analytics and optimization tools

  • Event-based analytics: Capture your product's usage automatically, or customize it to your needs
  • User and group tracking: Understand the people and groups behind the events and track properties about them
  • Data visualizations: Create and share graphs, funnels, paths, retention, and dashboards
  • SQL access: Use SQL to get a deeper understanding of your users, breakdown information and create completely tailored visualizations
  • Session replays: Watch videos of your users' behavior, with fine-grained filters and privacy controls, as well as network monitoring and captured console logs
  • Heatmaps: See where users click and get a visual representation of their behaviour with the PostHog Toolbar
  • Feature flags: Test and manage the rollout of new features to specific users and groups, or deploy flags as kill-switches
  • A/B and multivariate experimentation: run simple or complex changes as experiments and get automatic significance calculations
  • Correlation analysis: Discover what events and properties correlate with success and failure
  • Surveys: Collect qualitative feedback from your users using fully customizable surveys

Data and infrastructure tools

Read a full list of PostHog features.

Contributing

We <3 contributions big and small. In priority order (although everything is appreciated) with the most helpful first:

Philosophy

Our mission is to increase the number of successful products in the world. To do that, we build product and data tools that help you understand user behavior without losing control of your data.

In our view, third-party analytics tools do not work in a world of cookie deprecation, GDPR, HIPAA, CCPA, and many other four-letter acronyms. PostHog is the alternative to sending all of your customers' personal information and usage data to third-parties.

PostHog gives you every tool you need to understand user behavior, develop and test improvements, and release changes to make your product more successful.

PostHog operates in public as much as possible. We detail how we work and our learning on building and running a fast-growing, product-focused startup in our handbook.

Open-source vs. paid

This repo is available under the MIT expat license, except for the ee directory (which has it's license here) if applicable.

Need absolutely 💯% FOSS? Check out our posthog-foss repository, which is purged of all proprietary code and features.

To learn more, book a demo or see our pricing page.

Contributors 🦸

Check the PostHog repository for more details all for the list of authors and contributors.

About

PostHog with text analytics extensions, serving as an advanced LLM analytics platform.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published