Skip to main content
Version: latest

agrag.ingestion.resolve.resolution.resolve_created

resolve_created(created:list[Entity], *, graph_store:GraphStore, embedder:Embedder, entity_labels:Sequence[str], tracer:Tracer | None, max_llm_pairs:int, error_policy:ErrorPolicy) -> tuple[list[Entity], ResolutionResult, list[StageFailure]]

Resolve newly committed entities against everything committed.

Each created entity looks up its committed candidates, so a near-duplicate that another job committed first becomes a pair. Only the created entities start a comparison; the candidates they find are compared with them and never with each other. When the search finds no candidate for any entity and the label holds few committed entities, all of them are candidates.

Parameters:

  • created (list[Entity]) – The committed entities to resolve.
  • graph_store (GraphStore) – Where the candidate and neighbor reads run.
  • embedder (Embedder) – Embeds entity names for candidate search and fuzzy review.
  • entity_labels (Sequence[str]) – The labels the schema defines.
  • tracer (Tracer | None) – Traces the resolver.
  • max_llm_pairs (int) – The most ambiguous pairs per label sent to the LLM.
  • error_policy (ErrorPolicy) – RAISE propagates a failed candidate read; any other policy records it and leaves that entity out of this pass.

Returns:

  • list[Entity] – The created entities followed by the candidates they found, the
  • ResolutionResult – resolver result indexed like that list, and one StageFailure per
  • list[StageFailure] – entity whose candidate read failed.

Raises:

  • Exception – A candidate read failed and error_policy is RAISE.