trulens.core.schema.groundtruth¶
trulens.core.schema.groundtruth
¶
Serializable groundtruth-related classes.
Classes¶
VirtualGroundTruthSchemaMapping
¶
Bases: BaseModel
Functions¶
validate_mapping
classmethod
¶
Validate and parse the schema mapping dictionary.
PARAMETER | DESCRIPTION |
---|---|
schema_mapping |
User-provided schema mapping. |
RETURNS | DESCRIPTION |
---|---|
SchemaMapping
|
Parsed and validated schema mapping.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
ValidationError
|
If mandatory fields are missing or invalid. |
GroundTruth
¶
Bases: SerialModel
, Hashable
The class that represents a single ground truth data entry.
Attributes¶
query_id
class-attribute
instance-attribute
¶
Unique identifier for the query.
expected_response
class-attribute
instance-attribute
¶
The expected response for the query.
expected_chunks
class-attribute
instance-attribute
¶
Expected chunks for the ground truth.
meta
class-attribute
instance-attribute
¶
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.