Skip to content

trulens.core.schema.groundtruth

trulens.core.schema.groundtruth

Serializable groundtruth-related classes.

Classes

GroundTruth

Bases: SerialModel, Hashable

The class that represents a single ground truth data entry.

Attributes
query instance-attribute
query: str

The query for which the ground truth is provided.

query_id class-attribute instance-attribute
query_id: Optional[str] = None

Unique identifier for the query.

expected_response class-attribute instance-attribute
expected_response: Optional[str] = None

The expected response for the query.

expected_chunks class-attribute instance-attribute
expected_chunks: Optional[Sequence[Dict]] = None

Expected chunks for the ground truth.

meta class-attribute instance-attribute
meta: Optional[Metadata] = None

Metadata for the ground truth.

dataset_id instance-attribute
dataset_id: DatasetID

The dataset ID to which this ground truth belongs. See Dataset.dataset_id.

ground_truth_id instance-attribute
ground_truth_id: GroundTruthID = ground_truth_id

The unique identifier for the ground truth.

Functions
__rich_repr__
__rich_repr__() -> Result

Requirement for pretty printing using the rich package.