Building with AI

TruLens

Quick explainer2 min readIntermediate

TruLens is an open-source library for tracing and evaluating LLM apps and agents, with RAG triad checks and metrics that score each run.

In plain words

TruLens records what an app or agent does at each step, including inputs, outputs, tokens, cost and time, using OpenTelemetry, so traces can go to other monitoring tools too. You attach metrics, often an LLM judging things like whether an answer is relevant, and they run as traces arrive or later over a dataset. The RAG triad is one of its core ideas: a set of checks for retrieval apps.

A quick example

Imagine a helpdesk RAG app. The team wraps it with TruLens, adds metrics for answer relevance and for whether the retrieved context fits the question, and compares versions of the app on a leaderboard to see which one scores best.

Where you'll meet it

  • Evaluating RAG apps and agents.
  • Comparing app versions on quality and cost.

Related

Sources

  1. DocsTruLens: Evals and Tracing for AI Agents, TruLens · read 29 Sept 2026
  2. Docstruera/trulens, TruLens (GitHub) · read 29 Sept 2026

Checked by WhatIsAI against the sources above · 29 Sept 2026. Spotted an error? Report it.