Releases: truera/trulens
TruLens 2.7.1
Bug Fixes
- Fix papercuts with Metric API by @sfc-gh-jreini in #2362
Tech Debt Reduction
- refactor "v2" feedback organization from monorepo by @sfc-gh-jreini in #2354
Test Fixes
- Fix race condition for otel test db creation by @sfc-gh-jreini in #2368
Docs and Examples
- update experimental examples and test with metricconfig by @sfc-gh-jreini in #2353
Full Changelog: trulens-2.7.0...trulens-2.7.1
TruLens 2.7.0
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 explicitselectors={}dictionary—no more guessing which argument maps to which selector - Single unified class: No need to choose between
FeedbackandMetricConfigfor 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
- fix: correct typo 'occurences' to 'occurrences' by @thecaptain789 in #2349
- Drop pkg_resources dependency from trulens-core by @debu-sinha in #2351
- fix: add circular-reference-safe repr to SerialModel (#1862) by @sfc-gh-jreini in #2356
- Forward litellm routing params (
api_base,api_key, etc.) to completion calls by @sfc-gh-jreini in #2357 - fix: guard against None model_name in OpenAI endpoint (#1700) by @sfc-gh-jreini in #2358
Docs
- New Example and Docs Updates for usage in MLFlow by @sfc-gh-jreini in #2359
New Contributors
- @thecaptain789 made their first contribution in #2349
Full Changelog: trulens-2.6.0...trulens-2.7.0
TruLens 2.6.0
What's Changed
Agent Skills and Agents.MD
- agents.md and skills by @sfc-gh-jreini in #2337
- Skill and helpers for more beautiful tracing by @sfc-gh-jreini in #2340
Support for waiting for evaluation completion
- Fix bug and allow waiting in otel by @sfc-gh-jreini in #2339
Postgres Support
- Postgres support by @sfc-gh-jreini in #2346
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
- Fix user prompt relevance template in llm_provider.py address issue 2334 by @sfc-gh-jreini in #2341
- #2331 Update plotly to >= 6.0.0 by @jacobus-herman in #2332
- fix safe_getattr to handle more types by @sfc-gh-jreini in #2338
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
What Changed
- Direct registration of LangGraph graph compatibility with AI Observability Run by @sfc-gh-dhuang in #2311
- Additional Instructions for all feedback functions by @sfc-gh-ajia in #2313
- Loosen trace compression by @sfc-gh-jreini in #2312
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
- Blog: Celebrating 3,000 Stars by @sfc-gh-jreini in #2321
TruLens 2.5.2
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
- @debu-sinha made their first contribution in #2308
Full Changelog: trulens-2.5.1...trulens-2.5.2
TruLens 2.5.1
TruLens 2.5.1 Patch Release
Bug Fixes
- [Snowflake] Enable get_records to fetch serverside metrics. by @sfc-gh-dkurokawa in #2293
- [Snowflake] Enable serverside metric computation kickoff from .py scripts by @sfc-gh-dhuang in #2297
- Fix internal method to comply with pydantic change introduced in pydantic 2.10 by @sfc-gh-jreini in #2296
TruLens v2.5.0
What's Changed
- Langchain 1.0 support by @sfc-gh-jreini in #2279
- Update pip install in notebook command with version constraints for langchain packages by @sfc-gh-jreini in #2275
- Remove noisy log msg by @sfc-gh-dhuang in #2277
- track eval costs, surface total costs on leaderboard by @sfc-gh-jreini in #2278
New examples
- Example of agent human annotation flow by @sfc-gh-jreini in #2237
- Updated langchain quickstart with newer agentic rag langchain flow for langchain 1.0 by @sfc-gh-jreini in #2275
- Example of langchain
astreamby @sfc-gh-jreini in #2275
Bug Fixes
- Usage and cost metrics for Google Gemini model generations by @sfc-gh-ajia in #2272
- Add force_flush() at the end of client-side custom metric computation by @sfc-gh-dhuang in #2289
- Resolve custom_instructions error for non-GPA feedback functions by @sfc-gh-ajia in #2284
- [SNOW-2655386] [AI Observability] - Context Relevance and Groundedness Not Computing for Virtual App by @sfc-gh-dhuang in #2288
- Docs fixups by @sfc-gh-jreini in #2280
TruLens v2.4.2
What's Changed
- Tracing for LlamaIndex AgentWorkflow + notebook example with GPA evals by @sfc-gh-jreini in #2249
- Tracing and Eval for MCP in LangGraph by @sfc-gh-jreini in #2257
- Updating GPA prompts by @sfc-gh-ajia in #2261
- quiet logger on context manager warning by @sfc-gh-jreini in #2262
- [Snowflake] SDK changes to use latest field
modein RunConfig by @sfc-gh-dhuang in #2254
Bug Fixes
- Fix langchain compatibility for langchain 1.0 by @sfc-gh-jreini in #2267
- Fix join logic and app_version reference in _check_cross_format_records by @sfc-gh-jreini in #2266
- Fix conda build issue by limiting build to python < 3.13 for now. by @sfc-gh-dkurokawa in #2264
- Fix bugs with runs and metric computation by @sfc-gh-jreini in #2263
- Fix snowflake connector SQL util (to_pandas issue) by @sfc-gh-dhuang in #2265
Full Changelog: trulens-2.4.1...trulens-2.4.2
Trulens v2.4.1
What's Changed
- [Snowflake] web search agent example with snowflake ai obs by @sfc-gh-jreini in #2232
- Handle timestamps in
get_eventsfor Snowflake AI observability event table. by @sfc-gh-dkurokawa in #2226 - data agent with cortex example by @sfc-gh-jreini in #2236
- Update meta.yaml files for release 2.4.0 by @sfc-gh-dhuang in #2238
- OpenAI cost tracking w/ the new Responses API by @sfc-gh-dhuang in #2239
- Fix Cortex cost/usage tracking with latest REST API by @sfc-gh-dhuang in #2240
- [Feat] Update record viewer default expanded depth to 2 levels by @sfc-gh-nvytla in #2244
- [Snowflake] Virtual Run (batch eval run on data in existing table in Snowflake) by @sfc-gh-dhuang in #2224
- Fix get_records_and_feedbacks for AI Observability by @sfc-gh-dhuang in #2245
- [Snowflake] Add get_records and get_record_details APIs to AI Observability Run by @sfc-gh-dhuang in #2246
- Denoise trulens logs by @sfc-gh-dhuang in #2243
- Get Streamlit UI Record Viewer to work with AI Observability. by @sfc-gh-dkurokawa in #2233
- Create an "SPCS" mode for the dashboard that allows authentication through an OAuth token mounted into the docker container. by @sfc-gh-dkurokawa in #2241
- Add
run_nametoget_records_and_feedback. by @sfc-gh-dkurokawa in #2247 - Convert
execute_queryto returnpd.DataFrameinstead ofList[Row]. by @sfc-gh-dkurokawa in #2251 - Refresh Snowflake connection when closed. by @sfc-gh-dkurokawa in #2250
- Fix - new Run API should take run_name when filtering records by @sfc-gh-dhuang in #2252
- [Feat] Add TS/TC/TQ judges by @sfc-gh-nvytla in #2256
- Avoid problematic
transformersversion requirement as there's an issue with its grouped optional dependencies. by @sfc-gh-dkurokawa in #2255
Full Changelog: trulens-2.4.0...trulens-2.4.1
trulens-2.4.0
New Features
-
Tracing for LlamaIndex Workflows + Improved Async OpenAI support by @sfc-gh-jreini in #2212
-
Add
TruSession::compute_feedbacks_on_eventsfunction 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
- web search agent evals by @sfc-gh-jreini in #2209
- Update additional notebooks for OpenTelemetry by @sfc-gh-jreini in #2222
Bug Fixes
- Fix json structured output for cortex complete by @sfc-gh-dhuang in #2214 and #2217
- Use Feedback class instead of underlying function when running evals by @sfc-gh-jreini in #2219
- Restrict streamlit-aggrid to
< 1.1.8to fix. by @sfc-gh-dkurokawa in #2227
Full Changelog: trulens-2.3.1...trulens-2.4.0