Skip to content

ontocast.onto.enum

Classes

FailureStage

Bases: StrEnum

Enumeration of possible failure stages in the workflow.

Source code in ontocast/onto/enum.py
class FailureStage(StrEnum):
    """Enumeration of possible failure stages in the workflow."""

    NO_CHUNKS_TO_PROCESS = "No chunks to process"
    ONTOLOGY_CRITIQUE = "The produced ontology did not pass the critique stage."
    FACTS_CRITIQUE = "The produced graph of facts did not pass the critique stage."
    GENERATE_TTL_FOR_ONTOLOGY = (
        "Failed to generate semantic triples (turtle) for ontology"
    )
    GENERATE_GRAPH_UPDATE_FOR_ONTOLOGY = "Failed to generate graph update for ontology"
    GENERATE_TTL_FOR_FACTS = "Failed to generate semantic triples (turtle) for facts"
    GENERATE_GRAPH_UPDATE_FOR_FACTS = "Failed to generate graph update for facts"

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:NanoM is 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 into RDFGraph.
Source code in ontocast/onto/enum.py
class LLMGraphFormat(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:NanoM`` is 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
      into ``RDFGraph``.
    """

    TURTLE = "turtle"
    JSONLD = "jsonld"

Attributes

JSONLD = 'jsonld' class-attribute instance-attribute
TURTLE = 'turtle' class-attribute instance-attribute

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
class LLMOutputLayout(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.
    """

    FREE = "free"
    COMPACT = "compact"

Attributes

COMPACT = 'compact' class-attribute instance-attribute
FREE = 'free' class-attribute instance-attribute

OntologyAssemblyMode

Bases: StrEnum

How per-unit ontology context was assembled for prompts.

Source code in ontocast/onto/enum.py
class OntologyAssemblyMode(StrEnum):
    """How per-unit ontology context was assembled for prompts."""

    SELECTED_SINGLE_ONTOLOGY_LLM = "selected_single_ontology_llm"
    SELECTED_VECTOR_SEARCH_ENSEMBLE = "selected_vector_search_ensemble"
    FIXED_SINGLE_ONTOLOGY = "fixed_single_ontology"
    DOCUMENT_MERGED_REDUCED = "document_merged_reduced"

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 where the render mode is facts-only, inherit otherwise. 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
class OntologyChapterFormat(StrEnum):
    """Syntax of the ``# ONTOLOGY`` chapter in the facts prompts.

    - ``auto`` (default): ``term_sheet`` where the render mode is facts-only,
      ``inherit`` otherwise. 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.
    """

    AUTO = "auto"
    INHERIT = "inherit"
    TURTLE = "turtle"
    TERM_SHEET = "term_sheet"

Attributes

AUTO = 'auto' class-attribute instance-attribute
INHERIT = 'inherit' class-attribute instance-attribute
TERM_SHEET = 'term_sheet' class-attribute instance-attribute
TURTLE = 'turtle' class-attribute instance-attribute

OntologyContextMode

Bases: StrEnum

How per-unit ontology context is sourced before ontology/facts rendering.

Source code in ontocast/onto/enum.py
class OntologyContextMode(StrEnum):
    """How per-unit ontology context is sourced before ontology/facts rendering."""

    SELECTED_SINGLE_ONTOLOGY = "selected_single_ontology"
    SELECTED_VECTOR_SEARCH_ONTOLOGY = "selected_vector_search_ontology"
    FIXED_SINGLE_ONTOLOGY = "fixed_single_ontology"

Attributes

FIXED_SINGLE_ONTOLOGY = 'fixed_single_ontology' class-attribute instance-attribute
SELECTED_SINGLE_ONTOLOGY = 'selected_single_ontology' class-attribute instance-attribute
SELECTED_VECTOR_SEARCH_ONTOLOGY = 'selected_vector_search_ontology' class-attribute instance-attribute

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
class OntologyContextScope(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.
    """

    UNIT = "unit"
    DOCUMENT = "document"

Attributes

DOCUMENT = 'document' class-attribute instance-attribute
UNIT = 'unit' class-attribute instance-attribute

RenderMode

Bases: StrEnum

Enumeration of supported rendering modes.

Source code in ontocast/onto/enum.py
class RenderMode(StrEnum):
    """Enumeration of supported rendering modes."""

    ONTOLOGY = "ontology"
    FACTS = "facts"
    ONTOLOGY_AND_FACTS = "ontology_and_facts"

Attributes

FACTS = 'facts' class-attribute instance-attribute
ONTOLOGY = 'ontology' class-attribute instance-attribute
ONTOLOGY_AND_FACTS = 'ontology_and_facts' class-attribute instance-attribute

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
class RetrievalMetric(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.
    """

    # Ontology context assembly (written per unit, merged onto the document).
    ONTOLOGY_CONTEXT_MODE = "ontology_context_mode"
    PATCH_RETRIEVAL = "patch_retrieval"
    #: Why a unit's ontology snapshot came back empty. Written per unit and
    #: merged last-writer-wins, so on a multi-unit document only the final
    #: unit's reason survives.
    EMPTY_SNAPSHOT_REASON = "empty_snapshot_reason"
    ONTOLOGY_WRITABLE_COUNT = "ontology_writable_count"
    ONTOLOGY_PRIMARY_UNITS = "ontology_primary_units"
    #: Triples in the resolved ontology snapshot, written by every context mode.
    #: Before this existed only the vector resolver recorded a size, nested under
    #: :attr:`PATCH_RETRIEVAL`, so the two modes that bound nothing were also the
    #: two that reported nothing.
    ONTOLOGY_SNAPSHOT_TRIPLES = "ontology_snapshot_triples"

    # Ontology fan-out: the per-unit critic ledger and the deterministic
    # findings residual, mirrors of the facts block below, so the ontology
    # gate's accept rate can be read from a run's artifacts.
    ONTOLOGY_FINDINGS_RESIDUAL = "ontology_findings_residual"
    ONTOLOGY_MANDATORY_RESIDUAL = "ontology_mandatory_residual"
    ONTOLOGY_CRITIC_CALLS = "ontology_critic_calls"
    ONTOLOGY_CRITIC_ACCEPTED = "ontology_critic_accepted"

    # Facts fan-out.
    FACTS_ANCHOR_COUNT = "facts_anchor_count"
    FACTS_ANCHOR_UNITS = "facts_anchor_units"
    FACTS_LLM_REPAIR_RENDERS_TOTAL = "facts_llm_repair_renders_total"
    FACTS_LLM_REPAIR_RENDERS_FAILED = "facts_llm_repair_renders_failed"
    FACTS_REPAIR_DELETE_ONLY = "facts_repair_delete_only"
    FACTS_FINDINGS_RESIDUAL = "facts_findings_residual"
    FACTS_MANDATORY_RESIDUAL = "facts_mandatory_residual"
    FACTS_CRITIC_CALLS = "facts_critic_calls"
    FACTS_CRITIC_FIXES_APPLIED = "facts_critic_fixes_applied"
    FACTS_CRITIC_FIXES_RESIDUAL = "facts_critic_fixes_residual"
    FACTS_CRITIC_FIXES_NOOP = "facts_critic_fixes_noop"
    FACTS_CRITIC_PATCHES_ROLLED_BACK = "facts_critic_patches_rolled_back"
    ONTOLOGY_CRITIC_FIXES_APPLIED = "ontology_critic_fixes_applied"
    ONTOLOGY_CRITIC_FIXES_RESIDUAL = "ontology_critic_fixes_residual"
    ONTOLOGY_CRITIC_FIXES_NOOP = "ontology_critic_fixes_noop"
    ONTOLOGY_CRITIC_PATCHES_ROLLED_BACK = "ontology_critic_patches_rolled_back"
    FACTS_CRITIC_ACCEPTED = "facts_critic_accepted"
    #: Units whose critic call failed (timeout, unparseable response) and
    #: left the loop unreviewed, and units the loop did not send to the
    #: critic at all (empty render, citation metadata).
    FACTS_CRITIC_UNITS_UNREVIEWED = "facts_critic_units_unreviewed"
    FACTS_CRITIC_UNITS_SKIPPED = "facts_critic_units_skipped"
    #: Per-fix outcomes of the compiled critique: fixes undone for leaving
    #: the unit worse, inserts refused for minting a placeholder or an
    #: annotation-only node, and payloads naming a prefix nothing declared.
    FACTS_CRITIC_FIXES_ROLLED_BACK = "facts_critic_fixes_rolled_back"
    FACTS_CRITIC_FIXES_JUNK_REFUSED = "facts_critic_fixes_junk_refused"
    FACTS_CRITIC_FIXES_UNRESOLVED_PREFIX = "facts_critic_fixes_unresolved_prefix"
    #: The insert-only completion pass: calls billed, triples that stayed
    #: in, and missed measurements the inventory no longer lists afterwards.
    FACTS_COMPLETION_CALLS = "facts_completion_calls"
    FACTS_COMPLETION_TRIPLES_INSERTED = "facts_completion_triples_inserted"
    FACTS_COMPLETION_MEASUREMENTS_RECOVERED = "facts_completion_measurements_recovered"

    # Aggregation and the un-merge repair.
    FACTS_REJECTED_MERGES = "facts_rejected_merges"
    FACTS_MERGE_REPAIR_PASSES = "facts_merge_repair_passes"
    FACTS_MERGE_VETOES = "facts_merge_vetoes"
    FACTS_MERGE_REPAIRS_REJECTED = "facts_merge_repairs_rejected"

    # Validation gate. Written identically by both entry paths.
    VALIDATED_WITHOUT_ONTOLOGY_CONTEXT = "validated_without_ontology_context"
    FACTS_VALIDATION_FINDINGS = "facts_validation_findings"
    FACTS_VALIDATION_ERRORS = "facts_validation_errors"
    FACTS_SHACL_VIOLATIONS_BEFORE = "facts_shacl_violations_before"
    FACTS_SHACL_VIOLATIONS_AFTER = "facts_shacl_violations_after"
    FACTS_SHACL_REPAIRS = "facts_shacl_repairs"
    FACTS_SHACL_AUTOFIX_PASSES = "facts_shacl_autofix_passes"
    FACTS_SHACL_AUTOFIX_REVERTED = "facts_shacl_autofix_reverted"

    # Post-aggregation checks.
    STRUCTURAL_ONTOLOGY_COMPONENTS_MAX = "structural_ontology_components_max"
    CONSISTENCY_CONFLICTS = "consistency_conflicts"

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
class SectionLabelSource(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`.
    """

    HEADING_PATTERN = "heading_pattern"
    HEADING_KEYWORD = "heading_keyword"
    HEADING_INHERITED = "heading_inherited"
    FRONT_MATTER = "front_matter"
    SPAN_OVERLAP = "span_overlap"
    CONTENT_DENSITY = "content_density"
    LLM = "llm"
    FORWARD_FILL = "forward_fill"
    OUTLINE_UNRESOLVED = "outline_unresolved"

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
class Status(StrEnum):
    """Enumeration of possible workflow status values."""

    NOT_VISITED = "not visited"
    SUCCESS = "success"
    FAILED = "failed"
    COUNTS_EXCEEDED = "counts exceeded"

Attributes

COUNTS_EXCEEDED = 'counts exceeded' class-attribute instance-attribute
FAILED = 'failed' class-attribute instance-attribute
NOT_VISITED = 'not visited' class-attribute instance-attribute
SUCCESS = 'success' class-attribute instance-attribute

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
class VectorDistance(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.
    """

    COSINE = "Cosine"
    DOT = "Dot"
    EUCLID = "Euclid"
    MANHATTAN = "Manhattan"

Attributes

COSINE = 'Cosine' class-attribute instance-attribute
DOT = 'Dot' class-attribute instance-attribute
EUCLID = 'Euclid' class-attribute instance-attribute
MANHATTAN = 'Manhattan' class-attribute instance-attribute

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
class VectorStoreBackend(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.
    """

    AUTO = "auto"
    QDRANT = "qdrant"
    LANCEDB = "lancedb"
    NONE = "none"

Attributes

AUTO = 'auto' class-attribute instance-attribute
LANCEDB = 'lancedb' class-attribute instance-attribute
NONE = 'none' class-attribute instance-attribute
QDRANT = 'qdrant' class-attribute instance-attribute

WorkflowNode

Bases: StrEnum

Enumeration of workflow nodes in the processing pipeline.

Source code in ontocast/onto/enum.py
class WorkflowNode(StrEnum):
    """Enumeration of workflow nodes in the processing pipeline."""

    CONVERT_TO_TEXT = "Convert to Text"
    CHUNK = "Chunk Text"
    TEXT_TO_ONTOLOGY = "Text to Ontology"
    TEXT_TO_FACTS = "Text to Facts"
    CRITICISE_ONTOLOGY = "Criticise Ontology"
    CRITICISE_FACTS = "Criticise Facts"
    SERIALIZE = "Serialize"
    RENDER_ONTOLOGY_UPDATE = "Update Ontology"
    RENDER_FACTS = "Render Facts"
    NORMALIZE_ONTOLOGY_UPDATES = "Normalize Ontology Updates"
    CONSOLIDATE_ONTOLOGY = "Consolidate Ontology"
    MERGE_FACTS = "Merge Facts"
    VALIDATE_FACTS = "Validate Facts"
    PLAN_EXTERNAL_EVIDENCE = "Plan External Evidence"
    FETCH_EXTERNAL_EVIDENCE = "Fetch External Evidence"
    STRUCTURAL_CHECK = "Structural Check"
    CONSISTENCY_CRITIC = "Consistency Critic"

Attributes

CHUNK = 'Chunk Text' class-attribute instance-attribute
CONSISTENCY_CRITIC = 'Consistency Critic' class-attribute instance-attribute
CONSOLIDATE_ONTOLOGY = 'Consolidate Ontology' class-attribute instance-attribute
CONVERT_TO_TEXT = 'Convert to Text' class-attribute instance-attribute
CRITICISE_FACTS = 'Criticise Facts' class-attribute instance-attribute
CRITICISE_ONTOLOGY = 'Criticise Ontology' class-attribute instance-attribute
FETCH_EXTERNAL_EVIDENCE = 'Fetch External Evidence' class-attribute instance-attribute
MERGE_FACTS = 'Merge Facts' class-attribute instance-attribute
NORMALIZE_ONTOLOGY_UPDATES = 'Normalize Ontology Updates' class-attribute instance-attribute
PLAN_EXTERNAL_EVIDENCE = 'Plan External Evidence' class-attribute instance-attribute
RENDER_FACTS = 'Render Facts' class-attribute instance-attribute
RENDER_ONTOLOGY_UPDATE = 'Update Ontology' class-attribute instance-attribute
SERIALIZE = 'Serialize' class-attribute instance-attribute
STRUCTURAL_CHECK = 'Structural Check' class-attribute instance-attribute
TEXT_TO_FACTS = 'Text to Facts' class-attribute instance-attribute
TEXT_TO_ONTOLOGY = 'Text to Ontology' class-attribute instance-attribute
VALIDATE_FACTS = 'Validate Facts' class-attribute instance-attribute