CLIP Prompt Zero-Shot
Use this skill when a task must classify image embeddings by comparing them with text embeddings of rendered class prompts. It preserves the paper's zero-shot transfer mechanism without requiring target-task supervised training.
Inputs
- Image embeddings to classify.
- Class names and prompt templates.
- A deterministic prompt embedding mapping or model adapter.
Outputs
- Class scores, probabilities, and top predictions.
- Prompt ensemble diagnostics showing which prompt vectors contributed to each class vector.
Workflow
- Render prompts from class names and templates.
- Obtain or supply one embedding per rendered prompt.
- Normalize prompt embeddings and average them per class, then normalize the class vector.
- Compare normalized image embeddings to class text vectors and select the highest score.
Validation
Run python tests/test_prompt_zeroshot.py or validate with the Distiller skill validator.
Limitations
The skill does not download pretrained models. In reduced recovery, prompt embeddings may be deterministic fixtures if declared as proxy evidence.