docs(v4): clarify evaluator transition bridge#3353
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude review |
There was a problem hiding this comment.
LGTM — small, accurate doc clarification; the one nit flagged inline (OTel/direct-API readers not covered by the new bridge wording) doesn't block merge.
What was reviewed: the updated bridge sentence in step-evaluators.mdx and the corresponding comparison-table row in v4.mdx; confirmed the method names (set_current_trace_io/span.set_trace_io, setActiveTraceIO/span.setTraceIO) match existing deprecated APIs; checked for a md-override counterpart to v4.mdx (none exists, so no sync needed).
Extended reasoning...
Overview
Two-line documentation change: rewords the evaluator-transition guidance in the shared components-mdx/v4/step-evaluators.mdx snippet (rendered across all four v4 upgrade paths) to describe a temporary bridge using deprecated trace I/O methods, and updates one row of the before/after comparison table in content/docs/v4.mdx to match. No code, config, or build logic is touched.
Security risks
None. This is prose-only documentation content; no user input, auth, or executable code paths are affected.
Level of scrutiny
Low. This is a narrow, self-contained doc wording fix stacked on an already-merged v4 docs PR. The only substantive concern — that the new parenthetical naming Python/JS SDK methods doesn't give OTel/direct-API readers an actionable equivalent — was already caught and will be posted as an inline nit. It doesn't misinform that audience (the clause is self-scoped to Python/JS) and doesn't regress prior behavior, so it doesn't warrant blocking.
Other factors
No corresponding md-override file exists for content/docs/v4.mdx, so there's no sync requirement. The PR description notes local prettier/H1 checks were run; given the tiny, text-only diff, that's sufficient without a full build.
| **Evaluators** | ||
|
|
||
| Migrate trace-level LLM-as-a-judge evaluators to the [observation level](/faq/all/llm-as-a-judge-migration). | ||
| Upgrade trace-level LLM-as-a-judge evaluators to the [observation level](/faq/all/llm-as-a-judge-migration). If an existing evaluator reads trace input or output, keep supplying those values with the deprecated trace I/O methods (`set_current_trace_io()` or `span.set_trace_io()` in Python; `setActiveTraceIO()` or `span.setTraceIO()` in JS/TS) until the new evaluator is validated. Any future multi-span support will also use the observation-centric model. |
There was a problem hiding this comment.
🟡 The new bridge sentence in step-evaluators.mdx only mentions Python (set_current_trace_io()/span.set_trace_io()) and JS/TS (setActiveTraceIO()/span.setTraceIO()) methods for keeping trace I/O populated during the evaluator transition, but this shared component is also rendered in the "Direct API and OpenTelemetry users" section, whose readers by definition aren't using either SDK. Consider scoping the parenthetical (e.g. "if you use the Python/JS SDK") or adding a short note for OTel/direct-API users so that audience isn't left assuming an inapplicable method.
Extended reasoning...
components-mdx/v4/step-evaluators.mdx is rendered via <V4StepEvaluators /> in all four upgrade paths on content/docs/v4.mdx, including ### Direct API and OpenTelemetry users [#api-otel] (line ~181). That section's own Ingestion step is explicit that its audience is not using the Langfuse Python/JS SDK — it instructs readers to point a generic OTel span exporter at POST /api/public/otel/v1/traces, with SDK users routed to the separate cloud-older-sdks / cloud-current-sdks sections instead.
The sentence this PR adds says: "If an existing evaluator reads trace input or output, keep supplying those values with the deprecated trace I/O methods (set_current_trace_io() or span.set_trace_io() in Python; setActiveTraceIO() or span.setTraceIO() in JS/TS) until the new evaluator is validated." Walking through the api-otel reader's experience: they land on this Step expecting guidance for their setup, see two method names that are explicitly qualified "in Python"/"in JS/TS", and have no way to apply either one, since they aren't calling into an SDK at all. There's no OTel/API-level equivalent offered (e.g., an attribute name to set on a span via the raw ingestion payload), so this subset of readers gets no actionable instruction for the trace-I/O bridge if they have an existing trace-level evaluator they want to keep working during the transition.
That said, the risk here is genuinely limited, which is why this should not block merge. Before this PR, the shared sentence was just "Migrate trace-level LLM-as-a-judge evaluators to the observation level" — equally generic for all four audiences, with the same link to the migration FAQ. This PR only adds an optional bridging clause for SDK users; it doesn't remove or weaken anything OTel users previously had, and the core instruction (upgrade to observation-level evaluators, see the migration guide) still applies to and works for every audience, including api-otel. The added clause is clearly self-scoped ("in Python", "in JS/TS"), so an OTel reader will recognize it doesn't apply to them rather than being misled into calling a nonexistent method. It's also not obviously fixable within this doc sentence alone — if OTel/direct-API ingestion has no equivalent way to keep trace I/O populated (this looks like a genuine product gap, not a doc omission), the best available fix is to explicitly scope the parenthetical to SDK users, so OTel readers aren't left wondering why it doesn't apply to them, or to add a short pointer to whatever mechanism (if any) exists for raw OTel spans.
Net effect: a documentation completeness gap affecting one of four audiences for an edge case (readers with a pre-existing trace-level evaluator, mid-transition), not an incorrect or misleading instruction. Recommend scoping the parenthetical (e.g. "if you use the Python or JS/TS SDK, keep supplying...") or adding a one-line OTel-specific caveat, but this is a nit rather than a blocking issue.
Summary
set_trace_iowording in the v4 comparison tableStacking
Verification
pnpm exec prettier --experimental-cli --check components-mdx/v4/step-evaluators.mdx content/docs/v4.mdxnode scripts/check-h1-headings.jsgit diff --checkFull build and link checks were not run for this two-line documentation follow-up.
Greptile Summary
This PR clarifies the evaluator transition bridge in the v4 documentation. The main changes are:
Confidence Score: 5/5
This looks safe to merge.
Reviews (1): Last reviewed commit: "docs(v4): clarify evaluator transition b..." | Re-trigger Greptile