How to design custom facets for AI agent traces (2026)
Blog post from Braintrust
Braintrust Topics provides a framework for classifying AI agent traces using both built-in and custom facets, which help identify general patterns and domain-specific insights. Built-in facets like Task, Sentiment, and Issues cover basic dimensions of user-agent interactions, but custom facets can offer more granular classifications tailored to specific applications, such as churn risk, citation quality, and tool reliability. Creating effective custom facets involves designing stable label sets, using preprocessors, and coordinating prompts and exclusion patterns to ensure accurate and consistent classifications. The guide emphasizes the importance of refining facets through iterative testing and reviews to address edge cases and improve labeling accuracy. It also underscores the significance of tying each label to a specific workflow to enhance decision-making processes. Custom facets utilize a preprocessor, prompt, and optional exclusion regex to convert traces into labeled clusters, enabling more sophisticated analyses and evaluations of AI interactions.