Generated banner for Tao Generate Video Reasoning Annotations
Generated logo for Tao Generate Video Reasoning Annotations

Tao Generate Video Reasoning Annotations

NVIDIAOfficialCreated by NVIDIA Corporation

  • Skill
  • Workflow
  • Data and AI
  • Apache-2.0
  • Medium risk
  • Has scripts

From the author

Multi-step video annotation pipeline that turns raw videos into Chain-of-Thought training data — multi-level captions, structured descriptions, and QA pairs (MCQ, binary, open-ended) with reasoning traces, via VLM/LLM distillation. Use when the user wants to "create video training data", "generate video QA datasets", "build CoT reasoning traces from videos", "auto-label videos", or run the video_reasoning_annotation pipeline. Triggers include "video annotation", "video CoT", "video QA", "chain-of-thought", "video captioning pipeline", "video distillation".
— the description by NVIDIA Corporation

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The tao-generate-video-reasoning-annotations skill provides a structured pipeline to transform raw video files into annotated datasets suitable for training video understanding models. It utilizes Vision-Language Models (VLMs) for captioning and Large Language Models (LLMs) for synthesizing descriptions and generating various QA pairs, including MCQ, binary, and open-ended questions with reasoning traces. The pipeline is designed to be domain-agnostic, supporting custom prompt modules for specialized use cases like traffic or warehouse monitoring, and includes features for anomaly detection and resume-capable processing.

What it does

  • Filters and classifies videos as normal or anomalous.
  • Generates global, dense, and chunked video captions using VLM distillation.
  • Synthesizes captions into structured narratives using LLMs.
  • Produces diverse QA pairs with step-by-step reasoning traces.
  • Parses outputs into standardized JSON files following the tao-vl-reason-v1.0 format.
  • Supports resume-on-failure to skip already-processed videos.

When to use it

  • When you need to create training data for video understanding models.
  • When you want to generate Chain-of-Thought reasoning traces from video content.
  • When you need to auto-label large collections of video files.
  • When you are working with specific domains like traffic or industrial warehouse monitoring.

Advantages

  • Modular pipeline allows for selecting specific processing steps.
  • Built-in support for domain adaptation through custom prompt modules.
  • Resume capability ensures efficiency during long-running annotation tasks.
  • Supports both Gemini and OpenAI-compatible VLM/LLM backends.
  • Provides structured output compatible with downstream training workflows.

Usage examples

“Run the video annotation pipeline on my traffic footage.”
The agent will guide you through selecting the traffic prompt module, configuring your VLM/LLM endpoints, and executing the pipeline on your video directory.
“How do I create a custom dataset for my warehouse security videos?”
The agent will initiate the domain adaptation workshop to help you define your annotation goals and customize the prompt templates for warehouse-specific events.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/nvidia/tao-generate-video-reasoning-annotations/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip tao-generate-video-reasoning-annotations.zip -d .agents/skills

Documentation by NVIDIA Corporation

Video Reasoning Annotation Pipeline

Standalone install? If this session was not initialized by the TAO skill bank plugin, run the tao-setup skill first (host preflight, credentials, cross-skill discovery).

Generate Chain-of-Thought training datasets from videos by producing multi-level captions, structured descriptions, and QA pairs (MCQ, binary, open-ended) with step-by-step reasoning traces. Domain-agnostic by default — customize prompts for any video domain.

Purpose

Transform raw videos into CoT Q&A training data for video understanding models. VLMs (e.g., Gemini, Qwen) act as "teacher" annotators: Steps 0–1 require the model to see the video (VLM calls); Steps 2–3 are text-to-text (cheaper LLM calls).

Pipeline architecture

Step 0:  [Optional] Filter & classify videos  → Keep domain-relevant, classify anomaly vs normal
Step 1a: Global + dense captions               → VLM: narrative summary + timestamped events
Step 1b: Chunk captions                         → VLM: fixed-duration segment micro-captions
Step 1c: [Optional, anomaly only] Highlight     → LLM extracts anomaly timestamp, VLM captions clip
Step 2:  Description synthesis                  → LLM: synthesize captions into structured narrative
Step 3:  QA generation                          → LLM: MCQ, binary, open-ended with reasoning
Step 4:  Parse outputs                          → Per-task `tao-vl-reason-v1.0` JSON files

