Skip to content

Commit 3192f50

Browse files
authored
docs: Add sentiment classification to LLM Analytics docs (#15195)
* docs(llm-analytics): add sentiment classification section to traces page Documents the new on-demand sentiment classification feature from PostHog/posthog#48277. Sentiment classifies user messages in traces as negative/neutral/positive using a local ONNX model. * docs(llm-analytics): add sentiment classification section to generations page --------- Co-authored-by: inkeep[bot] <257615677+inkeep[bot]@users.noreply.github.com>
1 parent 3b28311 commit 3192f50

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

contents/docs/llm-analytics/generations.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ Spans are individual operations within a trace. Some spans represent generations
101101

102102
You can automatically assess the quality of your generations using [evaluations](/docs/llm-analytics/evaluations). Evaluations use an LLM-as-a-judge approach to score outputs based on criteria like relevance, helpfulness, or safety.
103103

104+
## Sentiment classification
105+
106+
PostHog can classify the sentiment of user messages in your generations as negative, neutral, or positive. Sentiment is computed on-demand using a local model when you view a [trace](/docs/llm-analytics/traces) — no data is sent to third-party services.
107+
104108
## Event properties
105109

106110
<GenerationEventSnippet />

contents/docs/llm-analytics/traces.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ Clicking on a trace opens a timeline of the interaction with all the generation
2727
<Caption>A trace presents LLM event data in a timeline, tree-structured view </Caption>
2828

2929

30+
## Sentiment classification
31+
32+
PostHog can classify the sentiment of user messages in a trace as negative, neutral, or positive. Sentiment is computed on-demand using a local model when you view a trace – no data is sent to third-party services. Each trace gets an overall sentiment label and score, with a per-generation and per-message breakdown.
33+
3034
## AI event hierarchy
3135

3236
```mermaid

0 commit comments

Comments
 (0)