LLM MeasurementGitHub
Guides

LLM Measurement

LLM Measurement is a set of open-source tools for understanding LLM usage: what changed, who drove it, and whether the usage records support the answer. They work from the telemetry you already collect, without a metric label for every user, and their outputs carry keyed hashes instead of raw user or session IDs.

They are designed with care and built on peer-reviewed sketching algorithms. Rankings come with guaranteed bounds, distinct counts come with a known statistical error, and missing usage is counted separately as missing. Every result on this site comes with the commands to reproduce it.

Run it on your data

Choose the path for the data or application you already have.

Have LiteLLM spend logs?

Investigate directly from your LiteLLM database using approved read-only access, or use an existing spend.csv below. The database path exports and cleans up a private snapshot automatically. For a file, include 16 days for the default comparison.

Requires curl, gh, shasum and tar; Linux or macOS, amd64 or arm64. Install gh; it need not be signed in. Manual verification steps are available.

curl -fsSLo install-fleetdiff.sh https://raw.githubusercontent.com/llm-measurement/fleetdiff/45f8d7aef43a88e1c24033a9f80c4a667f8dbad7/scripts/install.sh
sh install-fleetdiff.sh v0.14.1 ./bin
./bin/fleetdiff investigate --litellm-spend ./spend.csv --group-by user

Have OpenTelemetry traces?

Make a short local OTLP capture, save it as traces.jsonl, then use the same installed binary:

./bin/fleetdiff inspect ./traces.jsonl

For continuous measurement, deploy the collector in your own pipeline with Helm chart 0.7.5 and collector v0.7.4; keep your existing trace backend.

Use Python or Go?

Install llm-sketchkit v0.4.0 and supply your application's user IDs and token counts. The distinct-user and heaviest-user guides read a local CSV. Python requires 3.11+; Go requires 1.26+.

python3 -m venv .venv
.venv/bin/python -m pip install --no-cache-dir llm-sketchkit==0.4.0
mkdir measurement-go
cd measurement-go
go mod init example.com/measurement
go get github.com/llm-measurement/llm-sketchkit/go/sketchkit/...@v0.4.0

Built for enterprise review

Guides

Why summaries instead of raw logs? See the measured sharing and retention properties, with source data and methods.

Studies

fleetdiff terminal report showing a flagged session in a synthetic token-usage comparison
Example output: a synthetic session comparison. Run it with the released binary.

Choose a tool

fleetdiff investigates LiteLLM databases with explicit read-only access, or reads local spend exports, trace captures and summary files offline. The Collector connector creates metrics and summaries continuously. llm-sketchkit supplies the measurement library for Go services and Python analysis.