Steps are individually selectable via workflow.steps. The pipeline has built-in resume — each step skips already-processed videos, so re-running after a prompt tweak is safe.

Initial consultation

When the user invokes this skill, walk through these questions in order. Don't skip — getting domain and VLM access right up front prevents wasted runs.

1. Videos
  • Path to the video directory and/or a JSONL with {"video_path": "..."} per line.

  • Confirm format (.mp4 preferred; .avi, .mov, .mkv also walked).

2. Domain — drives prompt selection

Ask the user: "What domain are these videos from?" Choose one of the following branches:

DomainWhat to do
generalUse the default prompts. Set prompts_module: "" (or omit). The built-in nvidia_tao_ds.auto_label.video_reasoning_annotation.prompts covers domain-agnostic content.
traffic (CCTV intersections, highways; dashcam excluded)Use the reference module. Set prompts_module: "nvidia_tao_ds.auto_label.video_reasoning_annotation.prompts_traffic", or copy references/prompts_traffic.py into the user's project and tune for their specific camera angles, then point prompts_module at the copy.
warehouse (industrial site CCTV — safety, operations, security)Same pattern. Set prompts_module: "nvidia_tao_ds.auto_label.video_reasoning_annotation.prompts_warehouse", or copy references/prompts_warehouse.py and tune.
custom (any other domain)Run the workshop in references/domain_adaptation.md. It walks through: Phase 1 — question types the user wants the model to answer; Phase 2 — caption-requirements checklist; Phase 3 — fill the [PLACEHOLDER] markers in nvidia_tao_ds.auto_label.video_reasoning_annotation.prompt_template. The two reference modules above are working examples to model after. Do this before any pipeline runs.
3. Anomaly / normal / mixed
  • Mixed dataset → workflow.mode: "auto" (Step 0 classifies each video).

  • Pre-split anomaly only → workflow.mode: "anomaly", drop Step 0.

  • Pre-split normal only → workflow.mode: "normal", drop Steps 0 and 1c.

4. VLM / LLM endpoint — confirm access before running
  • Gemini (default for both vlm.backend and llm.backend): user needs GOOGLE_API_KEY set, or to put the key in the YAML.

  • OpenAI-compatible (Qwen via vLLM, NIM endpoint, etc.): user provides base_url, model_name, and api_key.

  • Steps 2–3 are text-only — a smaller/cheaper LLM is fine for llm.backend even when vlm.backend is a frontier video model.

If the user has no endpoint at all and wants to self-host, point them at the skills/applications/tao-run-inference-service skill — a workflow that stands up a network-specific TAO inference microservice locally and exposes an OpenAI-compatible endpoint. Should support Cosmos, Qwen, and Gemma. Check skills/applications/tao-run-inference-service/references/service.yaml for the current valid_network_arch_config_basenames list before relying on a specific model.

If the user doesn't have endpoint access ready and isn't ready to set one up, stop here and help them figure it out first.

5. Pilot vs full run
  • Recommend a 5–10 video pilot when domain is custom, when any prompt was edited, or when this is the user's first run.

  • Full-run is fine for general / traffic / warehouse once the user has previously verified output quality on the same data type.

  • The pipeline has built-in resume, so a pilot followed by a full run does not re-process the pilot videos.

Quick start

The pipeline runs inside the TAO Toolkit container via the auto_label CLI:

auto_label generate -e /path/to/spec.yaml \
    results_dir=/results \
    video_reasoning_annotation.data.video_root=/videos \
    video_reasoning_annotation.vlm.gemini.api_key=$GOOGLE_API_KEY \
    video_reasoning_annotation.workflow.mode=auto

Generate a default spec to start from:

auto_label default_specs results_dir=/results module_name=auto_label
# then set:  autolabel_type: "video_reasoning_annotation"

All fields support Hydra dot-notation overrides on the command line. For the full YAML reference (every field, model/endpoint setup, error patterns), see references/configuration.md.

Pilot workflow

