Skip to main content
Version: 0.0.5 (stable)

agrag.ingestion.stats.chunking.ChunkingStats

Bases: BaseModel

Chunking-stage results.

Attributes:

  • chunks (int) – The number of chunks made.
  • sections (int) – The number of sections in the chunked documents.
  • tables (int) – The number of tables in the chunked documents.
  • figures (int) – The number of figures in the chunked documents.

Functions:

chunks​

chunks: int = 0

figures​

figures: int = 0

from_documents​

from_documents(documents:Sequence[Document], chunks:Sequence[Chunk]) -> ChunkingStats

Count what the chunker and the loaders produced.

Parameters:

  • documents (Sequence[Document]) – The documents that were chunked.
  • chunks (Sequence[Chunk]) – The chunks made from them.

Returns:

  • ChunkingStats – The counts.

sections​

sections: int = 0

tables​

tables: int = 0