File size: 7,387 Bytes
ae1ab9b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
---
license: apache-2.0
pretty_name: CC Traces  Weka (April 2026)
task_categories:
  - text-generation
tags:
  - llm
  - inference
  - benchmarking
  - kv-cache
  - agentic
  - multi-turn
  - claude
size_categories:
  - n<1K
configs:
  - config_name: default
    data_files:
      - split: train
        path: traces.jsonl
---

# CC Traces — Weka (April 2026)

A collection of **739 multi-turn agentic traces** (≈ 59.3k individual model
requests) driven by `claude-opus-4-5-20251101`. Each trace captures the full
request/response sequence of a single agent session, including per-request KV
block hashes, so the dataset can be replayed against an inference engine or
used to simulate prefix-cache behavior offline.

- **Traces:** 739
- **Requests:** 59,274 total, mean **80.2** per trace, max **1,178**
- **Model:** `claude-opus-4-5-20251101`
- **KV block size:** 64 tokens
- **Hash scope:** `local` — block hash IDs are only comparable *within* a
  single trace; they are not a global content-addressable identity.

## What's in each trace

Top-level trace fields:

| field           | type             | description                                         |
|-----------------|------------------|-----------------------------------------------------|
| `id`            | str              | Trace identifier, e.g. `trace_0001`                 |
| `models`        | list[str]        | Models used by the trace (all one entry here)       |
| `block_size`    | int              | KV block size used to derive `hash_ids` (64)        |
| `hash_id_scope` | str              | `local` — hash IDs are per-trace, not global        |
| `tool_tokens`   | int              | Size of the tool-definition block for the session   |
| `system_tokens` | int              | Size of the system prompt for the session           |
| `requests`      | list[object]     | Ordered list of per-request records                 |

Each entry in `requests` is:

| field          | type        | description                                                    |
|----------------|-------------|----------------------------------------------------------------|
| `t`            | float       | Seconds since start of trace                                   |
| `type`         | str         | Request type marker (e.g. `n`)                                 |
| `model`        | str         | Target model for this request                                  |
| `in`           | int         | Input tokens (ISL)                                             |
| `out`          | int         | Output tokens (OSL)                                            |
| `hash_ids`     | list[int]   | Block-hash IDs for the input, one per 64-token block           |
| `input_types`  | list[str]   | Content kinds in the input (`text`, `tool_result`, …)          |
| `output_types` | list[str]   | Content kinds in the output (`text`, `thinking`, `tool_use`, …) |
| `stop`         | str         | Stop reason (`tool_use`, `end_turn`, …)                        |
| `api_time`     | float       | End-to-end server time for this call (seconds)                 |
| `think_time`   | float       | Client think/tool time between this request and the next (s)   |

`hash_ids` make the dataset unusually useful for KV-cache work: the
contiguous common prefix between turn *t* and turn *t − 1* exactly measures
the portion of the input that a local prefix cache would be able to reuse.

## Summary statistics

| metric              |   p50   |   p75   |   p90   |   p95   | mean  |
|---------------------|--------:|--------:|--------:|--------:|------:|
| ISL (input tokens)  | 109,903 | 150,308 | 300,118 | 395,328 |139,925|
| OSL (output tokens) |     218 |     441 |     937 |   1,563 |   446 |
| `think_time` (s)    |      10 |      30 |     154 |     435 |   199 |
| `api_time` (s)      |    6.47 |   11.02 |   19.50 |   29.63 | 10.18 |
| requests / trace    |      48 |     101 |     201 |     253 |  80.2 |

Aggregate prefix-KV-cache hit rate across **all** requests and **all**
traces: **96.57 %** of the 129,409,824 blocks would have been served from
a local prefix cache (incl. turn 0 which can never hit).

## Plots

All plots below were produced from the full dataset with the analysis
script published alongside the repo. Vertical dashed lines mark
p50 / p75 / p90 / p95.

### Input sequence length (ISL)

Agentic traces accumulate a very large context over time — the median
turn sends ~110k tokens of input, and the p95 exceeds 395k.

![ISL — log x](plots/isl_hist_log.png)
![ISL — linear x](plots/isl_hist_linear.png)

### Output sequence length (OSL)

Outputs are short by comparison: most turns produce a tool call or a brief
text response. The median is 218 tokens and p95 is ~1,600.

![OSL — log x](plots/osl_hist_log.png)
![OSL — linear x](plots/osl_hist_linear.png)

### Client think time

Time between a completed response and the next request — this includes
local tool execution, user wait time, etc. The distribution has an extreme
heavy tail (p95 ≈ 7 min, p99 ≈ 50 min). The linear plot also shows the
large spike at `0 s` (≈888 requests fired back-to-back).

![Think time — linear x](plots/think_time_hist_linear.png)
![Think time — log x, zeros excluded](plots/think_time_pos_log.png)

### Prefix KV cache behavior

Because this is a sequence of agentic turns on the same conversation, the
hit rate of a local prefix cache is **extremely high** — almost every turn
reuses nearly the full preceding context.

**Per-request hit rate.** The distribution is saturated near 1.0:

![Prefix hit rate histogram](plots/kv_hit_rate_prefix_hist.png)

**Per-request miss rate (log x).** Viewing `1 − hit_rate` on a log axis is
more informative; most turns miss <2 % of blocks, but there's a visible
secondary mode near 1.0 corresponding to conversation resets /
compaction:

![Prefix miss rate histogram](plots/kv_miss_rate_prefix_hist.png)

**New tokens to prefill per request.** Tokens the prefix cache did *not*
cover — i.e. the work an engine actually has to do on prefill:

![New tokens per request](plots/kv_new_tokens_hist.png)

**Hit rate across turns.** After the first couple of turns the mean hit
rate stabilizes around 0.97, with occasional dips wherever the client
compacts or rebuilds the context:

![Prefix hit rate vs turn index](plots/kv_hit_rate_vs_turn.png)

**Cached tokens vs ISL.** Each point is one (non-first) request. Most sit
on the *y = x* line (fully cacheable). The distinctive horizontal band
near *y = 0* is the compaction/reset cluster:

![Cached tokens vs ISL](plots/kv_cached_tokens_vs_isl.png)

## Intended uses

- **Inference benchmarking:** replay traces against a serving engine
  (vLLM, SGLang, TRT-LLM, etc.) to measure throughput / latency under a
  realistic agentic workload.
- **KV-cache research:** the `hash_ids` field exposes block-level prefix
  structure directly, without needing to re-tokenize any text.
- **Capacity planning:** the ISL / OSL / think-time distributions are a
  reasonable first-order model of traffic from long-context agentic
  clients.

## Loading

```python
from datasets import load_dataset

ds = load_dataset("semianalysisai/cc-traces-weka-042026", split="train")
print(ds[0]["id"], len(ds[0]["requests"]))
```

## License & attribution

Released under the **Apache 2.0** license.
Credit: **Callan Fox**.