Skip to main content
Version: 0.0.6

Run statistics

Graph.add returns an AddResult. Graph.update returns an UpdateResult whose add_result contains the same summaries. This page lists the fields of AddResult, the failure records that its stages return, and the counts of discarded items. See the Python API for the types.

Add result​

FieldTypeMeaning
ingestionIngestStatsdocuments, sources, skipped, unchanged, and quarantined counts, and quarantined_items, the failure records of the quarantined sources.
chunkingChunkingStatschunks, sections, tables, and figures counts.
extractionExtractionStatsThe counts in Extraction statistics.
escalationEscalationReportHow many chunks the LLM extractor read and how many it left to the first extractor. See Escalation report.
resolutionResolutionStatsexact_match_hits, in_batch_groups, ambiguous_count, failed_llm_requests, cap_truncated_pairs, and llm_unavailable_pairs.
mergeMergeStatsnodes_created, nodes_updated, conflicts_resolved, dropped, and the failure fields.
storageStorageStatsnodes_written, relationships_written, and the failure fields.
chunkslist of ChunkEvery chunk the call produced. Empty unless you pass return_chunks=True.

Failure records​

The extraction, merge, and storage stats each have failures, failures_total, and failures_truncated. A stage keeps the first 200 failure records. failures_total counts every failure, and failures_truncated is true when the list was cut.

Each record in failures is a StageFailure.

FieldMeaning
item_idThe chunk id, mention id, or batch id that the stage failed on.
error_typeThe class name of the exception.
error_messageThe message of the exception.
trace_idThe OpenTelemetry trace id when a recording span is active for the failure.
span_idThe active recording span's id, when available.

Escalation report​

AddResult.escalation counts the chunks of one run. The first extractor reads every chunk. A chunk is eligible when that first result is weak, and the escalation budget caps how many eligible chunks the LLM extractor reads, weakest first.

FieldMeaning
modeThe effective extraction mode. A run with no LLM extractor reports gliner.
totalThe chunks the run extracted from.
skipped_shortIn llm mode, the chunks under EXTRACTION_MIN_ESCALATION_WORDS words that went to no model. Zero in other modes.
eligibleThe chunks whose first result was weak enough to escalate. Zero in llm mode.
escalatedThe chunks the LLM extractor was called on.
left_for_glinerThe eligible chunks that kept the first result because the budget ran out.
lowest_score_leftThe lowest span score among those chunks, or None.
failedThe escalated chunks that kept the first result because the LLM call raised, its answer did not parse, or it returned no entities when the first result had some. Counted inside escalated.
budget_neededThe smallest batch share that would have escalated every eligible chunk in each batch. For a run with several batches, this is the largest per-batch share needed.
primary_seconds, escalation_secondsSeconds spent in the first extractor and in the LLM extractor, summed over batches.

Extraction statistics​

AddResult.extraction is an ExtractionStats.

FieldMeaning
droppedDroppedCount entries for items extraction discarded. Each entry has kind, label, reason and count. The list is filled whether or not candidates are written. These are run counts, not counts of candidate records currently stored.
candidates_writtenCandidate records written to the graph by this run.
candidates_skippedDiscarded items not written because a reviewer already approved or rejected the same content, or because a relation's ends became one entity.

Merge statistics​

AddResult.merge.dropped lists relations that the merge stage could not write. Each entry has the same DroppedCount fields.

Drop reasons​

ReasonKindMeaning
off_patternrelationThe relation label is declared, but the schema allows no pattern for its endpoint types.
below_relation_cutrelationThe relation score is below its threshold.
unresolved_endpointrelationAn endpoint does not match a kept entity span.
entity_bandentityThe entity score is between the band floor and entity threshold. This reason is absent when the GLiNER candidate pass is disabled or the mode is llm.
propertypropertyThe LLM returned a property key that the entity type does not declare.
schema_validationentity, relationSchema validation removed an undeclared entity or an invalid relation. These counts do not create candidate proposals.
unmapped_endpointrelationA relation endpoint has no merged entity. This reason appears in merge.dropped.
merged_self_looprelationBoth relation endpoints became one entity. This reason appears in merge.dropped.

Property conflicts are counted in merge.conflicts_resolved, not in merge.dropped.

Candidate storage failures abort document replacement even under ErrorPolicy.SKIP, so previously committed evidence is preserved.

Candidate kinds by mode​

Set the mode with ExtractionSettings.mode or EXTRACTION_MODE. The table lists the candidate kinds each mode can write.

Kindglinerhybridllm
off_patternYesYesYes
below_relation_cutYesYesNo
unresolved_endpointYesYesNo
entity_bandYesYesNo
propertyNoYes, for custom schemas with propertiesYes, for custom schemas with properties

An off_pattern candidate in llm mode has confidence 0.0, because the model does not return a score. A property candidate uses the holder entity's confidence, or 0.0 when the entity has no score.