Skip to main content
Version: 0.0.5 (stable)

agrag.ingestion.merge

Merge mechanics: how a resolved group of mentions and entities combine.

This module is storage-agnostic. It decides what a merge must look like, but it never touches GraphStore itself. Applying a computed MergePlan is a separate step.

Classes:

  • ConflictRecord – One property that had more than one candidate value.
  • MergePlan – Computed result of merging zero or more entities and mentions.
  • PropertyRules – Per-property conflict resolution, with a default for unlisted properties.
  • PropertyStrategy – Fallback rule for a property with no entry in PropertyRules.

Functions:

  • apply_merge – Write a computed MergePlan to storage.
  • compute_merge – Compute how existing_entities and mentions combine into one Entity.
  • has_child_id – Return the id for one versioned parent -[:HAS_CHILD]-> child edge.
  • has_part_id – Return the id for one versioned edge from a Document node to a part.
  • mentioned_in_id – Return the deterministic id for a new Chunk MENTIONED_IN Entity edge.
  • merge_properties – Return field-resolved properties and records of every real conflict.
  • next_chunk_id – Return the deterministic id for a Chunk -[:NEXT_CHUNK]-> Chunk edge.
  • pending_relation_id – Return the id a Cutover Job gives a relation it creates.
  • relation_id – Return the committed id for a domain relationship triple.
  • resolve_description – Resolve a description field, trying LLM summarization.
  • select_canonical – Return the canonical entity and the rest, from two or more entities.

Attributes: