Skip to content

Interface: IngestionStatsDto

@kortexya/reasoninglayer


@kortexya/reasoninglayer / IngestionStatsDto

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

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:1000

Source-text alignment statistics.


alreadyIngested: boolean

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

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:1002

Number of chunks that failed extraction.


chunksProcessed: number

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

Number of text chunks processed.


optional clausesExtracted?: number

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

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


optional communityStats?: CommunityStatsDto

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

Community detection statistics (GraphRAG-style clustering).


documentsRefused: RefusedDocument[]

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

The documents of a batch that a bound constraint refused (reasoninglayer#1253): nothing of each was committed, and the batch went on with the others. Empty when none was refused.


optional documentTermId?: string | null

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

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:1017

Number of new entities created.


entitiesExtracted: number

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

Number of entities extracted from text.


optional entitiesFilteredLowQuality?: number

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

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


entitiesMerged: number

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

Number of entities merged (deduplicated).


entitiesPendingReview: number

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

Number of entities pending human review.


entitiesRefused: RefusedEntityDto[]

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

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:1038

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


optional estimatedCostUsd?: number | null

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

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


optional failedChunks?: ChunkFailureDto[]

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

Details of failed chunks (first 5).


optional fcaDiscovery?: FcaIngestionReport

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

The ingestion FCA discovery report, present when the request set enableFcaDiscovery.


optional groundingStats?: GroundingStatsDto

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

Entity grounding statistics (linking to external ontologies).


optional model?: string | null

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

LLM model used for extraction.


optional ontologyVerifier?: OntologyVerifierStatsDto

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

Statistics of the learned ontology verifier.


optional pipelineQuality?: PipelineQualityStatsDto

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

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


processingTimeMs: number

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

Processing time in milliseconds.


optional promptExecutions?: PromptExecutionDto[]

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

Actual executions, not certificates of factual truth.


optional qaPairsGenerated?: number

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

Number of Q&A pairs that document enrichment generated.


referencesResolved: number

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

Number of references resolved.


referencesUnresolved: number

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

Number of unresolved references (residuated).


relationsExtracted: number

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

Number of relations extracted from text.


relationsIntegrated: number

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

Number of relations integrated as features on entities.


optional relationsOrphaned?: number

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

Number of suspended relations that stayed unresolved.


optional relationsResumed?: number

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

Number of suspended relations resumed when their endpoints appeared.


optional relationsSuspended?: number

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

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


sortNames: string[]

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

Names of created/reused sorts.


sortsCreated: number

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

Number of new sorts created.


sortsReused: number

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

Number of existing sorts reused.


optional sotaExtractionGate?: SotaExtractionGateStatsDto

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

Statistics of the extraction quality gate.


termIds: string[]

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

IDs of created/updated terms.


optional tokenUsage?: TokenUsageDto

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

Token usage from LLM API calls during this ingestion.


optional workCache?: IngestionWorkCacheDto

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

Work-cache provenance counted by the engine: provider calls made, reused and uncacheable. Absent when the engine reports none.