Skip to main content

agrag.ingestion.stats.chunking.ChunkingMatch

Bases: BaseModel

The chunker that one document got, and what it produced.

Attributes:

  • document_key (str) – The key of the chunked document.
  • rule (int | None) – The index of the matching rule, or None for the fallback.
  • strategy (str) – The strategy name of the chunker.
  • chunker_hash (str) – The fingerprint of the chunker settings.
  • chunks (int) – The number of chunks the chunker produced.
  • chunks_by_chunker (dict[str, int]) – Chunk counts per chunker name. A strategy that hands a part to a fallback names those chunks <strategy>:<fallback>, so this can hold more than one name. Empty means every chunk has strategy.

chunker_hash​

chunker_hash: str

chunks​

chunks: int

chunks_by_chunker​

chunks_by_chunker: dict[str, int] = Field(default_factory=dict)

document_key​

document_key: str

rule​

rule: int | None

strategy​

strategy: str