evaluate

Function

Evaluates the triplet relationships extracted by the LLM.

Prototype

def evaluate(relations)

Parameters

Parameter

Data Type

Required/Optional

Description

relations

list[dict]

Required

knowledge graph relationship list. Each element is a dictionary and must contain the key raw_text or an optional value (entity_relations, event_entity_relations, or event_relations). The list length ranges from 1 to 50000, with nesting depth up to 5 and text length up to 4096.

Return Value

None. The function prints three groups of precision, recall, and F1 scores, which correspond to entities, event entities, and event extraction, respectively. Higher scores indicate better extraction quality.