Use this when running a 5–10 video pilot:

  1. Run the pipeline on the pilot subset with the chosen prompts_module and workflow.mode.

  2. Inspect results_dir/step_1a_caption/captions.jsonl — captions accurate, capturing the right level of detail?

  3. Inspect results_dir/step_3_qa/qa_output.jsonl — questions meaningful, answers correct, reasoning logical?

  4. If quality is insufficient: adjust the prompts (in prompts_module if domain-customized, or fall back to general if a domain module is over-tuned), and re-run. The pipeline auto-skips already-processed videos.

  5. Once satisfied, scale to the full dataset by pointing data.video_root (or data.input_jsonl_files) at the full set and re-running with the same results_dir (resume) or a fresh one (full re-run).

Quality compounds downstream — bad captions produce bad descriptions which produce bad QA. Focus iteration on Step 1a/1b output first; descriptions and QA usually improve once captions are right.

Configuration summary

Key fields (full reference in references/configuration.md):

FieldDefaultDescription
workflow.steps["0","1a","1b","1c","2","3","4"]Which pipeline steps to execute
workflow.mode"auto""auto", "anomaly", or "normal"
vlm.backend"gemini""gemini" or "openai" (OpenAI-compatible)
llm.backend"gemini"Same options; text-only, cheaper model works
workflow.max_workers4Parallel threads per step (watch API rate limits)
license""Optional: written to metadata.license in step 4 outputs (e.g. "CC-BY-4.0")
description_extra""Optional: extra text appended to per-task descriptions in step 4 metadata
prompts_module""Dotted import path to custom prompts module

