truera/trulens

Evaluation and Tracking for LLM Experiments and AI Agents

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 27 minutes ago
Added to GitGenius on May 28th, 2024
Created on November 2nd, 2020
Open Issues & Pull Requests: 65 (+0)
Number of forks: 329
Total Stargazers: 3,520 (+0)
Total Subscribers: 23 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 4.0 hours
Mean response time: 17.4 days
90th percentile: 58.4 days
Tracked items: 284

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 36% of open issues come from outside the core team, a mix of external reports and the maintainers' own roadmap. Work labelled "bug" is answered fastest, typically in under an hour, while "Examples" waits about 5 weeks. Only 8% of issues opened in the past year have been closed. Three people close 79% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 22
New in 7 days: 8
Closed in 7 days: 2
Avg open age: 55 days
Stale 30+ days: 5
Stale 90+ days: 4

Recent activity

Opened in 7 days: 1
Closed in 7 days: 2
Comments in 7 days: 3
Events in 7 days: 12

Top labels

  • bug (153)
  • enhancement (108)
  • help wanted (56)
  • good first issue (44)
  • documentation (31)
  • Examples (18)
  • feature (12)
  • question (12)

Detailed Description

TruLens is a Python-based evaluation and tracking framework designed for LLM experiments and AI agents. The project provides systematic evaluation capabilities that go beyond informal testing, enabling developers to understand performance, identify failure modes, and iteratively improve their applications as they develop prompts, models, retrievers, and knowledge sources.

The framework is built on OpenTelemetry-based tracing, making every function call, LLM generation, retrieval, and tool invocation visible as structured OTEL spans. This architecture ensures interoperability with existing observability infrastructure, allowing users to export traces to Jaeger, Grafana Tempo, Datadog, or any OTLP-compatible backend. The instrumentation is described as fine-grained and stack-agnostic, providing comprehensive visibility across different application architectures.

TruLens introduces seven purpose-built evaluators specifically designed for agentic systems. These evaluators measure distinct aspects of agent behavior including LogicalConsistency for reasoning coherence and hallucination detection, ExecutionEfficiency for identifying redundant steps and wasted computation, PlanAdherence for tracking whether execution followed stated plans, PlanQuality for assessing intrinsic strategy quality, ToolSelection for verifying correct tool choices, ToolCalling for validating argument validity and output interpretation, and ToolQuality for measuring external tool reliability. The framework also supports Model Context Protocol tool calls through dedicated MCP span types that capture tool names, arguments, output, and latency.

The evaluation system operates in multiple modes, supporting batch evaluation on existing data, inline evaluation alongside running applications, and offline evaluation workflows. A flexible Selector API allows developers to target any span attribute for evaluation. Core concepts documented in the project include Feedback Functions, the RAG Triad, and Honest, Harmless and Helpful Evals frameworks.

TruLens supports a broad range of LLM providers through dedicated packages including OpenAI and Azure OpenAI, LiteLLM for Anthropic and other providers, Google Gemini, AWS Bedrock, Snowflake Cortex, HuggingFace, and LangChain models. The project is available on PyPI and includes interactive examples runnable in Google Colab.

The project shares contributors with major ecosystem projects including run-llama/llama_index, mastra-ai/mastra, and langchain-ai/langchain, indicating integration within the broader LLM application development ecosystem. GitGenius classifies the repository across multiple domains including AI model transparency, fairness assessment, bias detection, AI risk management, explainable AI techniques, and algorithmic accountability.