ontocast.onto.enum¶
Classes¶
FailureStage
¶
Bases: StrEnum
Enumeration of possible failure stages in the workflow.
Source code in ontocast/onto/enum.py
Attributes¶
FACTS_CRITIQUE = 'The produced graph of facts did not pass the critique stage.'
class-attribute
instance-attribute
¶
GENERATE_GRAPH_UPDATE_FOR_FACTS = 'Failed to generate graph update for facts'
class-attribute
instance-attribute
¶
GENERATE_GRAPH_UPDATE_FOR_ONTOLOGY = 'Failed to generate graph update for ontology'
class-attribute
instance-attribute
¶
GENERATE_TTL_FOR_FACTS = 'Failed to generate semantic triples (turtle) for facts'
class-attribute
instance-attribute
¶
GENERATE_TTL_FOR_ONTOLOGY = 'Failed to generate semantic triples (turtle) for ontology'
class-attribute
instance-attribute
¶
NO_CHUNKS_TO_PROCESS = 'No chunks to process'
class-attribute
instance-attribute
¶
ONTOLOGY_CRITIQUE = 'The produced ontology did not pass the critique stage.'
class-attribute
instance-attribute
¶
UNSUPPORTED_DOCUMENT = 'The document type is not supported'
class-attribute
instance-attribute
¶
LLMGraphFormat
¶
Bases: StrEnum
Format used by the LLM when emitting RDF graph payloads.
turtle(default): graph fields are Turtle strings. Fewer tokens per triple than JSON-LD, and an IRI object cannot be written as a string by accident:unit:NanoMis an IRI,"unit:NanoM"visibly a literal.jsonld: graph fields are compact JSON-LD objects embedded directly in the structured LLM response, for providers whose structured output handles long strings worse than nested objects. Internally parsed back intoRDFGraph.
Source code in ontocast/onto/enum.py
LLMOutputLayout
¶
Bases: StrEnum
Whitespace the LLM is asked to use in its structured responses.
compact(default): the JSON response is minified, and a Turtle graph string keeps each subject on one line without indentation. Indentation counts as output tokens and carries nothing the parser reads.free: no layout instruction; the model chooses, and typically pretty-prints JSON with indentation.
Source code in ontocast/onto/enum.py
LLMPhase
¶
Bases: StrEnum
What an LLM call was for: the key of BudgetTracker.tokens_by_phase.
A phase covers every provider call its step makes, parse retries and
re-renders included. UNLABELED collects calls made outside any labelled
step; in a pipeline run it should stay empty.
Source code in ontocast/onto/enum.py
Attributes¶
EVIDENCE_PLANNING = 'evidence_planning'
class-attribute
instance-attribute
¶
FACTS_COMPLETION = 'facts_completion'
class-attribute
instance-attribute
¶
FACTS_COREFERENCE = 'facts_coreference'
class-attribute
instance-attribute
¶
FACTS_CRITIC = 'facts_critic'
class-attribute
instance-attribute
¶
FACTS_RENDER = 'facts_render'
class-attribute
instance-attribute
¶
ONTOLOGY_CONSOLIDATION = 'ontology_consolidation'
class-attribute
instance-attribute
¶
ONTOLOGY_CRITIC = 'ontology_critic'
class-attribute
instance-attribute
¶
ONTOLOGY_CURATION = 'ontology_curation'
class-attribute
instance-attribute
¶
ONTOLOGY_IDENTITY = 'ontology_identity'
class-attribute
instance-attribute
¶
ONTOLOGY_PLAN = 'ontology_plan'
class-attribute
instance-attribute
¶
ONTOLOGY_RENDER = 'ontology_render'
class-attribute
instance-attribute
¶
ONTOLOGY_SELECTION = 'ontology_selection'
class-attribute
instance-attribute
¶
SECTION_CLASSIFICATION = 'section_classification'
class-attribute
instance-attribute
¶
UNIT_SUMMARY = 'unit_summary'
class-attribute
instance-attribute
¶
UNLABELED = 'unlabeled'
class-attribute
instance-attribute
¶
LabelStrength
¶
Bases: StrEnum
Whether a section label may take part in a drop decision. Wire names.
Source code in ontocast/onto/enum.py
OntologyAssemblyMode
¶
Bases: StrEnum
How per-unit ontology context was assembled for prompts.
Source code in ontocast/onto/enum.py
Attributes¶
DOCUMENT_MERGED_REDUCED = 'document_merged_reduced'
class-attribute
instance-attribute
¶
FIXED_SINGLE_ONTOLOGY = 'fixed_single_ontology'
class-attribute
instance-attribute
¶
SELECTED_SINGLE_ONTOLOGY_LLM = 'selected_single_ontology_llm'
class-attribute
instance-attribute
¶
SELECTED_VECTOR_SEARCH_ENSEMBLE = 'selected_vector_search_ensemble'
class-attribute
instance-attribute
¶
OntologyChapterFormat
¶
Bases: StrEnum
Syntax of the # ONTOLOGY chapter in the facts prompts.
auto(default):term_sheet, the shortest chapter. Resolved once when the configuration is built, so nothing downstream -- profile lookup, cache key, run manifest -- ever sees this member.inherit: the chapter follows :class:LLMGraphFormat, so the model reads the ontology in the syntax it is asked to write.turtle: the chapter is Turtle whatever the wire format is. In a facts prompt the ontology is read-only context -- nothing the model emits has to match its syntax -- and Turtle spends fewer characters per triple than pretty-printed JSON-LD, so this trades the read/write symmetry for a shorter prompt. The graph payloads the model emits stay in the wire format.term_sheet: the chapter is a line-per-term listing rather than a serialized graph -- name, surface forms, type, hierarchy, domain/range and usage contract, without the per-statement RDF scaffolding or the prose written for a human reader. Legal in every render mode: the ontology loop never reads this setting and keeps its own graph chapter, because it emits a patch against the statements it reads.
Source code in ontocast/onto/enum.py
OntologyContextMode
¶
Bases: StrEnum
How per-unit ontology context is sourced before ontology/facts rendering.
Source code in ontocast/onto/enum.py
OntologyContextScope
¶
Bases: StrEnum
Whether the ontology chapter is resolved per unit or once per document.
unit(default): each content unit retrieves its own context. The smallest chapter per unit, and a different chapter for every one of them, so a provider's prefix cache can serve none of them.document: every unit's context is resolved once and unioned, and the union is shown to all of them. Larger per call and recall-safe by construction -- the union contains everything each unit's own retrieval selected -- but identical across the fan-out, which is what makes the chapter cacheable after the first call.
Source code in ontocast/onto/enum.py
RenderMode
¶
Bases: StrEnum
Enumeration of supported rendering modes.
Source code in ontocast/onto/enum.py
RetrievalMetric
¶
Bases: StrEnum
Top-level keys of AgentState.retrieval_metrics.
These are wire names. The dict is serialized verbatim into
ProcessResultMetadata.retrieval_metrics on /process and
/process_unit and into the batch run manifest, so a member's value
may never change without a breaking release; the member name is free to.
Collecting them here replaces bare string literals scattered over three
modules, where a typo produced a silently missing metric and nothing
enumerated what a run should emit.
Only the flat top level is enumerated. The per-retrieval telemetry that
lands nested under :attr:PATCH_RETRIEVAL is the patch retriever's own
namespace with its own lifecycle, and flattening it here would assert a
structure that does not exist.
Source code in ontocast/onto/enum.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
Attributes¶
CONSISTENCY_CONFLICTS = 'consistency_conflicts'
class-attribute
instance-attribute
¶
EMPTY_SNAPSHOT_REASON = 'empty_snapshot_reason'
class-attribute
instance-attribute
¶
FACTS_ANCHOR_COUNT = 'facts_anchor_count'
class-attribute
instance-attribute
¶
FACTS_ANCHOR_UNITS = 'facts_anchor_units'
class-attribute
instance-attribute
¶
FACTS_COMPLETION_CALLS = 'facts_completion_calls'
class-attribute
instance-attribute
¶
FACTS_COMPLETION_DETACHED_LINKED = 'facts_completion_detached_linked'
class-attribute
instance-attribute
¶
FACTS_COMPLETION_MEASUREMENTS_RECOVERED = 'facts_completion_measurements_recovered'
class-attribute
instance-attribute
¶
FACTS_COMPLETION_TRIPLES_INSERTED = 'facts_completion_triples_inserted'
class-attribute
instance-attribute
¶
FACTS_COMPONENTS = 'facts_components'
class-attribute
instance-attribute
¶
FACTS_COREFERENCE_DIFFERENT = 'facts_coreference_different'
class-attribute
instance-attribute
¶
FACTS_COREFERENCE_PAIRS = 'facts_coreference_pairs'
class-attribute
instance-attribute
¶
FACTS_COREFERENCE_SAME = 'facts_coreference_same'
class-attribute
instance-attribute
¶
FACTS_CRITIC_ACCEPTED = 'facts_critic_accepted'
class-attribute
instance-attribute
¶
FACTS_CRITIC_CALLS = 'facts_critic_calls'
class-attribute
instance-attribute
¶
FACTS_CRITIC_FIXES_APPLIED = 'facts_critic_fixes_applied'
class-attribute
instance-attribute
¶
FACTS_CRITIC_FIXES_JUNK_REFUSED = 'facts_critic_fixes_junk_refused'
class-attribute
instance-attribute
¶
FACTS_CRITIC_FIXES_NOOP = 'facts_critic_fixes_noop'
class-attribute
instance-attribute
¶
FACTS_CRITIC_FIXES_RESIDUAL = 'facts_critic_fixes_residual'
class-attribute
instance-attribute
¶
FACTS_CRITIC_FIXES_ROLLED_BACK = 'facts_critic_fixes_rolled_back'
class-attribute
instance-attribute
¶
FACTS_CRITIC_FIXES_UNRESOLVED_PREFIX = 'facts_critic_fixes_unresolved_prefix'
class-attribute
instance-attribute
¶
FACTS_CRITIC_PATCHES_ROLLED_BACK = 'facts_critic_patches_rolled_back'
class-attribute
instance-attribute
¶
FACTS_CRITIC_UNITS_SKIPPED = 'facts_critic_units_skipped'
class-attribute
instance-attribute
¶
FACTS_CRITIC_UNITS_UNREVIEWED = 'facts_critic_units_unreviewed'
class-attribute
instance-attribute
¶
FACTS_DATE_VALUES_ADDED = 'facts_date_values_added'
class-attribute
instance-attribute
¶
FACTS_DOMAIN_REPAIR_CALLS = 'facts_domain_repair_calls'
class-attribute
instance-attribute
¶
FACTS_DOMAIN_REPAIR_FIXED = 'facts_domain_repair_fixed'
class-attribute
instance-attribute
¶
FACTS_DOMAIN_VIOLATIONS_DROPPED = 'facts_domain_violations_dropped'
class-attribute
instance-attribute
¶
FACTS_FINDINGS_RESIDUAL = 'facts_findings_residual'
class-attribute
instance-attribute
¶
FACTS_ISOLATED = 'facts_isolated'
class-attribute
instance-attribute
¶
FACTS_LINKS_REMOVED = 'facts_links_removed'
class-attribute
instance-attribute
¶
FACTS_LLM_REPAIR_RENDERS_FAILED = 'facts_llm_repair_renders_failed'
class-attribute
instance-attribute
¶
FACTS_LLM_REPAIR_RENDERS_TOTAL = 'facts_llm_repair_renders_total'
class-attribute
instance-attribute
¶
FACTS_MANDATORY_RESIDUAL = 'facts_mandatory_residual'
class-attribute
instance-attribute
¶
FACTS_MANDATORY_RESIDUAL_BY_KIND = 'facts_mandatory_residual_by_kind'
class-attribute
instance-attribute
¶
FACTS_MERGE_REJECTIONS_BY_REASON = 'facts_merge_rejections_by_reason'
class-attribute
instance-attribute
¶
FACTS_MERGE_REPAIRS_REJECTED = 'facts_merge_repairs_rejected'
class-attribute
instance-attribute
¶
FACTS_MERGE_REPAIR_PASSES = 'facts_merge_repair_passes'
class-attribute
instance-attribute
¶
FACTS_MERGE_VETOES = 'facts_merge_vetoes'
class-attribute
instance-attribute
¶
FACTS_REJECTED_MERGES = 'facts_rejected_merges'
class-attribute
instance-attribute
¶
FACTS_REPAIR_DELETE_ONLY = 'facts_repair_delete_only'
class-attribute
instance-attribute
¶
FACTS_SELF_LOOPS_DROPPED = 'facts_self_loops_dropped'
class-attribute
instance-attribute
¶
FACTS_SHACL_AUTOFIX_PASSES = 'facts_shacl_autofix_passes'
class-attribute
instance-attribute
¶
FACTS_SHACL_AUTOFIX_REVERTED = 'facts_shacl_autofix_reverted'
class-attribute
instance-attribute
¶
FACTS_SHACL_REPAIRS = 'facts_shacl_repairs'
class-attribute
instance-attribute
¶
FACTS_SHACL_VIOLATIONS_AFTER = 'facts_shacl_violations_after'
class-attribute
instance-attribute
¶
FACTS_SHACL_VIOLATIONS_BEFORE = 'facts_shacl_violations_before'
class-attribute
instance-attribute
¶
FACTS_STATEMENTS_WITHOUT_SUBJECT = 'facts_statements_without_subject'
class-attribute
instance-attribute
¶
FACTS_STATEMENTS_WITHOUT_SUBJECT_RENDERED = 'facts_statements_without_subject_rendered'
class-attribute
instance-attribute
¶
FACTS_TWIN_LABELS = 'facts_twin_labels'
class-attribute
instance-attribute
¶
FACTS_UNLINKED_DROPPED = 'facts_unlinked_dropped'
class-attribute
instance-attribute
¶
FACTS_UNTYPED_DROPPED = 'facts_untyped_dropped'
class-attribute
instance-attribute
¶
FACTS_UNTYPED_INFERRED = 'facts_untyped_inferred'
class-attribute
instance-attribute
¶
FACTS_VALIDATION_ERRORS = 'facts_validation_errors'
class-attribute
instance-attribute
¶
FACTS_VALIDATION_FINDINGS = 'facts_validation_findings'
class-attribute
instance-attribute
¶
ONTOLOGY_CONTEXT_MODE = 'ontology_context_mode'
class-attribute
instance-attribute
¶
ONTOLOGY_CRITIC_ACCEPTED = 'ontology_critic_accepted'
class-attribute
instance-attribute
¶
ONTOLOGY_CRITIC_CALLS = 'ontology_critic_calls'
class-attribute
instance-attribute
¶
ONTOLOGY_CRITIC_FIXES_APPLIED = 'ontology_critic_fixes_applied'
class-attribute
instance-attribute
¶
ONTOLOGY_CRITIC_FIXES_NOOP = 'ontology_critic_fixes_noop'
class-attribute
instance-attribute
¶
ONTOLOGY_CRITIC_FIXES_RESIDUAL = 'ontology_critic_fixes_residual'
class-attribute
instance-attribute
¶
ONTOLOGY_CRITIC_PATCHES_ROLLED_BACK = 'ontology_critic_patches_rolled_back'
class-attribute
instance-attribute
¶
ONTOLOGY_CRITIC_UNITS_SKIPPED = 'ontology_critic_units_skipped'
class-attribute
instance-attribute
¶
ONTOLOGY_FINDINGS_RESIDUAL = 'ontology_findings_residual'
class-attribute
instance-attribute
¶
ONTOLOGY_MANDATORY_RESIDUAL = 'ontology_mandatory_residual'
class-attribute
instance-attribute
¶
ONTOLOGY_PRIMARY_UNITS = 'ontology_primary_units'
class-attribute
instance-attribute
¶
ONTOLOGY_SNAPSHOT_TRIPLES = 'ontology_snapshot_triples'
class-attribute
instance-attribute
¶
ONTOLOGY_WRITABLE_COUNT = 'ontology_writable_count'
class-attribute
instance-attribute
¶
PATCH_RETRIEVAL = 'patch_retrieval'
class-attribute
instance-attribute
¶
STRUCTURAL_ONTOLOGY_COMPONENTS_MAX = 'structural_ontology_components_max'
class-attribute
instance-attribute
¶
VALIDATED_WITHOUT_ONTOLOGY_CONTEXT = 'validated_without_ontology_context'
class-attribute
instance-attribute
¶
RouteReason
¶
Bases: StrEnum
Why a unit took its route. Values are wire names (run manifest, logs).
Source code in ontocast/onto/enum.py
Attributes¶
BOILERPLATE = 'boilerplate'
class-attribute
instance-attribute
¶
CITATION_LABEL = 'citation_label'
class-attribute
instance-attribute
¶
CITATION_LIST = 'citation_list'
class-attribute
instance-attribute
¶
CONTENT = 'content'
class-attribute
instance-attribute
¶
CONTENTS_LIST = 'contents_list'
class-attribute
instance-attribute
¶
EXCLUDED_BY_REQUEST = 'excluded_by_request'
class-attribute
instance-attribute
¶
EXCLUSION_OVERRIDDEN = 'exclusion_overridden'
class-attribute
instance-attribute
¶
FALLBACK_SCHEMA = 'fallback_schema'
class-attribute
instance-attribute
¶
LABEL_CONTRADICTED = 'label_contradicted'
class-attribute
instance-attribute
¶
NON_CONTENT = 'non_content'
class-attribute
instance-attribute
¶
UNDERSIZED = 'undersized'
class-attribute
instance-attribute
¶
WEAK_LABEL = 'weak_label'
class-attribute
instance-attribute
¶
SectionLabelSource
¶
Bases: StrEnum
Which tier gave a piece of section-label evidence. Values are wire names.
:attr:OUTLINE_UNRESOLVED marks a section the outline saw a heading for
but could not name: no tier spreads a neighbour's label into it.
Source code in ontocast/onto/enum.py
Attributes¶
CONTENT_BLOCK = 'content_block'
class-attribute
instance-attribute
¶
CONTENT_DENSITY = 'content_density'
class-attribute
instance-attribute
¶
FRONT_MATTER = 'front_matter'
class-attribute
instance-attribute
¶
HEADING_EMBEDDING = 'heading_embedding'
class-attribute
instance-attribute
¶
HEADING_INHERITED = 'heading_inherited'
class-attribute
instance-attribute
¶
HEADING_KEYWORD = 'heading_keyword'
class-attribute
instance-attribute
¶
HEADING_PATTERN = 'heading_pattern'
class-attribute
instance-attribute
¶
LLM = 'llm'
class-attribute
instance-attribute
¶
OUTLINE_UNRESOLVED = 'outline_unresolved'
class-attribute
instance-attribute
¶
Status
¶
Bases: StrEnum
Enumeration of possible workflow status values.
Source code in ontocast/onto/enum.py
UnitRoute
¶
Bases: StrEnum
What happens to a unit before extraction. Values are wire names.
Source code in ontocast/onto/enum.py
VectorDistance
¶
Bases: StrEnum
Vector distance metric used when creating a vector collection.
Values match qdrant_client.http.models.Distance exactly, so existing
QDRANT_DISTANCE environment values keep working. Declaring it here
rather than importing Qdrant's enum keeps the Qdrant SDK off the import
path of :mod:ontocast.config, which every entry point loads.
Source code in ontocast/onto/enum.py
VectorStoreBackend
¶
Bases: StrEnum
Which vector store implementation backs ontology patch retrieval.
Two backends are supported: QDRANT (server) and LANCEDB (embedded),
each shipped as its own optional extra.
AUTO infers the backend from whichever connection setting is populated
-- Qdrant if QDRANT_URI is set, LanceDB if it is enabled, otherwise
NONE. NONE is the default for an unconfigured install: ontology
context then comes from a single working ontology, which is the default
:class:OntologyContextMode. Naming a backend explicitly makes the choice
fail loudly when its configuration is missing.
Source code in ontocast/onto/enum.py
WorkflowNode
¶
Bases: StrEnum
Enumeration of workflow nodes in the processing pipeline.