Skip to main content

agrag.common.data_models.graph_schema.RelationType

Bases: BaseModel

One kind of relation a schema recognizes.

Attributes:

  • label (str) – The relation label used in the extraction prompt and the graph.
  • description (str) – Guidance fed to the extractor prompt or schema builder.
  • patterns (list[tuple[str, str]]) – Valid (source_label, target_label) pairs for this relation. An extraction whose triple is not in this list is dropped at normalize time.

description​

description: str

label​

label: str

patterns​

patterns: list[tuple[str, str]]