Prompts

  • Built-in (general): nvidia_tao_ds.auto_label.video_reasoning_annotation.prompts — domain-agnostic, used by default.

  • Template: nvidia_tao_ds.auto_label.video_reasoning_annotation.prompt_template — same 26 keys with [PLACEHOLDER] markers for domain customization.

  • Reference modules (working examples for the consultation's traffic / warehouse branches): references/prompts_traffic.py, references/prompts_warehouse.py.

  • Custom domains: see references/domain_adaptation.md for the full workshop and placeholder reference.

Inputs

  • video_root: Directory of videos (walked recursively for .mp4, .avi, .mov, .mkv).

  • input_jsonl_files: List of JSONL files with {"video_path": "..."} per line. The video key is also accepted; extra fields are allowed.

  • filter_field: Optional boolean field to filter JSONL entries.

Provide video_root, input_jsonl_files, or both (lists merge).

Outputs

All outputs go to results_dir/ with per-step subdirectories (step_0_filter/, step_1a_caption/, …, step_4_output/):

  • Steps 0–3: JSONL — one JSON object per video per line.

  • Step 4: One <task>.json per non-empty task type, in the tao-vl-reason-v1.0 envelope. Up to 10 files: mcq.json, mcq_openended.json, bcq.json, bcq_openended.json, open_qa.json, causal_linkage.json, temporal_localization.json, temporal_description.json, scene_description.json, video_summarization.json.

Each step 4 file looks like:

{
  "format": "tao-vl-reason-v1.0",
  "metadata": {"type": "annotation", "task": "<task>", "date": "YYYY-MM-DD",
               "description": "<per-task + description_extra>", "license": "<from config>"},
  "media_root": "<data.video_root>" | null,
  "items": [{"video_id": "...", "question": "...", "answer": "...", "reasoning": "..."}, ...]
}

media_root mirrors data.video_root (or null when unset); each item's video_id is the entry's video path with the video_root prefix stripped. Set license and description_extra in the spec to populate the metadata.

Prerequisites

  • Container: nvcr.io/nvidia/tao/tao-toolkit:7.3.0-pyt. <!-- versions-key: images.tao_toolkit.pyt -->

  • ffmpeg / ffprobe: required for chunk captioning (Step 1b) and highlight extraction (Step 1c).

  • VLM endpoint: at least one — Gemini API key or OpenAI-compatible endpoint.

Files

references/configuration.md

Video Reasoning Annotation — Full Configuration Reference

Use this reference only when the parent SKILL.md points here for the current task. If this file conflicts with current SKILL.md, skill_info.yaml, schemas, or platform/model skills, the current authoritative source wins.

Contents

  • Complete YAML Structure

  • Key Configuration Decisions

  • Model / Endpoint Configuration

    • Gemini (default)

    • OpenAI-compatible endpoints

  • All Parameters

  • Error Patterns

Complete YAML Structure

Generate a default experiment spec with auto_label default_specs results_dir=/results module_name=auto_label, then set autolabel_type: "video_reasoning_annotation".

results_dir: ???                        # Required — output directory
autolabel_type: "video_reasoning_annotation"

video_reasoning_annotation:
  # --- VLM (vision-language model, for steps 0/1a/1b/1c) ---
  vlm:
    backend: "gemini"                   # "gemini" or "openai"
    gemini:
      api_key: ""                       # Or set GOOGLE_API_KEY env var
      model: "gemini-3.1-flash-lite-preview"
      media_resolution: "MEDIA_RESOLUTION_LOW"  # LOW / MEDIUM / HIGH
      temperature: 0.3
      max_output_tokens: 8192
      timeout: 120
    openai:                             # For OpenAI-compatible endpoints (e.g., Qwen via vLLM)
      base_url: ""
      model_name: ""
      api_key: ""
      temperature: 0.7
      max_tokens: 4096

  # --- LLM (text-only, for steps 1c/2/3) ---
  llm:
    backend: "gemini"
    gemini:
      api_key: ""                       # Or set GOOGLE_API_KEY env var
      model: "gemini-3.1-flash-lite-preview"
      temperature: 0.3
      max_output_tokens: 8192
      timeout: 120

  # --- Workflow ---
  workflow:
    steps: ["0", "1a", "1b", "1c", "2", "3", "4"]
    mode: "auto"                        # "auto" | "anomaly" | "normal"
    max_workers: 4                      # Parallel threads per step
    max_video_length_sec: 300           # Skip videos longer than this
    chunk_duration_options: [5, 10, 15, 20, 30]
    max_chunks: 10
    highlight_before_sec: 3.0           # Clip window for Step 1c
    highlight_after_sec: 3.0
    long_video_threshold_sec: 60
    long_video_sample_fps: 0.5
    long_video_max_frames: 60
    qa_types: ["mcq", "bcq", "open_qa", "causal_linkage", "temporal_localization", "temporal_event_desc", "scene_description", "event_summary"]

  # --- Input data ---
  data:
    video_root: ""                      # Directory (walked recursively for .mp4/.avi/.mov/.mkv)
    input_jsonl_files: []               # JSONL files with {"video_path": "..."} per line
    filter_field: null                  # Boolean field to filter JSONL entries

  license: ""                           # Optional: written to metadata.license in step 4 outputs (e.g. "CC-BY-4.0")
  description_extra: ""                 # Optional: extra text appended to per-task descriptions in step 4 metadata
  prompts_module: ""                    # Dotted import path to custom prompts module

Key Configuration Decisions

DecisionConfig fieldGuidance
Which steps to runworkflow.stepsStart with all (["0","1a","1b","1c","2","3","4"]). Drop "0" for curated datasets, "1c" for normal-only videos
Anomaly vs normalworkflow.mode"auto" lets Step 0 classify each video. Use "anomaly" or "normal" when the dataset is pre-split
VLM providervlm.backend"gemini" for Google Gemini models, "openai" for any OpenAI-compatible endpoint (vLLM, NIM, etc.)
LLM providerllm.backendSame as VLM. Steps 2-3 are text-only — a lighter/cheaper model is often sufficient
Parallelismworkflow.max_workersHigher = faster but watch API rate limits. Start with 4, increase if no throttling
Video length limitworkflow.max_video_length_secVideos exceeding this are skipped. Default 300s (5 min)
Custom promptsprompts_moduleLeave empty for general-purpose defaults. Set to a module path for domain-specific prompts
Output metadatalicense, description_extraStep 4 emits one <task>.json per task type in the tao-vl-reason-v1.0 envelope. license populates metadata.license; description_extra is appended to the per-task description string. media_root mirrors data.video_root automatically

Model / Endpoint Configuration

Gemini (default)

Set the API key via environment variable or config:

export GOOGLE_API_KEY=your_key_here

Or in the YAML: video_reasoning_annotation.vlm.gemini.api_key: "your_key".

Recommended model assignments:

  • VLM (Steps 0/1): gemini-3.1-flash or gemini-3.1-pro — needs video understanding

  • LLM (Steps 2/3): gemini-3.1-flash (Gemini backend) or gemma-4-31b served via a local deployment — text-only, cheaper/self-hosted model works. For self-hosting, see the skills/applications/tao-run-inference-service skill (should support Cosmos, Qwen, and Gemma) or any vLLM/NIM endpoint you bring yourself.

Temperature guidance:

  • Captioning (Steps 0/1): 0.2-0.3 for factual accuracy

  • QA generation (Step 3): 0.3-0.5 for some diversity in question phrasing

OpenAI-compatible endpoints

For self-hosted models, the pipeline accepts any endpoint that speaks the OpenAI chat-completions API. Two common ways to provision one:

  1. skills/applications/tao-run-inference-service skill — workflow for standing up a TAO inference microservice locally. Should support Cosmos, Qwen, and Gemma. Check that skill's references/service.yaml valid_network_arch_config_basenames for the current model list.

  2. Bring-your-own deployment — vLLM, NIM, or any other OpenAI-compatible server.

Either way, the YAML wiring is the same:

video_reasoning_annotation:
  vlm:
    backend: "openai"
    openai:
      base_url: "http://your-endpoint:8000/v1"
      model_name: "Qwen/Qwen3-VL-235B-A22B-Instruct"
      api_key: "your_key"
      temperature: 0.3
      max_tokens: 4096

All Parameters

ParameterDefaultDescription
workflow.steps["0","1a","1b","1c","2","3","4"]Which pipeline steps to execute
workflow.mode"auto"Video classification mode: auto, anomaly, or normal
workflow.max_workers4Thread pool size for parallel API calls
workflow.max_video_length_sec300Skip videos longer than this (seconds)
workflow.chunk_duration_options[5,10,15,20,30]Candidate chunk durations (auto-selected per video)
workflow.max_chunks10Maximum chunks per video
workflow.highlight_before_sec3.0Seconds before anomaly moment for highlight clip
workflow.highlight_after_sec3.0Seconds after anomaly moment for highlight clip
workflow.qa_types["mcq","bcq","open_qa","causal_linkage","temporal_localization","temporal_event_desc","scene_description","event_summary"]QA formats to generate. Each maps to a prompt key in prompts.py (anomaly + normal variants for most types; scene_description and event_summary are mode-agnostic)
vlm.gemini.media_resolutionMEDIA_RESOLUTION_LOWVideo resolution sent to Gemini (LOW/MEDIUM/HIGH)
vlm.gemini.temperature0.3VLM sampling temperature
llm.gemini.temperature0.3LLM sampling temperature
license""Written to metadata.license in step 4 outputs (e.g. "CC-BY-4.0")
description_extra""Extra text appended to per-task descriptions in step 4 metadata
prompts_module""Custom prompts module (dotted import path)

Error Patterns

ErrorCauseFix
GOOGLE_API_KEY not setGemini API key missingexport GOOGLE_API_KEY=your_key or set in config YAML
429 / rate limit errorsToo many parallel API callsReduce workflow.max_workers
Video skipped (too long)Video exceeds max_video_length_secIncrease the limit or trim videos
Empty captionsVLM failed to process videoCheck video format, try higher media_resolution, increase timeout
Step 1c skipped for all videosAll videos classified as "normal"Expected when mode=normal. For mixed datasets, use mode=auto
Import error for prompts_moduleCustom module path incorrectVerify the dotted path resolves; module must be on PYTHONPATH
ffprobe not foundMissing ffmpeg/ffprobeInstall: apt install ffmpeg (required for chunk captioning)
Step N reads empty inputPrevious step produced no outputCheck previous step's output JSONL; likely all videos were filtered out or failed

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Declares allowed tools, Needs an API key, Needs Python

The author says: Requires docker + nvidia-container-toolkit + at least one VLM endpoint (Gemini API key or OpenAI-compatible).

Security

What our scanner noticed· Medium risk

  • Large base64-encoded blobs
  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
NVIDIA Corporation
Publisher
NVIDIA (Official)
Source
NVIDIA/skills · skills/tao-generate-video-reasoning-annotations · commit fce3cca
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE-APACHE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by NVIDIA Corporation or NVIDIA.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download tao-generate-video-reasoning-annotations.zip