ModelRefs / TruLens — AI Glossary
TruLens — AI Glossary
An open-source evaluation and observability framework for LLM applications, supporting RAG triads and custom feedback functions.
Overview
TruLens (TruEra) records LLM app inputs, outputs, and intermediate steps; evaluates them using 'feedback functions' (LLM-based or heuristic). Supports the RAG triad (groundedness, answer relevance, context relevance). Integrates with LlamaIndex, LangChain, and custom apps. Dashboard for tracking quality across app versions.
Reference details
| Topic | evaluation |
|---|---|
| Last reviewed | 2026-06-24 |
Related terms
How it works
- The application is instrumented so inputs, outputs and intermediate steps are recorded per call.
- Quality is expressed as feedback functions — small scorers, heuristic or model-based, that return a value for a recorded step.
- Because they are functions in your code, they are versioned and tested with the application rather than configured in a product.
- For retrieval pipelines three scorers cover the common failure modes: whether retrieved context was relevant, whether the answer used it, and whether the answer addressed the question.
- Those three isolate where a failure occurred, which is the thing a single end-to-end score cannot tell you.
Example: Three scores locate the failure that one cannot
An answer is judged poor. Context relevance low, groundedness high, answer relevance high means retrieval failed and generation faithfully used what it was given. Context relevance high with groundedness low means retrieval worked and the model ignored it. Context and groundedness both high with answer relevance low means it answered a different question. One aggregate score would read 'poor' in all three cases and point at nothing — the decomposition is the diagnostic.
Commonly confused with
An evaluation framework rather than a hosted platform, which is the distinction that matters against Langfuse, Braintrust or Phoenix: it gives you feedback functions to score RAG behaviour in code, not a service to send traces to. Its RAG triad — context relevance, groundedness, answer relevance — is the same decomposition RAGAS uses under different names.
When to use it
Reach for it when:
- Evaluation logic should live in your codebase, versioned with the application.
- A retrieval pipeline needs failures attributed to retrieval, grounding or answering.
- Custom scorers are needed beyond what a hosted product offers.
Reach for something else when:
- A managed dashboard and hosted tracing are what is actually wanted.
- Nobody will maintain the feedback functions, which rot like any other code.
- Prompt versioning and staged rollout are the primary need.
Continue your research
Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to TruLens — AI Glossary.
Frequently asked questions
What is TruLens?
An open-source evaluation and observability framework for LLM applications, supporting RAG triads and custom feedback functions.
What concepts are related to TruLens?
Closely related concepts include ragas, langsmith, langfuse.