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

# Evals from your own traffic

> Turn requests you already serve and a few graded answers into a task set, so every Proof checks that answers stay right on your work, not on a public benchmark. Built on your machine; your prompts stay with you.

# Evals from your own traffic

A Proof is only as good as the questions it asks. Public benchmarks say little about your support
tickets, your routing rules, or your extraction jobs. A task set from your own traffic does: it
holds requests you really served, each with the answer you know is right, and every Proof grades the
current setup and each candidate against those answers.

You build it on your own machine from files you already have. InferCrane reads nothing until you
choose to register the set's manifest (names, counts, digests, licence, dates) or upload the set.

```bash theme={"theme":"css-variables"}
infercrane evaluation set build --traffic requests.jsonl --grades grades.jsonl --name support-tasks
```

## What stays where

| | Where it is | What InferCrane receives |
| - | - | - |
| Your requests (`requests.jsonl`) | Your machine | Nothing |
| Your grades (`grades.jsonl`) | Your machine | Nothing |
| The task set the build writes | The folder you name with `--out` (the current folder by default), readable only by you; then beside your agent, in your bucket, or on your volume | Nothing, until you upload it |
| Its manifest | Next to the set | With `--register`: names, counts, digests, the licence `LicenseRef-Customer-Owned`, and dates. No prompt or answer |
| An uploaded set | InferCrane's database | The set's text, because you chose to upload it |

InferCrane's own traffic recording keeps the shape of each request only (token counts and timing),
never its text. The requests file comes from your own logs. The build's messages name a line in
your files, never its text, so they are safe to keep in a terminal or CI log.

## 1. Export your requests

One request a line, as you sent it to your model: a `prompt` (with an optional `system`), or the
`messages` of a conversation that ends with the user's turn. Give each one an `id`, and a `time` on
every line or on none (then the file's order is the order of time).

```json theme={"theme":"css-variables"}
{"id": "t-1042", "time": "2026-11-20T09:14:03Z", "prompt": "Customer: my parcel arrived damaged. Which queue handles it?"}
{"id": "t-1043", "time": "2026-11-20T09:14:11Z", "messages": [{"role": "system", "content": "You route support messages."}, {"role": "user", "content": "I was charged twice for order 5521."}]}
```

Other fields on a line, such as the answer your model gave, are ignored and never written anywhere.
A task set grades answer text, so a request that uses tools is never an item: a graded one stops the
build, and one before the split is left out of the training side. Each file must be UTF-8, and the
requests file at most 256 MiB.

## 2. Grade a few

Pick requests from the end of the window and write down the right final answer: a number, a letter
from A to D, or one of up to four labels.

```json theme={"theme":"css-variables"}
{"id": "t-1042", "expected": "shipping"}
{"id": "t-1043", "expected": "billing"}
```

Two graded requests make a set; a [migration Proof](https://docs.infercrane.com/features/migration.md) needs at least 30, and more
items narrow the interval every verdict rests on. A set holds at most 1,000.

## 3. Build the set

```bash theme={"theme":"css-variables"}
infercrane evaluation set build --traffic requests.jsonl --grades grades.jsonl \
  --name support-tasks --choices shipping,billing,refund,other
```

```text theme={"theme":"css-variables"}
Task set support-tasks: 124 items, sha256:6f1c…
  Requests read     2400
  Graded            130 (6 merged: same text and answer as an earlier item)
                    traffic line 1877 merged into line 1702
                    …
  Held out from     2026-11-20T09:14:03Z
  Before it         1959 may train a model (removed: 31 same words as an item, 4 near copies, 2 holding a short item, 12 repeats, 3 with tools)
  After it          259 not graded, not used
```

The build:

* **Turns each graded request into an item.** It adds one line asking the model to end with
  `Answer: <number>` or `Answer: <letter>`, so the check can read the answer. With `--choices`, the
  labels are offered as A to D and your label becomes its letter. Use `--no-instruction` when your
  prompts already ask for that line. A graded request with the same text and answer as an earlier
  one is merged into it, and the output names both lines. One that reads the same but is graded
  differently stays an item, with a note; the same request graded two ways stops the build.
* **Holds the graded requests out.** Everything from the first graded request on is the held-out
  side. Only requests from before it may train a model, for example when you
  [right-size a model](https://docs.infercrane.com/architecture/right-size-models).
* **Checks for overlap.** It compares what the user sees: the prompt and the conversation's turns,
  not the system prompt, so a system prompt that every request shares never counts. Case, spacing,
  and plain punctuation are ignored; symbols such as `+` or `<` count as words. A request before the
  split is removed from the training side when it has the same words as an item, shares a run of 13
  words with one, or holds a whole item of 4 to 12 words. When most requests go because your prompts
  share a long template, the output says so: send the template as the system prompt.
  `--train-location` writes that side too (`NAME.train.jsonl` and its manifest).
* **Checks the result.** The set must pass the same decoder the answer check uses, and its manifest
  the [Data](https://docs.infercrane.com/architecture/data-area) rules: your licence, an expiry (90 days by default, at most 365
  with `--expires-days`; InferCrane refuses a set dated after its own clock), and evaluation only.

It writes `support-tasks.task-set.json` and `support-tasks.task-set.manifest.json` to `--out`,
readable only by you, and never overwrites a file.

## 4. Use it in a Proof

| Where the run checks answers | What it needs |
| - | - |
| Your cluster, through the InferCrane agent | Keep the set beside the agent (Helm `executor.evalSets`) and name it in the run with `--eval-set sha256:DIGEST`. The agent finds it by digest; its prompts and answers stay in your cluster |
| The control plane, including a migration Proof | Upload it: `infercrane evaluation set upload support-tasks.task-set.json`. InferCrane then stores its text |

```bash theme={"theme":"css-variables"}
infercrane optimize create Qwen/Qwen3-8B --provider kubernetes --gpu L40S --eval-set sha256:DIGEST
```

The check grades the current setup and each candidate against your answers
([task sets](https://docs.infercrane.com/features/semantic-quality.md#task-sets)): a setup whose share of right answers falls by a
measurable amount is blocked.

## Keep track of your sets

```bash theme={"theme":"css-variables"}
infercrane evaluation set build ... --register   # or later: infercrane data register support-tasks.task-set.manifest.json
infercrane data list
infercrane data inspect sha256:DIGEST
infercrane data delete sha256:DIGEST
```

`data list` shows each set's kind, size, where you keep it, when it expires, and whether InferCrane
also stores its text because you uploaded it. Deleting a registration leaves your files alone: they
are yours to delete where they live.

Registering a set again after rebuilding it from the same files the same day returns its first
registration, and that registration's expiry stands; the output says so. A rebuild on another day
is a new set with a new digest, because the version defaults to the build's date (`--version` sets
it). Deleting a registration and registering the set again starts a new retention window, counted
from the new registration.

A registered set past its expiry is refused when a plan or run names it
(`quality_eval_set_expired`). This includes sets that had already expired before a control plane with
this check was deployed: from that deploy on, new runs naming them are refused, while runs made
earlier keep reading. To use such a set again, delete its registration and register it again with a
new expiry; registering it again alone keeps the first expiry.

## What a result can and cannot say

* The set says whether answers stay right on the requests you graded. Requests you did not grade are
  not checked.
* The overlap check does not find an item asked again in other words, an item of 3 words or fewer
  inside a longer request, a short request that is only part of a longer item, or an item's text
  inside another request's system prompt. A model trained on the earlier requests may have seen
  those.
* Few items give a wide interval: a Proof then reports **not settled** rather than a pass.
* A set ages with your traffic. Build a new one when your traffic changes, and let the old one expire.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.