Skip to content

Interface: IngestionStatsDto

@kortexya/reasoninglayer


@kortexya/reasoninglayer / IngestionStatsDto

Defined in: src/types/ingestion.ts:869

Ingestion statistics.

Comprehensive statistics from the ingestion pipeline including chunk processing, entity extraction, deduplication, relations, and quality metrics.

optional alignmentStats?: AlignmentStatsDto

Defined in: src/types/ingestion.ts:879

Source-text alignment statistics.


alreadyIngested: boolean

Defined in: src/types/ingestion.ts:877

true when these bytes were already ingested in the tenant: nothing was extracted again, and IngestionStatsDto.documentTermId names the earlier registry document that holds them (the first document with these bytes). The request’s collectionPath / previousDocumentId were applied to that document; an intent the engine cannot apply is refused, never dropped.


chunksFailed: number

Defined in: src/types/ingestion.ts:881

Number of chunks that failed extraction.


chunksProcessed: number

Defined in: src/types/ingestion.ts:883

Number of text chunks processed.


optional clausesExtracted?: number

Defined in: src/types/ingestion.ts:885

Number of contract clauses extracted (obligations, permissions, …).


optional communityStats?: CommunityStatsDto

Defined in: src/types/ingestion.ts:887

Community detection statistics (GraphRAG-style clustering).


optional documentTermId?: string | null

Defined in: src/types/ingestion.ts:894

Document-registry id (UUID) of the document that holds this content: the document term the linking stage created, or, when IngestionStatsDto.alreadyIngested, the earlier document with the same bytes. Absent when linking was skipped.


entitiesCreated: number

Defined in: src/types/ingestion.ts:896

Number of new entities created.


entitiesExtracted: number

Defined in: src/types/ingestion.ts:898

Number of entities extracted from text.


optional entitiesFilteredLowQuality?: number

Defined in: src/types/ingestion.ts:900

Number of entities filtered out due to low-quality names.


entitiesMerged: number

Defined in: src/types/ingestion.ts:902

Number of entities merged (deduplicated).


entitiesPendingReview: number

Defined in: src/types/ingestion.ts:904

Number of entities pending human review.


entitiesRefused: RefusedEntityDto[]

Defined in: src/types/ingestion.ts:909

The extracted entities the declaration verdict refused, so they were not written. Every refusal is listed; empty when none was refused.


optional entityMergeAudit?: EntityMergeAuditDto[]

Defined in: src/types/ingestion.ts:911

The entity merges the pipeline made, each with its evidence.


optional estimatedCostUsd?: number | null

Defined in: src/types/ingestion.ts:913

Estimated USD cost of LLM API calls (if model pricing is available).


optional failedChunks?: ChunkFailureDto[]

Defined in: src/types/ingestion.ts:915

Details of failed chunks (first 5).


optional groundingStats?: GroundingStatsDto

Defined in: src/types/ingestion.ts:917

Entity grounding statistics (linking to external ontologies).


optional model?: string | null

Defined in: src/types/ingestion.ts:919

LLM model used for extraction.


optional ontologyVerifier?: OntologyVerifierStatsDto

Defined in: src/types/ingestion.ts:921

Statistics of the learned ontology verifier.


optional pipelineQuality?: PipelineQualityStatsDto

Defined in: src/types/ingestion.ts:923

Pipeline quality statistics (inference rules, validation, feedback loop).


processingTimeMs: number

Defined in: src/types/ingestion.ts:925

Processing time in milliseconds.


optional qaPairsGenerated?: number

Defined in: src/types/ingestion.ts:927

Number of Q&A pairs that document enrichment generated.


referencesResolved: number

Defined in: src/types/ingestion.ts:929

Number of references resolved.


referencesUnresolved: number

Defined in: src/types/ingestion.ts:931

Number of unresolved references (residuated).


relationsExtracted: number

Defined in: src/types/ingestion.ts:933

Number of relations extracted from text.


relationsIntegrated: number

Defined in: src/types/ingestion.ts:935

Number of relations integrated as features on entities.


optional relationsOrphaned?: number

Defined in: src/types/ingestion.ts:937

Number of suspended relations that stayed unresolved.


optional relationsResumed?: number

Defined in: src/types/ingestion.ts:939

Number of suspended relations resumed when their endpoints appeared.


optional relationsSuspended?: number

Defined in: src/types/ingestion.ts:941

Number of relations suspended because an endpoint was not yet available.


sortNames: string[]

Defined in: src/types/ingestion.ts:943

Names of created/reused sorts.


sortsCreated: number

Defined in: src/types/ingestion.ts:945

Number of new sorts created.


sortsReused: number

Defined in: src/types/ingestion.ts:947

Number of existing sorts reused.


optional sotaExtractionGate?: SotaExtractionGateStatsDto

Defined in: src/types/ingestion.ts:949

Statistics of the extraction quality gate.


termIds: string[]

Defined in: src/types/ingestion.ts:951

IDs of created/updated terms.


optional tokenUsage?: TokenUsageDto

Defined in: src/types/ingestion.ts:953

Token usage from LLM API calls during this ingestion.