In this article
A selector dictionary must populate the actual metric implementation parameters with the intended observed values.
Preserve the measurement during migration
Changing an evaluation API should not silently change what the metric receives. The current TruLens migration guide introduces the unified Metric interface in place of older definitions. Treat migration as a mapping exercise: identify the implementation callable, its required arguments and the observed application values meant for each. Keeping the same metric name is insufficient if those values now come from a different span or field.
Match dictionary keys to the implementation
The metric anatomy guide describes selectors mapping argument names to span data. Read the actual callable signature for the installed provider and metric rather than copying parameter names from an unrelated example. Similar relevance implementations can use differently named inputs. A syntactically valid definition can still supply the wrong semantic pairing, such as a rewritten retrieval query where the implementation was intended to judge the original user request.
Verify the recorded attributes exist
The selector guide connects instrumentation attributes to later selection. Declaring a selector does not create missing evidence. Inspect a representative recorded execution and confirm that the intended span type and attribute contain the expected text. Renamed functions, changed framework adapters or a new nesting structure can alter selection without changing the application’s visible answer. Audit these boundaries before attributing a changed metric value to model behavior.
Compare realized inputs on saved diagnostics
Use fixed diagnostic application outputs and inspect the arguments selected by the old and new definitions. Keep judge identity and instructions stable so this check isolates input mapping. Include a case with multiple generation or retrieval spans to expose overly broad selection. If an implementation is called several times, record why and which observed values formed each call; a plausible average can hide that the new definition evaluated a different set of operations.
Keep compatibility separate from equivalence
The migration guide documents backward compatibility and deprecation boundaries, but successful object construction does not prove experimental equivalence. Record the installed version and reviewed selector mapping with the result. The guides to G-Eval measurement identity and output-transform contracts provide related controls. Accept the migration when the callable receives the same intended evidence under the new interface, preserving a stable measurement before changing prompts, providers or the model being assessed.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.