FLOW ALGEBRA
TITLE: Zero-Shot Systems Domain Ontology
VERSION: 1.0
DOMAIN: AI Semantic Library / Zero-Shot Systems
SOURCE_URL: https://kirethresearch.org/booksai-core/ontologies/domain-ontologies/ai-semantic-library-domains/zero-shot-systems-domain-ontology.html
STATUS: Domain-based draft; source webpage content not independently verified.
AUTHORS: Mark Higgins — Sky (Recursive AI)
PROJECT: Kireth Semantic Library
1. PURPOSE
Represent zero-shot AI systems as typed, provenance-aware flows that perform tasks without task-specific labelled training examples at inference time. Distinguish zero-shot prompting, zero-shot classification, zero-shot transfer and zero-shot generalisation.
2. TYPES
ENTITY: {id: URI, label: String, type: EntityType}
ENTITY_TYPE: {ZeroShotSystem, FoundationModel, Task, TaskInstruction, Prompt, Input, Output, CandidateLabel, LabelDescription, Embedding, SemanticRepresentation, Inference, Prediction, ConfidenceEstimate, EvaluationDataset, Metric, Domain, Constraint, Evidence, ProvenanceRecord, ModelVersion}
RELATIONSHIP: {subject: Entity, predicate: Predicate, object: Entity, provenance: ProvenanceRecord?}
PREDICATE: {performs, receives, produces, instructedBy, usesModel, mapsTo, alignsWith, predicts, evaluatedOn, constrainedBy, derivedFrom, generalisesTo, semanticallyEquivalentTo, dependsOn}
3. CORE RELATIONS
ZeroShotSystem --usesModel--> FoundationModel
ZeroShotSystem --performs--> Task
Task --instructedBy--> TaskInstruction
Task --receives--> Input
Task --produces--> Output
Input --mapsTo--> SemanticRepresentation
SemanticRepresentation --alignsWith--> CandidateLabel
Inference --predicts--> Prediction
Prediction --derivedFrom--> Evidence
Prediction --evaluatedOn--> EvaluationDataset
ZeroShotSystem --constrainedBy--> Constraint
4. FLOW OPERATORS
NORMALISE(input) -> CanonicalInput
INTERPRET(instruction, task_context) -> TaskSpecification
ENCODE(input, model) -> SemanticRepresentation
ALIGN(representation, candidate_labels) -> RankedCandidates
INFER(model, task_specification, input) -> Prediction
CALIBRATE(prediction, calibration_evidence) -> ConfidenceEstimate
VALIDATE(prediction, constraints) -> ValidationResult
TRACE(prediction, inputs, model_version) -> ProvenanceRecord
5. ZERO-SHOT EXECUTION
flow ZeroShotInference(input, instruction, model, constraints):
canonical := NORMALISE(input)
task := INTERPRET(instruction, constraints.context)
prediction := INFER(model, task, canonical)
validation := VALIDATE(prediction, constraints)
provenance := TRACE(prediction, {canonical, instruction}, model.version)
return {prediction, validation, provenance}
6. INFERENCE RULES
RULE ZS-01: If a model executes a task without task-specific labelled examples supplied in the inference context, classify the inference configuration as zero-shot; record any relevant prior pretraining or instruction tuning.
RULE ZS-02: If a candidate label is semantically aligned with an input representation, it may be considered a classification candidate; alignment alone does not establish correctness.
RULE ZS-03: If a prediction violates an explicit task constraint, flag it for rejection or review.
RULE ZS-04: If a domain differs materially from evaluation domains, flag domain-shift uncertainty.
RULE ZS-05: If evidence is missing or conflicting, mark the prediction as unverified; do not infer reliability from fluency.
7. CONFIDENCE
CONFIDENCE:
fields: {score: Float[0,1]?, method: String, calibration_dataset: URI?, scope: String, limitations: List[String]}
rule: A raw model score is not automatically a calibrated probability.
rule: When calibration is unavailable, return confidence as uncalibrated or unknown.
8. SEMANTIC_EQUIVALENCE
SEMANTIC_EQUIVALENCE(a,b,context) -> {equivalent: Boolean|Unknown, evidence: List[Evidence], scope: String}
constraints:
- Preserve task intent, entities, relations and relevant qualifiers.
- Distinguish synonymy from contextual equivalence.
- Never treat similar embeddings as proof of logical equivalence.
9. PROVENANCE
PROVENANCE:
fields: {source_url: URI, model_id: String, model_version: String, instruction_hash: String, input_reference: String, execution_timestamp: ISO8601, evaluation_reference: URI?, transformations: List[String]}
rule: Do not fabricate evidence, metrics or source verification.
10. FLOW_HASH
FLOW_HASH := SHA256(CANONICAL_SERIALISE({title, version, types, relations, operators, rules, constraints}))
rule: Exclude transient timestamps from canonical definition hash.
rule: Recompute when ontology semantics or executable definitions change.
11. UPDATE_MODEL
UPDATE_MODEL(change):
validate_schema(change)
assess_semantic_compatibility(change)
preserve_prior_version_and_provenance()
update_affected_entities_and_relations()
recompute_FLOW_HASH()
return {version, change_log, compatibility_status, flow_hash}
12. AI_CONSUMPTION
AI_CONSUMPTION:
format: UTF-8 plain text
entry_point: ZeroShotInference
required: [task, instruction, input, model_reference]
outputs: [prediction, validation, confidence_status, provenance]
safeguards: [explicit_uncertainty, no_fabricated_sources, domain_shift_warning, reproducibility_metadata]
interoperability: [RDF, OWL, JSON-LD, knowledge_graphs, semantic_search]
13. EXAMPLE
TASK: Classify a document into one of {Research Paper, Policy Document, Tutorial} without supplying labelled examples in the prompt.
INPUT: Document text
INSTRUCTION: Choose the best-supported category and cite indicative features.
OUTPUT: {label: CandidateLabel, supporting_features: List[String], confidence_status: String, provenance: ProvenanceRecord}
NOTE: This example describes the flow, not a validated model result.
END FLOW ALGEBRA
Download Code
Copy to Clipboard