Skip to content

Releases: truera/trulens

TruLens 2.7.1

10 Mar 19:15
becbc82

Choose a tag to compare

Bug Fixes

Tech Debt Reduction

Test Fixes

Docs and Examples

Full Changelog: trulens-2.7.0...trulens-2.7.1

TruLens 2.7.0

19 Feb 02:01

Choose a tag to compare

New Unified Metric API

We're introducing the Metric class as the new primary API for evaluation metrics in TruLens. This unified interface replaces both Feedback and MetricConfig with a cleaner, more explicit design.

Why This Matters

  • Clearer, more readable code: Replace chained .on_*() methods with an explicit selectors={} dictionary—no more guessing which argument maps to which selector
  • Single unified class: No need to choose between Feedback and MetricConfig for different use cases
  • Better OTel integration: Native support for selecting data from OpenTelemetry spans

As a bonus, the same Metric code is now portable to Snowflake environments without modification.

Quick Example

Before (Feedback):

f_groundedness = (
    Feedback(provider.groundedness_measure_with_cot_reasons, name="Groundedness")
    .on_context(collect_list=True)
    .on_output()
)

After (Metric):

f_groundedness = Metric(
    implementation=provider.groundedness_measure_with_cot_reasons,
    name="Groundedness",
    selectors={
        "source": Selector.select_context(collect_list=True),
        "statement": Selector.select_record_output(),
    },
)

The selectors dict makes it explicit which function parameter receives which data.

Migrating from MetricConfig

Before (MetricConfig):

from trulens.core.feedback.custom_metric import MetricConfig

config = MetricConfig(
    metric_name="word_count",
    metric_implementation=lambda text: len(text.split()),
    selectors={"text": Selector.select_record_output()},
)
feedback = config.create_feedback_definition()

After (Metric):

from trulens.core import Metric, Selector

metric = Metric(
    name="word_count",
    implementation=lambda text: len(text.split()),
    selectors={"text": Selector.select_record_output()},
)

Backward Compatibility

The existing Feedback class continues to work with a deprecation warning, giving you time to migrate:

# Still works, but deprecated
from trulens.core import Feedback
f = Feedback(provider.relevance).on_input().on_output()

See the migration guide for detailed instructions on updating your code.

Bug Fixes

Docs

New Contributors

Full Changelog: trulens-2.6.0...trulens-2.7.0

TruLens 2.6.0

04 Feb 20:34

Choose a tag to compare

What's Changed

Agent Skills and Agents.MD

Support for waiting for evaluation completion

Postgres Support

Docs

  • Update the docs to make it easier to reflect contribution process and current state of trulens by @sfc-gh-jreini in #2330
  • [docs] improve crosslinking between attribution instrumentation and eval by @sfc-gh-jreini in #2336

Bug Fixes

Release blog: https://www.trulens.org/blog/2026/02/03/trulens-26-skills-for-ai-coding-assistants-postgresql-support-and-more/

TruLens 2.5.3

15 Jan 21:13

Choose a tag to compare

What Changed

Bug Fixes

  • [Minor fix] Remove staticmethod descriptor for trace_with_run by @sfc-gh-dhuang in #2319
  • Fix mcp span type by @sfc-gh-jreini in #2324
  • Keep host during verification. This also will have downstream effects in that it will use that to build the SQLAlchemy URL. by @sfc-gh-dkurokawa in #2323
  • Fix: Skip instrumentation of non-callable objects (e.g., CallTypes enum) by @debu-sinha in #2328

Docs

TruLens 2.5.2

11 Dec 23:00
91511f7

Choose a tag to compare

What's Changed

  • fix: add additionalProperties: false to structured output schemas for Databricks compatibility by @debu-sinha in #2308
  • Make command for updating meta.yaml files by @sfc-gh-jreini in #2309

New Contributors

Full Changelog: trulens-2.5.1...trulens-2.5.2

TruLens 2.5.1

21 Nov 23:07

Choose a tag to compare

TruLens 2.5.1 Patch Release

Bug Fixes

TruLens v2.5.0

14 Nov 23:56

Choose a tag to compare

What's Changed

New examples

Bug Fixes

TruLens v2.4.2

21 Oct 23:26

Choose a tag to compare

What's Changed

Bug Fixes

Full Changelog: trulens-2.4.1...trulens-2.4.2

Trulens v2.4.1

08 Oct 07:24

Choose a tag to compare

What's Changed

Full Changelog: trulens-2.4.0...trulens-2.4.1

trulens-2.4.0

23 Sep 13:48

Choose a tag to compare

New Features

  • Tracing for LlamaIndex Workflows + Improved Async OpenAI support by @sfc-gh-jreini in #2212

  • Add TruSession::compute_feedbacks_on_events function to compute feedbacks on arbitrary records and feedbacks. by @sfc-gh-dkurokawa in #2206

  • trace compression by @sfc-gh-jreini in #2225

  • Reranker span type type and inclusion of reranker span type in LlamaIndex auto-instrumentation @sfc-gh-jreini in #2222

  • [Snowflake] Have AI observability work with get_records_and_feedback. by @sfc-gh-dkurokawa in #2223

  • [Snowflake] Implementing client side custom metrics for Snowflake batch evaluation flow by @sfc-gh-dhuang in #2201

  • [Snowflake] Update model costs in cortex_model_costs.json by @sfc-gh-jreini in #2228

Examples

Bug Fixes

Full Changelog: trulens-2.3.1...trulens-2.4.0