- Discover what users are trying to accomplish
- Find where users struggle, get confused, or encounter errors
- Track user satisfaction and frustration across interactions
- Pinpoint failures and recurring issues in your AI’s responses
How it works
Topics runs a daily pipeline on your logs:- Preprocessing — Each trace is formatted into readable text. Messages, tool calls, and nested spans become a narrative.
- Facets — An LLM analyzes the preprocessed trace and extracts a concise summary based on user intent (Task), emotional tone (Sentiment), and agent behavior (Issues).
- Topics — Once at least 100 facet summaries are collected, a clustering algorithm groups similar ones. For example, “User wants a refund,” “Requesting a chargeback,” and “Asking for money back” might all become the topic “Refund requests.”
- Classification — Each trace is labeled with the closest topic (e.g., “Refund requests”). Classifications appear in your logs table, where you can filter, query with SQL, and build evaluation datasets.
- Initially: Existing logs are optionally backfilled with facet summaries.
- Continuously: New logs are processed contiuously as they arrive.
- Daily: Topics are regenerated daily from collected facet summaries. Topic generation requires at least 100 summaries.
Enable topics
Topics live inside your project’s logs.-
Go to Logs and click Enable topics.
A dialog opens showing the three built-in facets that will be activated:
- Task: Extracts the user’s intent or goal from the conversation (e.g., “Creating a dataset,” “Debugging an API error”).
- Sentiment: Extracts the user’s emotional tone (e.g., “POSITIVE,” “FRUSTRATED,” “NEUTRAL”).
- Issues: Identifies problems with agent behavior or responses (e.g., “Tool call failed,” “Incomplete answer”).
- Choose whether to Apply to existing traces or only to new traces.
- Click Enable topics.
Review insights
Topics surfaces results across your logs — in the logs table, within individual traces, as distributions across all facets, and as trends over time.Examine specific traces
Once topics are generated, each trace in the logs table shows a facet summary — the raw label extracted by the LLM — and the classification — the topic it was matched to. If the LLM couldn’t extract a meaningful label for a facet, the summary will indicate no match and the trace won’t have a classification for that facet. You can filter by classification using the Filter menu or SQL, sort by any facet column, and select rows to build datasets. For a deeper look, open any trace — facet summaries and classifications are also visible in the Thread and Signals views.
View topic distributions
Select Display > Row type > Topics to see topic distributions across all your facets. Each topic appears as a card showing its percentage of the total and trace count.
Cluster a filtered subset
Filter your logs to any subset — by user, time range, or any other attribute — then use Display > Cluster traces by and choose a facet to cluster that subset on demand. For example, filter to a specific user’s conversations and cluster by Task to discover how they use your product. Each topic can be expanded to show keywords and sample summaries.
Track trends over time
When topics are active, a Topics chart automatically appears on Monitor. This chart shows classified log volume over time. Click any data point to see those traces in the logs table.
Act on findings
Once patterns emerge, you can turn them into action: Build datasets for evaluation, automatically score problematic interactions, or assign issues to your team for review.Build datasets from topics
Filter logs by topic to build targeted evaluation datasets.- Go to Logs and click Filter.
-
Select Classifications and choose the classification you want to filter by.
Alternately, click SQL and enter a filter clause. See the SQL reference for more query patterns.
- Select the logs you want to include.
- Click + Dataset and choose an existing dataset or create a new one.
- “Error Investigation” tasks → test your error handling
- Negative sentiment interactions → improve responses
- “Pricing Questions” → evaluate your pricing explanations
Score logs based on topics
Create scorers that flag logs with negative sentiment, penalize specific issue types, or alert when certain topics appear together. Example scorer that flags negative checkout experiences:-
Save the code to a file and push it:
- Go to Settings > Automations and click + Rule.
- Select your scorer, set Scope to Trace, configure the sampling rate, and click Create rule.
Assign topics for review
Assign logs matching specific topics for human review.- Go to Logs and click Filter.
-
Select Classifications and choose the classification you want to filter by.
Alternately, click SQL and enter a filter clause. See the SQL reference for more query patterns.
- Select the logs you want to assign.
- Select Assign and choose a team member.
Configure and manage topics
Adjust topics automation
To adjust sampling rate, idle timeout, or add a filter for which logs get processed, go to Settings > > Automations and edit the Topics rule.- Filter: Restricts which traces are processed. Use the basic filter UI or enter a SQL expression directly.
- Sampling rate: Percentage of incoming traces that get processed (default: 100%).
- Idle time: Seconds after the last trace before the automation is run again (default: 600).
Check automation status
Topics runs as a daily pipeline. To see a live indicator of the current stage, go to Logs and select Topics > Status. The pipeline moves through these stages:| Stage | Meaning |
|---|---|
| Idle | Waiting until the next scheduled run. Click Re-generate topics to trigger a run immediately. |
| Waiting for facets | Waiting for at least 100 processed traces before generating topics. |
| Recomputing topics | Generating new topics based on collected facet summaries. |
| Pending logs processing | New topics generated; preparing to apply classifications to existing logs. |
| Processing logs | Applying newly generated topics to existing logs. |
Create custom facets
Custom facets require Pro or Enterprise plans. The built-in facets (Task, Sentiment, Issues) are available on all plans.
- Domain-specific categories: Your logs have patterns that built-in topic maps don’t capture.
- Too many uncategorized traces: The built-in topic maps aren’t extracting relevant summaries.
- Wrong level of detail: You need more specific categorization (e.g., distinguish between different API endpoints instead of just “API request”).
- Business-specific needs: Track patterns unique to your product (e.g., “Feature requests,” “Pricing questions,” “Integration issues”).
- Go to Logs and select Topics > + Create facet.
-
Give your topic map a name and description. Example:
- “Churn risk”
- “Topic map for assessing customer churn risk based on conversations”
-
Choose a preprocessor to transform your trace data.
- Select Preprocessor > Thread (default) to format traces as conversation threads.
-
Or select + Custom preprocessor to write a JavaScript function that filters or transforms your data. Common patterns:
-
Enter a prompt with clear instructions for what to extract. Example:
-
If necessary, enter a case-insensitive regex to exclude facet outputs from being included in topic generation. For example, if the facet output is
'NONE', a regex of'^NONE'will exclude it from being used in topic generation. - Click Test to verify extraction quality on sample traces.
-
Choose whether to Apply to existing traces or only to new traces.
This option triggers processing across all automated facets, not just this one. Logs already processed for a given facet are skipped, but facets you previously opted out of backfilling may get processed.
- Click Create.
Pause a facet
To pause a facet from processing new traces:- Go to Logs.
- Select Topics and choose the facet.
- Click Pause.
Troubleshooting
Results not showing up yet
Results not showing up yet
Topics run on a daily cycle, so new classifications won’t appear immediately after enabling. Check the automation status to see where the pipeline is. If you want results sooner, click Re-generate topics in the status dialog to trigger a run immediately.
Topics not generating
Topics not generating
Topic generation requires at least 100 facet summaries. If the automation status shows Waiting for facets, more traces need to be processed first.
- Increase the sampling rate to process traces faster.
- If the project has few traces, wait for more to arrive.
Poor topic quality
Poor topic quality
Too many uncategorized traces: Topics may be too specific for your data. Try adjusting the automation filter to include a broader range of traces, or create a custom facet with a more targeted prompt.Topics too generic: Refine the facet prompt to extract more specific summaries, such as distinguishing between different task subtypes.Summaries too similar: If the facet produces nearly identical summaries, clustering can’t differentiate well. Review sample summaries and adjust the prompt to capture more variation.
Missing classifications on logs
Missing classifications on logs
Classification runs automatically after topics are generated. Check the automation status:
- Processing logs: Classification is in progress. Wait for it to complete.
- Idle: Click Re-generate topics in the status dialog to trigger a new cycle.
- Older logs: Only approximately the most recent 500 logs are backfilled on enable. Traces outside that window won’t have classifications.
Next steps
- Query classifications with SQL
- Monitor trends with dashboards and charts
- Create evaluation datasets from specific topics
- Set up online scoring based on classifications