trulens-instrumentation

Instrument LLM apps to capture traces for evaluation and debugging.

3.5k|319|Updated Nov 2, 2020
One-click install
npx skills add https://github.com/truera/trulens --skill trulens-instrumentation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trulens-instrumentation
Source: https://github.com/truera/trulens/tree/main/skills/instrumentation
Command: npx skills add https://github.com/truera/trulens --skill trulens-instrumentation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Instrument TruLens instrumentation plugs into LLM apps to capture traces for evaluation and debugging, enabling systematic analysis of prompts, models, and data flows.

Core Features & Use Cases

  • Auto-instrumentation for LangChain/LangGraph/LlamaIndex pipelines
  • Custom spans with @instrument for fine-grained telemetry
  • End-to-end tracing for RAG pipelines, prompts, and responses

Quick Start

Install TruLens and relevant apps, initialize a TruSession, and wrap your app with the appropriate instrumentation wrappers or decorators to start collecting traces.

Frequently Asked Questions about trulens-instrumentation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add tracing to my LangChain or LlamaIndex RAG pipeline?

You can add tracing to RAG pipelines by wrapping your application with TruLens instrumentation adapters, which automatically capture prompts, model calls, and retrieval data flows for systematic analysis.

How does custom span instrumentation work for LLM observability?

Custom span instrumentation works by applying the @instrument decorator to Python functions, enabling fine-grained telemetry capture for specific operations like prompting and tool usage within your LLM application.

Do I need specific Python packages to enable end-to-end tracing in my LLM app?

Yes, you need the trulens Python package along with optional framework adapters like trulens-apps-langchain or trulens-apps-llamaindex to plug instrumentation into your specific LLM pipelines.

Can I use TruLens instrumentation with LangGraph pipelines for debugging?

Yes, TruLens instrumentation supports LangGraph pipelines alongside LangChain and LlamaIndex, automatically capturing traces to enable systematic debugging and evaluation of prompts, models, and data flows.

What is the best way to capture end-to-end traces for evaluating LLM responses?

The best way to capture end-to-end traces is initializing a TruSession and applying auto-instrumentation wrappers to your LLM app, immediately collecting evaluation data for dashboards and response analysis.