Skip to main content

Introduction

Tags allow you to add custom metadata to your evaluations, making it easier to organize, filter, and analyze your evaluation data. Use tags to categorize evaluations by environment, version, feature flags, experiments, or any other dimension that helps you track your AI application’s performance.

Why Use Tags?

  • Organize evaluations: Group by environment, version, or feature flags
  • Filter and query: Find evaluations in your BI or analytics tools
  • Track experiments: Tag with experiment IDs or A/B test variants
  • Monitor deployments: Tag with deployment versions or release numbers

Tag Format and Constraints

Tags are key-value pairs with the following constraints:
  • Keys: Must be strings, maximum 64 characters
  • Values: Must be strings only, maximum 64 characters
  • No nested structures: Tag values cannot be dictionaries, lists, tuples, or sets
  • No non-string values: Tag values cannot be numbers, booleans, or other types
  • Dictionary format: Tags must be provided as a Python dictionary

Using Tags

Tags can be added to both evaluate and evaluate_trace calls in synchronous and asynchronous clients.

Basic Usage

Trace Evaluation

Common Use Cases

Environment and Version Tagging

Experiment Tagging

Querying and Filtering Tags

Tags are stored and indexed alongside each evaluation, so you can filter, group, and visualize your evaluation data by tag key or value in whatever analytics or BI tooling you connect to your evaluation data. Common patterns include filtering to a single environment or version (e.g. environment = production), and grouping a metric such as average latency or evaluation count by a tag key to compare across experiments or releases.

Best Practices

Consistent Naming

Use consistent tag names and values across your application:

Keep Tags Concise

  • Keep keys and values under 64 characters
  • Use concise but meaningful names
  • Avoid excessive tags (3-5 tags per evaluation is usually sufficient)

Error Handling

Tags are validated automatically. Invalid tags will raise a ValueError:

Summary

Tags provide a powerful way to organize and filter your evaluations:
  • ✅ Add tags to evaluate and evaluate_trace calls
  • ✅ Use tags to categorize by environment, version, experiments, and more
  • ✅ Filter and visualize tags in your analytics tooling
  • ✅ Follow best practices for consistent, meaningful tags
  • ✅ Tags are validated automatically with clear error messages
Start tagging your evaluations today to gain better insights into your AI application’s performance!