К основному содержанию
скилл CX Codex

nemotron-retrieval-recipes — скилл для Claude Code: запуск

Помогает планировать, отлаживать, обучать и развёртывать рецепты эмбеддингов и реранкинга NVIDIA Nemotron. Пригодится при настройке первого и второго этапов поиска в RAG-системах.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add NVIDIA/skills --skill nemotron-retrieval-recipes -a claude-code
Открыть на GitHub

Что делает nemotron-retrieval-recipes

Скилл помогает работать с публичными рецептами эмбеддингов и реранкинга NVIDIA Nemotron. Он маршрутизирует проблемы с выдачей в зависимости от симптомов: если релевантные документы не попадают в выборку и страдает метрика Recall@k, выбирается дообучение эмбеддингов (nemotron embed), а если документы найдены, но стоят на низких позициях при плохом nDCG, агент переключается на реранкер (nemotron rerank). Для эмбеддингов поддерживаются профили default для модели Nemotron-3-Embed-1B-BF16 и llama для llama-nemotron-embed-1b-v2.

Вместо прямого запуска тяжёлых задач агент сначала выполняет сухой прогон через флаг -d (например, uv run nemotron <family> <stage> -c <profile> -d), проверяет конфигурации в каталоге src/nemotron/recipes/ и предлагает точечные переопределения параметров. Задачи не выполняются на GPU или внешних API без явного подтверждения пользователя, а переменные окружения с секретами остаются защищёнными.

Запускать рецепты без предварительной синхронизации окружения через uv sync --all-extras бессмысленно: CLI и зависимости этапов просто не найдутся. Для синтетической генерации данных (SDG) на Stage 0 нужен NVIDIA_API_KEY, этапам обучения необходимы драйверы CUDA с достаточным объёмом видеопамяти, а развёртывание на Stage 5 опирается на Docker с бэкендами vLLM или NIM.

Какие задачи решает

  • Выбрать между дообучением модели эмбеддингов и реранкера по метрикам поиска
  • Проверить параметры и запустить сухой прогон этапов через nemotron run -d
  • Подготовить экспорт модели в NeMo Export-Deploy или развёртывание через vLLM и Docker
  • Сгенерировать синтетические данные на Stage 0 без риска утечки API-ключей

Примеры запросов агенту

  • Вызови $nemotron-retrieval-recipes и помоги настроить дообучение реранкера из-за низкого nDCG
  • Покажи команду для сухого прогона Stage 1 для профиля default в nemotron embed
  • Проверь требования к экспорту и развёртыванию модели nvidia/Nemotron-3-Embed-1B-BF16

Как установить nemotron-retrieval-recipes

1Через Skills CLI (Vercel)

npx skills add NVIDIA/skills --skill nemotron-retrieval-recipes -a claude-code

2Вручную: положить файлы

~/.claude/skills/nemotron-retrieval-recipes/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/nemotron-retrieval-recipes/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Из того же набора178

dali-dynamic-mode Скилл ведёт агента по императивному режиму NVIDIA DALI: пишет вызовы ndd вместо графов пайплайнов и помогает переносить существующие пайплайны. CX Codex +1 2 100установок nemotron-customize Планирует пайплайны кастомизации Nemotron: от курации и SFT до RL-выравнивания и бенчмарков. Генерирует конфиги для шагов репозитория Nemotron. CX Codex +1 2 100установок physical-ai-neural-reconstruction Тонкий роутер по задачам NVIDIA NuRec: подсказывает, какой скилл взять для конвертации записи, обучения реконструкции или рендера USDZ. CX Codex +1 2 100установок nemo-automodel-distributed-training Подсказывает, какую стратегию распределённого обучения выбрать в NeMo AutoModel и какие поля YAML выставить. Пригодится, когда модель не влезает в одну GPU. CX Codex +1 2 000установок nemo-rl-session-memory Ведёт durable-заметки о рабочей сессии в каталоге session/, чтобы другой агент поднял контекст после обрыва связи или перезапуска VS Code. CX Codex +1 2 000установок nemotron-speech Скилл ведёт агента по задачам NVIDIA Nemotron Speech (бывшая Riva): разворачивает и тестирует ASR, TTS и NMT NIM в облаке или на своём железе. CX Codex +1 2 000установок physical-ai-defect-image-generation Оркеструет пайплайны генерации дефектов для оптического контроля на базе Cosmos AnomalyGen и OSMO. Помогает собирать обучающие датасеты для анализа печатных плат, стекла и металла. CX Codex +1 2 000установок physical-ai-video-data-augmentation Ведёт цикл аугментации видео и авторазметки на OSMO: выбор флоу, проверки перед отправкой, мониторинг и забор результатов. CX Codex +1 2 000установок

