trulens-dataset-curation

Create and curate ground-truth evaluation datasets for TruLens.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creating reliable evaluation data for LLMs is time-consuming and error-prone. This Skill helps you build ground-truth datasets that enable consistent measurement of model outputs against expected responses, chunks, and retrieval results, empowering teams to track improvements across versions.

Core Features & Use Cases

  • Ground-truth dataset structure: query, query_id, expected_response, and expected_chunks fields.
  • Easy persistence and retrieval with TruLens to support versioned evaluations.
  • Facilitate sharing and collaboration across teams to standardize evaluation.

Quick Start

  1. Install prerequisites: pip install trulens pandas
  2. Initialize TruSession from trulens.core import TruSession session = TruSession()
  3. Build a dataset import pandas as pd data = { "query": ["What is TruLens?"], "expected_response": ["TruLens is an open-source library for evaluating and tracing AI agents."], "expected_chunks": [["TruLens"]] } ground_truth_df = pd.DataFrame(data)
  4. Persist and load session.add_ground_truth_to_dataset(dataset_name="my_dataset", ground_truth_df=ground_truth_df, dataset_metadata={"domain":"TruLens QA","version":"1.0"}) df = session.get_ground_truth("my_dataset")

Frequently Asked Questions about trulens-dataset-curation

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

FAQPage Schema
How do I create ground-truth evaluation datasets for LLMs?

You create ground-truth evaluation datasets by structuring queries, expected responses, and expected chunks into a pandas DataFrame, then persisting it via the TruLens API for versioned assessments.

What is the required schema for a TruLens ground-truth dataset?

A TruLens ground-truth dataset requires a schema with fields like query, query_id, expected_response, and expected_chunks, enabling consistent measurement of model outputs against expected retrieval results.

How do I persist and load evaluation datasets using TruLens?

You persist and load evaluation datasets using TruLens by calling session.add_ground_truth_to_dataset with a pandas DataFrame and metadata, then retrieving it later with session.get_ground_truth.

Can I share ground-truth datasets across teams for versioned evaluations?

Yes, you can share ground-truth datasets across teams for versioned evaluations by persisting them with TruLens using dataset metadata like domain and version, standardizing collaboration.

Do I need pandas to manage ground-truth data for TruLens?

Yes, you need pandas to manage ground-truth data for TruLens, as it handles data structuring and manipulation before you persist the evaluation datasets through the TruSession API.

What is the best way to organize expected responses and retrieved chunks for evaluation?

The best way to organize expected responses and retrieved chunks is building a pandas DataFrame with query, expected_response, and expected_chunks fields, then persisting it via TruLens for structured evaluation.