Ontologies and model interfaces

From VectorSpaceLab/AREX-Skill · View interactive version

Ontologies and model interfaces is an AI agent skill from the GitHub repository VectorSpaceLab/AREX-Skill. Guides custom Autodistill ontologies, base/target model interfaces, composed detection, and embedding workflows.

How to use this skill

Skill file

Autodistill Ontologies and Model Interfaces

Use this sub-skill when a task asks how to design an ontology, implement a custom base or target model, check interface conformance, compose detection and classification models, or reason about embedding/text-classification surfaces.

Autodistill core classes define contracts; concrete model behavior normally lives in plugin packages. If the task is only to label a folder using an existing plugin, start with dataset labeling. If the task is to pick a CLI alias or inspect installed plugins, start with CLI and model registry.

Quick Route

Core Pattern

A base model maps user data plus an ontology to predictions or labeled datasets:

from autodistill.detection import CaptionOntology, DetectionBaseModel

class MyDetector(DetectionBaseModel):
    def __init__(self, ontology: CaptionOntology):
        self.ontology = ontology

    def predict(self, input):
        # return supervision.Detections
        ...

The inherited DetectionBaseModel.label() method will call predict() for every selected image and write the detection dataset. Use dataset labeling to validate the output layout.

Ontology Design Rules

Snapshot Caveats

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.