Похожие

rag-retrieval OrchestKit Скилл с готовыми паттернами retrieval-augmented generation: гибридный поиск, HyDE, реранкинг, pgvector. Пригодится, когда строишь RAG-пайплайн и нужны рабочие схемы, а не теория. CX Codex +1 1 500установок qdrant-search-quality официальный github Помогает выяснить, почему поиск в Qdrant выдаёт нерелевантные результаты, и выбрать способ улучшить выдачу. Пригодится после смены модели или роста данных. 61установок lora-qlora-recipes Seth Hobson Скилл настраивает LoRA и QLoRA для supervised fine-tuning: выбирает модули, rank, alpha и learning rate. Пригодится для проверки конфигурации обучения. CX Codex 2 600установок iterative-retrieval affaan-m Скилл задаёт четырёхфазный цикл поиска контекста, чтобы субагент получал нужные файлы, а не весь репозиторий. Пригодится, когда агент жалуется на нехватку контекста. CX Codex +1 4 500установок rag giuseppe-trisciuoglio Скилл помогает развернуть пайплайн Retrieval-Augmented Generation: от нарезки документов и расчёта эмбеддингов до поиска в векторной базе и передачи контекста модели. CX Codex +1 3 700установок rag-engineer sickn33 Скилл для проектирования систем поиска и генерации с векторными базами данных. Помогает настроить чанкинг, выбрать embedding-модели и оптимизировать качество поиска перед тем, как результаты попадут в LLM. CX Codex +1 1 000установок

Рядом в теме «ИИ и ML»

Всё по теме «ИИ и ML» →

Вопросы о nemotron-retrieval-recipes

Как установить nemotron-retrieval-recipes в Claude Code?

Выполните команду npx skills add NVIDIA/skills --skill nemotron-retrieval-recipes -a claude-code в терминале.

Что делает скилл nemotron-retrieval-recipes?

Он помогает управлять рецептами поиска Nemotron: определяет нужную модель, формирует команды запуска CLI, проверяет конфиги этапов и готовит экспорт.

Какие требования нужны для работы рецептов Nemotron?

Понадобится синхронизировать зависимости через uv sync --all-extras, передать NVIDIA_API_KEY для Stage 0, подготовить GPU с драйверами CUDA для обучения и Docker для развёртывания на Stage 5.

Исходный текст

SKILL.md · Apache-2.0
---
name: nemotron-retrieval-recipes
version: "0.2.0"
author: "NVIDIA Nemotron Team <[email protected]>"
license: Apache-2.0
tags:
  - nemotron
  - retrieval
  - fine-tuning
  - embeddings
  - reranking
metadata:
  author: "NVIDIA Nemotron Team <[email protected]>"
  tags:
    - nemotron
    - retrieval
    - fine-tuning
    - embeddings
    - reranking
tools:
  - Read
  - Bash
  - Search
description: Use when planning, debugging, tuning, evaluating, exporting, or deploying public Nemotron `embed`/`rerank` retrieval recipes.
---

# Nemotron Retrieval Recipes

Invocation: `$nemotron-retrieval-recipes`.

## Purpose

Use this skill to work with public Nemotron embedding and reranking retrieval recipes in a source checkout or installed package. Prefer the current checkout over memory, because the recipe CLI, configs, containers, and output paths are actively changing. Treat each recipe family as available only after its recipe directory and matching CLI files are present.

This is a public product skill, not contributor-only guidance. Its value over static docs is to make an agent route the user's retrieval failure to the right recipe family, reconcile docs with the current checkout, avoid accidental long-running launches, preserve secrets, and return concrete preview/execution/run-report commands.

Use it only for tasks tied to the public Nemotron `embed` or `rerank` recipe flow. If the request is unrelated retrieval theory, generic vector database selection, generic benchmark advice, or non-recipe Docker/Slurm/NIM troubleshooting, stop with a short scope note and do not inspect recipe files in that turn.

