Skip to main content
Version: latest

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. The offsets of a mention never include the whitespace around its text.
  • confidence (float | None) – The extractor's confidence in this mention, when the extractor reports one. The local extractor always sets it.
  • properties (dict[str, object]) – Property values this mention carries, keyed by property name. Empty for an extractor that only reports spans. The LLM extractor keeps only the keys that the schema declares 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