﻿# Canary task prompts: model-version changes can alter the language-control contract

Distinguish original Canary task, source-language, target-language, and punctuation fields from newer prompt formats instead of reusing a generic transcription wrapper unchanged.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-canary-prompt-version-task-language-contract/
Language: en

## Distinguish the task from the audio file

The [original Canary model card](https://huggingface.co/nvidia/canary-1b) describes recognition and speech-to-text translation controlled by task and language information. An audio file alone does not state which operation is intended. Its documented plain path-list route assumes a default recognition behavior. A wrapper for multilingual use should preserve the requested task, source language, target language, and punctuation policy explicitly rather than inferring all of them from an uploaded filename.

## Follow the original prompt fields

The [official NeMo prompt formatter](https://raw.githubusercontent.com/NVIDIA/NeMo/main/nemo/collections/common/prompts/canary.py) represents source language, task, target language, and punctuation control as structured slots. These fields participate in building the decoder prompt; they are not merely response metadata. If a wrapper records the target language without forwarding it through the supported formatter, its displayed request can disagree with the model's effective task. Test prompt construction independently from successful audio loading.

## Keep newer prompt formats separate

The [current Transformers Canary reference](https://huggingface.co/docs/transformers/model_doc/canary) documents a newer artifact with a different prompt structure and task selection based on source and target languages. Do not copy that processor format into the original artifact by analogy. A family-level upgrade can change special tokens and preparation rules even when the user-facing operation retains the same name. Preserve processor and checkpoint compatibility, and document the actual route used instead of silently mixing examples across model generations.

## Diagnose an unexpected output language

Consider a recording submitted for translation but returned as a transcription. Before attributing the result to weak language understanding, compare the effective prompt, task slots, and processor revision with the selected artifact's example. Also verify whether the request accidentally used a convenience path that assumed default recognition. This diagnosis does not promise that a valid prompt guarantees a perfect translation; it separates an incorrectly requested task from errors made while performing the intended task.

## Evaluate output formatting independently

Punctuation and capitalization can change visible text and evaluation results without changing the desired semantic operation. Record their requested policy with task settings, model, processor, and decoding configuration. Guides to [artifact validation](/journal/safetensors-artifact-validation/) and [inference evaluation](/journal/inference-benchmark-method/) support the migration record. A valid upgrade demonstrates the same intended operation through its supported version-specific prompt contract, rather than showing only that a newly loaded speech model returns readable text for a familiar recording.