## Security Notes

Use `Bash` for repo-scoped inspection, help, dry-run, and user-approved execution commands. Do not run API, GPU, Docker, Slurm, NIM, or other long-running work unless the user explicitly asks for it. Before Stage 0 SDG for either family, confirm the user's data-governance policy permits sending corpus content to the configured inference endpoints; otherwise use an approved private or air-gapped path. Never run broad environment dumps or commands that expose secret values. Prefer dotlist overrides and config review over editing recipe defaults.

## Source Priority

Resolve conflicts in this order:

1. Current checkout recipe, CLI, config, and source files.
2. Bundled references in this skill.
3. User-provided docs or saved snippets.
4. Memory.

For runnable commands, treat the current checkout as authoritative. If a required recipe directory, CLI command, config, or env profile is missing, report the blocker instead of guessing.

## Prerequisites

- Repo environment: `uv sync --all-extras` or the smallest relevant extra documented by the checkout.
- Stage 0 SDG: `NVIDIA_API_KEY`; never ask users to paste secret values.
- Stages 1–3 GPU work: CUDA/NVIDIA driver availability and enough VRAM.
- Stage 4 export: NeMo Export-Deploy container when using TensorRT. The default Nemotron 3 Embed profile intentionally skips export.
- Stage 5 deploy: Docker. Default Nemotron 3 Embed can use the checked-in vLLM path with `backend=vllm`, or a compatible `NEMOTRON3_EMBED_NIM_IMAGE` with `backend=nim`; Llama Embed and rerank deployment may require NGC access and `NGC_API_KEY`.
- Remote execution: root `env.toml` profile for `--run` or `--batch`; load `references/remote.md` when remote scheduling, logs, or GPU placement matter.

## Instructions

1. Identify the recipe family.
   - Use `references/embed.md` for embedding, embed, bi-encoder, vector search, first-stage retrieval, low Recall@k, missing relevant documents, NIM embeddings, or `nemotron embed`.
   - Use `references/rerank.md` for rerank, reranker, cross-encoder, second-stage retrieval, acceptable recall but poor top-rank ordering, low nDCG with good Recall, or `nemotron rerank`.
   - Use both references only when the user asks about both families or asks which family to choose.
2. For `embed`, choose one model profile before composing stage commands.
   - Run `uv run nemotron embed info` when the requested model is unclear.
   - Use `-c default` for `nvidia/Nemotron-3-Embed-1B-BF16`.
   - Use `-c llama` for `nvidia/llama-nemotron-embed-1b-v2` and its export path.
   - Carry the selected profile and `artifact_root` through every stage; never combine artifacts from the two profiles.
3. Choose the model family to tune from the retrieval failure mode.
   - Prefer embedding fine-tuning when relevant documents are absent from the candidate set.
   - Prefer reranker fine-tuning when relevant documents are retrieved but ordered poorly near the top.
   - For production retrieval stacks, remember that these are complementary: embed first, rerank candidates second.
4. Identify the intent: plan a run, execute a stage, debug a failure, tune hyperparameters, interpret metrics, export/deploy a model, inspect configs, or propose dotlist overrides.
5. Inspect the current public surface before acting:
   - Recipe files: `src/nemotron/recipes/<embed|rerank>/`
   - CLI files: `src/nemotron/cli/commands/<embed|rerank>/`
   - Configs: `src/nemotron/recipes/<family>/stage*/config/<profile>.yaml`
   - Help and dry runs: `uv run nemotron <family> --help`, `uv run nemotron <family> <stage> -c <profile> -d`

## Safe Workflow

1. Gather only context relevant to the task: recipe family, selected profile, corpus path, existing SDG/training/eval data, target stage range, artifact root, checkpoint path, execution mode, GPU IDs, and whether required secrets are configured. Never ask users to paste secret values.
2. Start with cheap checks before expensive work:
   - `uv run nemotron <family> --help`
   - `uv run nemotron <family> <stage> --help`
   - `uv run nemotron <family> <stage> -c <profile> -d`
   - `uv run nemotron <family> run -c <profile> -d --from <stage> --to <stage>`
   - `run --help` may omit inherited `-c` and `-d` options even though `run -c default -d ...` works; validate by running the dry-run when unsure.
   - In an already prepared checkout, `uv run --no-sync ... --help` or `uv run --no-sync ... -d` can avoid unexpected dependency sync during read-only checks.
