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
¶
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 is billed 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
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_sheetwhere the render mode is facts-only,inheritotherwise. The cheapest chapter each mode can legally read, chosen without asking an operator to know which those are. 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 on the facts path only: the ontology loop emits a patch against the statements it reads, so its chapter has to remain a graph.
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
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 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 | |
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_MEASUREMENTS_RECOVERED = 'facts_completion_measurements_recovered'
class-attribute
instance-attribute
¶
FACTS_COMPLETION_TRIPLES_INSERTED = 'facts_completion_triples_inserted'
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_FINDINGS_RESIDUAL = 'facts_findings_residual'
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_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_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_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_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
¶
SectionLabelSource
¶
Bases: StrEnum
How a chunk's section_label was decided.
Ordered from strongest to weakest evidence. The source is not bookkeeping:
the chunk-prepare cascade uses it to decide whether a label may still be
overwritten by a later tier, and forward-fill refuses to cross a span whose
source is :attr:OUTLINE_UNRESOLVED.
Source code in ontocast/onto/enum.py
Attributes¶
CONTENT_DENSITY = 'content_density'
class-attribute
instance-attribute
¶
FORWARD_FILL = 'forward_fill'
class-attribute
instance-attribute
¶
FRONT_MATTER = 'front_matter'
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
¶
SPAN_OVERLAP = 'span_overlap'
class-attribute
instance-attribute
¶
Status
¶
Bases: StrEnum
Enumeration of possible workflow status values.
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.