You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5cb5204
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: packages/gooddata-eval/README.md
+36-8Lines changed: 36 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,7 +113,7 @@ gd-eval run \
113
113
| Flag | Description |
114
114
|---|---|
115
115
|`--dataset PATH`| Flat folder of JSON files — one question per file. |
116
-
|`--langfuse-dataset NAME`| Pull items by name from a Langfuse dataset. Requires `LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY`, `LANGFUSE_HOST`. |
116
+
|`--langfuse-dataset NAME`| Pull items by name from a Langfuse dataset. Requires `LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY` and `LANGFUSE_BASE_URL` (or the legacy `LANGFUSE_HOST`). |
117
117
|`--kind TEST_KIND`| Fallback `test_kind` for dataset items that do not embed one. Defaults to `visualization`; use e.g. `agentic_metric_skill` for multi-turn agentic evaluation. Items that declare their own `test_kind` ignore this. |
118
118
119
119
#### Model selection
@@ -152,15 +152,39 @@ interleaves when K > 1, and per-item latencies rise, so they stop being clean si
152
152
153
153
| Flag | Description |
154
154
|---|---|
155
-
|`--langfuse`| Log scores and traces to Langfuse after each item. Requires `--langfuse-dataset`. Names each experiment run `{dataset_name}_{timestamp}_{model}`, suffixed `_effort-{level}` when `--reasoning-effort` is set (so runs differing only by effort stay separate) and `_run{N}` per run when `--runs` > 1 — e.g. `general_question_2026-09-02-11-13_gpt-5.2_run0`. Requires `LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY`, `LANGFUSE_HOST`. |
155
+
|`--langfuse`| Log scores and traces to Langfuse after each item. Requires `--langfuse-dataset`. Names each experiment run `{dataset_name}_{timestamp}_{model}`, suffixed `_effort-{level}` when `--reasoning-effort` is set (so runs differing only by effort stay separate) and `_run{N}` per run when `--runs` > 1 — e.g. `general_question_2026-09-02-11-13_gpt-5.2_run0`. Requires `LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY` and `LANGFUSE_BASE_URL` (or the legacy `LANGFUSE_HOST`). |
156
156
157
-
Set `TAVERN_E2E_SKIP_TRACE_LINK=1` to skip trace lookup entirely (scores are then orphaned; the run says so).
157
+
##### Langfuse v4
158
158
159
-
**A local `--dataset` cannot be attached to a Langfuse run.**`--langfuse` is refused alongside `--dataset`
160
-
because a local folder's item ids are not Langfuse dataset item ids. But trace linking does not depend on that
161
-
flag — each `evaluate_agentic_*` builds its own client whenever `LANGFUSE_PUBLIC_KEY`/`LANGFUSE_SECRET_KEY` are
162
-
exported — so a local run still finds its traces and writes its scores onto them, and only the per-run grouping
163
-
fails, with one `404 from dataset-run-items` reported per run. The run warns about this before it starts. Use
159
+
One run is one Langfuse **experiment**. Each evaluated item becomes its own trace whose root span carries the
160
+
experiment and dataset-item attributes (`langfuse.experiment.name`, `langfuse.experiment.dataset.id`,
161
+
`langfuse.experiment.item.id`), and the four scores attach to that root observation. gd-eval speaks to Langfuse
162
+
over four REST endpoints and uses no Langfuse SDK, so it runs on every Python version the package supports:
163
+
164
+
| Endpoint | Used for |
165
+
|---|---|
166
+
|`POST /api/public/otel/v1/traces`| exporting the experiment root span as OTLP/HTTP JSON |
167
+
|`POST /api/public/scores`| one score per write, on a trace or on a single observation inside it |
168
+
|`GET /api/public/v2/observations`| finding the agent's gen-ai trace for a conversation |
169
+
|`GET /api/public/dataset-items`| loading `--langfuse-dataset` items, and resolving an item's dataset id |
170
+
171
+
Two consequences of v4's immutable observations. gd-eval sets `version` only on its own experiment span, never on
172
+
the agent's gen-ai trace — filter on the gd-eval experiment's `langfuse.version` to compare models. And on the
173
+
agentic kinds the latency in `value_score` is the gen-ai trace's root generation latency, read from the
174
+
observations endpoint; the single-shot `--langfuse` sink keeps using the item's own measured average latency.
175
+
176
+
Langfuse Cloud drops v3 on **2026-11-16**; a self-hosted Langfuse must be on v4 for any of this to work.
177
+
178
+
Set `TAVERN_E2E_SKIP_TRACE_LINK=1` to turn the whole **agentic** Langfuse write path off — no trace lookup, no
179
+
span export and no scores for `agentic_*` items. The run says so once. It does not reach the `--langfuse` sink,
180
+
which still writes a span and four scores for every single-shot item; drop `--langfuse` to silence that too.
181
+
182
+
**A local `--dataset` cannot be attached to a Langfuse experiment.**`--langfuse` is refused alongside
183
+
`--dataset` because a local folder's item ids are not Langfuse dataset item ids. But trace linking does not
184
+
depend on that flag — each `evaluate_agentic_*` builds its own client whenever
185
+
`LANGFUSE_PUBLIC_KEY`/`LANGFUSE_SECRET_KEY` are exported — so a local run still finds its traces and writes its
186
+
scores onto them, and only the per-run grouping fails: the dataset-item lookup 404s and the run reports the item
187
+
as one that does not exist in Langfuse, once. The run also warns about this before it starts. Use
164
188
`--langfuse-dataset` when you want runs that are comparable across models, or `TAVERN_E2E_SKIP_TRACE_LINK=1` to
165
189
skip linking altogether.
166
190
@@ -380,6 +404,10 @@ Without `[llm-judge]`, those items are **skipped**.
380
404
381
405
## Scores (in JSON report and Langfuse)
382
406
407
+
In Langfuse every score is written to the experiment run's root observation — `traceId` plus `observationId` of
408
+
the item's own root span. On the agentic path each score is mirrored onto the agent's gen-ai trace as well
409
+
(`traceId` only), so a score survives even when one of the two traces is missing.
410
+
383
411
| Score | Description |
384
412
|---|---|
385
413
|`pass_at_k`| 1 if any of the K runs passed strict checks, else 0. |
0 commit comments