3. Check prerequisites for the requested stage:
   - Repo environment: `uv sync --all-extras` or the smallest relevant extra if documented by the repo.
   - Stage 0 SDG: `NVIDIA_API_KEY`.
   - Stages 1–3 GPU work: CUDA/NVIDIA driver availability and enough VRAM.
   - Stage 4 export: the NeMo Export-Deploy container when using TensorRT. Default Nemotron 3 Embed skips this stage.
   - Stage 5 deploy: Docker plus the selected backend's image and artifact contract; default Nemotron 3 may use the checked-in vLLM image without NIM credentials. Load the family reference before requiring NGC credentials.
   - Remote execution: root `env.toml` profile for `--run` or `--batch`; load `references/remote.md` when remote scheduling, logs, or GPU placement matter.
4. Use dotlist overrides instead of editing defaults unless the user asks for reusable config changes. Keep the selected profile, artifact root, sequence length, prefixes, pooling/normalization, prompt templates, and hard-negative counts consistent across stages.
5. Avoid launching API, GPU, Docker, Slurm, NIM, or long-running jobs unless the user explicitly asked to run them. Offer or run dry-runs, config review, and small pilots first.
6. For local execution, scope requested GPU IDs with `CUDA_VISIBLE_DEVICES=<ids>`. For `--run` or `--batch`, configure scheduler resources such as `gpus_per_node` in the selected `env.toml` profile and let the scheduler assign devices; do not assume submit-shell `CUDA_VISIBLE_DEVICES` propagates remotely.
7. For multi-stage local runs, prefer `uv run nemotron <family> run -c <profile> --from <stage> --to <stage>`. Use `default` for rerank. The default `run` target stops at `eval`; `export` and `deploy` are opt-in.
8. When evaluating quality, compare against the base model on a fixed held-out evaluation set before recommending deployment. Do not substitute a standalone public-benchmark eval for the recipe's own Stage 3 evaluation.
9. For long-running SDG, prep, finetune, or eval work, start the process in a session-safe way and poll at human-scale intervals: roughly 60 seconds for small pilots and 120-300 seconds for larger runs.
10. For failures, localize the failing stage, then inspect the stage config, expected inputs, output directory, and corresponding CLI wrapper or `run_uv.py`.

## References

- `references/embed.md`: embedding recipe stages, commands, defaults, output paths, and operating patterns.
- `references/rerank.md`: rerank recipe stages, commands, defaults, output paths, and operating patterns.
- `references/evaluation.md`: metric interpretation, comparison hygiene, and deployment readiness checks.
- `references/remote.md`: remote execution profiles, batch/run mode, GPU scoping, logs, and polling.

## Examples

User asks: "Recall is decent, but nDCG is poor and the right passage is around rank 40. Should I tune embed or rerank?"

Load `references/rerank.md` and `references/evaluation.md`, explain that acceptable recall with poor top-rank ordering points to reranker tuning, then offer a cheap preview before training.

```bash
uv run nemotron rerank run -c default -d --from prep --to eval
```

## Troubleshooting

Localize the failing stage, then inspect the stage config, expected inputs, output directory, and corresponding CLI wrapper or `run_uv.py`.

## Limitations

- Bundled references are condensed snapshots; verify commands, flags, defaults, and output paths against the active checkout before execution.
- This skill does not provide datasets, checkpoints, credentials, GPU capacity, Docker images, or NIM services.

## Output Style

For planning or debugging recommendations, use this shape when it helps: `Decision`, `Why`, `Required inputs`, `Preview command`, `Execution command`, `Avoid`, and `Next step`. Omit fields that are irrelevant to a short answer.

Give concrete commands and file paths. State assumptions, expected inputs, expected outputs, and the cheapest validation step that proves the next action is ready. For long-running stages, separate preview commands from execution commands so the user can choose deliberately.

When reporting a dry-run or real run, include a compact run report: command, mode, config, dotlist overrides, input paths, output paths, validation signal or metric file, and next cheapest check. Include the checkout commit when it is available.

© NVIDIA Nemotron Team · Apache-2.0 · NVIDIA/skills

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой