Skip to main content

agrag.ingestion.resolve.resolution.BatchResolution

BatchResolution(exact_matches:dict[int, Entity], groups:list[ResolutionGroup], result:ResolutionResult | None, persisted_ids:dict[int, UUID] = dict(), candidate_entities:dict[UUID, Entity] = dict(), failures:list[StageFailure] = list(), unresolved_indices:set[int] = set()) -> None

The outcome of resolving one batch of mentions.

Attributes:

  • exact_matches (dict[int, Entity]) – Mention index to the persisted entity it matches by merge key.
  • groups (list[ResolutionGroup]) – Mentions that share one raw entity identity.
  • result (ResolutionResult | None) – The semantic resolver pass over the mentions and their persisted candidates. None when the batch has no mentions.
  • persisted_ids (dict[int, UUID]) – Index of each synthetic candidate mention to the id of the persisted entity it stands for.
  • candidate_entities (dict[UUID, Entity]) – Persisted candidates by id.
  • failures (list[StageFailure]) – One StageFailure per mention whose candidate read failed.
  • unresolved_indices (set[int]) – Indices of the mentions in failures. A mention whose read failed neither starts nor joins a comparison.

candidate_entities​

candidate_entities: dict[UUID, Entity] = field(default_factory=dict)

exact_matches​

exact_matches: dict[int, Entity]

failures​

failures: list[StageFailure] = field(default_factory=list)

groups​

groups: list[ResolutionGroup]

persisted_ids​

persisted_ids: dict[int, UUID] = field(default_factory=dict)

result​

result: ResolutionResult | None

unresolved_indices​

unresolved_indices: set[int] = field(default_factory=set)