Skip to main content

agrag.common.data_models.extraction.ExtractedEntity

Bases: BaseModel

One entity mention found in a single Chunk.

Not a graph node: this has no id and no canonical identity. Resolution decides which ExtractedEntity mentions refer to the same real-world thing.

Attributes:

  • chunk_id (UUID) – The id of the Chunk this mention came from.
  • label (str) – The EntityType label this mention was extracted as.
  • text (str) – The mention's surface text.
  • char_start (int) – The start character offset within the chunk's text.
  • char_end (int) – The end character offset within the chunk's text.
  • confidence (float | None) – The extractor's confidence in this mention, when available.
  • properties (dict[str, object]) – Schema-declared property values this mention carries, keyed by property name. Empty for an extractor that only reports spans. normalize_extraction_result drops any key that the schema does not declare for this mention's label.

char_end​

char_end: int

char_start​

char_start: int

chunk_id​

chunk_id: UUID

confidence​

confidence: float | None = None

label​

label: str

properties​

properties: dict[str, object] = Field(default_factory=dict)

text​

text: str