> ## Documentation Index
> Fetch the complete documentation index at: https://docs.honeycomb.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Avoid Sampling Gen AI Telemetry

> Keep Gen AI telemetry at full fidelity so agent timelines and LLM cost data is accurate, and apply sampling to your other telemetry instead.

When looking to reduce your telemetry volume, you should keep all of your Generative AI (GenAI) telemetry and apply sampling to your other telemetry instead.

## Why you should keep all GenAI telemetry

Telemetry from GenAI traffic is usually a small share of total telemetry volume. Capturing all of it adds little to what you send to Honeycomb and ensures agent timelines and LLM cost data stays accurate.

Unlike ordinary infrastructure traffic, GenAI telemetry cannot grow unbounded.
Every GenAI span corresponds to an LLM call you already pay a model provider for, so you cannot produce more of this telemetry without spending more on tokens.

## Keep GenAI traces with Refinery

If you're using [Refinery](/manage-data-volume/sample/honeycomb-refinery/) to reduce your telemetry volume, you can keep 100% of GenAI traces and apply dynamic sampling to everything else.

Refinery's `RulesBasedSampler` matches a trace when any span in that trace satisfies the condition, so checking for the presence of a GenAI attribute keeps the whole trace.
Refinery evaluates rules in the order they appear in the configuration, so list the GenAI rule first.

<Note>
  Make sure the `gen_ai.conversation.id` attribute is present on all of your GenAI spans.
  Refinery can only match the following rule against spans that carry this attribute.
</Note>

Validate this rule with Refinery's dry run mode before you deploy it.

```yaml theme={}
RulesVersion: 2
Samplers:
  __default__:
    RulesBasedSampler:
      Rules:
        - Name: "Keep all Gen AI conversation traces"
          Conditions:
            - Field: gen_ai.conversation.id
              Operator: exists
          SampleRate: 1
        - Name: "Default dynamic sampling for everything else"
          Sampler:
            EMADynamicSampler:
              GoalSampleRate: 10
              AdjustmentInterval: 60s
              FieldList:
                - http.status_code
                - service.name
```
