Repository navigation
Conversation
Each active experiment judge in the project of a tenant's Langfuse connection is a judge building block. Once taken in use with a reason, it scores every run of a service the connection covers: the run is sent to Langfuse with only the fields the judges map (question, answer and the case's criteria), and the scores are read back per case trace, since reading them by experimentId returns nothing on Langfuse 4.4.0. A judge on the project's default model, or one that reads a field genki does not send, is refused. Only scores from the snapshotted rule count; they are marked judge changed when the rule, its mapping, the evaluator version or its model changed, and a judge's reason stays only on the case's task, so retention purges it with the case. Langfuse judges are advisory: a gate on their metric is refused when it is saved in Kvalitetskrav and at publish. The portal lists the judges under Byggeklosser, ticks and locks Send til Langfuse when a service uses one, refuses a run before it starts when residency forbids the connection, and shows the judges' scores and per-case verdicts apart from genki's metrics, with a link to the experiment. ADR 0040 amended to match.
…its metric A run scored by a Langfuse judge lists that judge in its provenance, and a Langfuse judge has no accepted labels yet, so every judge gate on the run turned advisory. A gate now checks only the judges that scored its own metric, and keeps all of them when the run's judges cannot be told apart. Also test that a run refuses an adopted Langfuse judge that is refused or gone when it starts, and that a refused one cannot be adopted, and add the bokmål texts for those refusals.
…d leave cases unscored An advisory evaluator's scores stay on their cases but out of the run's metrics, so a Langfuse judge's mean no longer counts in a block's score, the console's regressions or the test set table. Gates leave advisory judges out when they compare runs, so a judge taken in use since the baseline no longer fails a publish. A rule with sampling below 1 or a filter, an evaluator that is not an LLM judge, and a mapping into the question or the answer are refused. A rule that is no longer active marks its scores judge changed. A Langfuse that cannot be read when a run starts refuses the run with a reason, and the refusal reads in bokmål. The building block's judge field is in OpenAPI.
|
Ready for review. A blind review and a claim-checking review are done and CI passes; Copilot did not review (no quota). Open: judge cost and Langfuse labels come in 98b and 98c; the experiment link works only for Langfuse users with "V4 Preview" on; Langfuse also judges cases genki marks not applicable, which costs a call each (98b); naming a Langfuse judge directly in an API eval run is not built; no screenshots yet. |
Langfuse bills a judge call for every case it receives, so a judge on a connection without content cost money and scored every case not applicable. Its building block is now refused with the reason, and a run whose connection stopped receiving text after the judge was taken in use is refused before it starts, as the portal says in the dialog.
…criteria A browser check showed six of seven cases of a seeded test set as not applicable: their criteria are their reference answers, which genki's criteria judge reads but the run did not send. The evaluation context and the judge's empty-field check now read a case's criteria as the criteria judge does (judgedExpectation). A Langfuse judge's building block also names its source, says what it does, and lists where the runs go, what it reads and the model it runs on, instead of an empty access table.
… in the ADRs A criteria case without named criteria sends its reference answer as criteria, as genki's criteria judge reads it; nothing tested what the run sends, and ADR 0040 and 0011 named only expected.criteria. The no-content refusal names its connection in a field of its own.
|
Update: the three commits after the last ready comment (7df1d59, 575d837 and the judge block's source and access rows) have now had a claim-checking review. It found two gaps, fixed in 8133242: a test that a reference answer reaches Langfuse as criteria, and ADR 0040 and 0011 saying so. CI passes on the head. Still open as before: cost and labels come in 98b (#207) and 98c; the experiment link needs Langfuse's "V4 Preview"; naming a Langfuse judge directly in an API eval run is not built. |
Stacked on #197.
What and why
Agencies that judge answers in Langfuse want those judges' scores on genki's test runs, as advice that never decides a publish (ADR 0040). Part of #98; judge cost (98b) and labels (98c) follow.
experimentIdreturns nothing on 4.4.0), markedjudge changedwhen the judge changed, and not applicable for holdout cases and missing fields. The judge's reason is kept only on the case, so retention purges it.GET .../eval-runs/sending), and a separate advisory "Langfuse-dommere" part on a run, with per-case verdicts and a link to the experiment. The link needs Langfuse's "V4 Preview".Not in this PR: judge cost, Langfuse labels, and naming a Langfuse judge directly in an API eval run.
:camera_with_flash: Screenshots
Byggeklosser: a Langfuse judge with its model, version, answer type, fields and what it gets access to

Kjør testsettet: sending to Langfuse is ticked and locked, naming the judge

Resultat: the Langfuse judge apart from genki's metrics, marked advisory

Per testtilfelle: the judge's verdict and reason

How it was tested
npm run check: 471 files, 5133 tests pass.New tests
npm run checkpassesChecklist
packages/providers-*docs/architecture/modulesare updated if a contract, boundary or module changed