Generate Retrieval Training Data
Run Nemotron Stage 0 on NeMo Platform: turn a document corpus into judged question-and-answer pairs with nemo data-designer retrieval-generate. Use this when the training data has to come from your own documents.
The faster path skips generation entirely and starts from NVIDIA’s published NVDocs dump in Embedding Model Customization.
The Nemotron embed recipe generates and judges Q&A with nvidia/nemotron-3-ultra-550b-a55b. That model is a first-order driver of query quality and of the nDCG you get after fine-tuning. Platform has no default: Stage 0 calls whichever chat model Inference Gateway serves. Outside of examples, always use a larger model — for example nvidia/nemotron-3-ultra-550b-a55b when the provider serves it. The cells below default to nvidia/nemotron-3-nano-30b-a3b only so the notebook can run on a typical already-deployed IGW model. Expect shallower queries and lower quality scores than NVDocs, which was generated with that 550B pipeline. Point RETRIEVAL_CHAT_MODEL at nvidia/nemotron-3-ultra-550b-a55b for a real run. See the Retrieval SDG reference for corpus requirements, runtime estimates, and controls for chunk size, pair count, artifact coverage, multi-document bundling, concurrency, and the Stage 1 quality threshold. This notebook stops after Stage 0; mining and fine-tuning continue in the embedding tutorial.
Prerequisites
- A running NeMo Platform at
NMP_BASE_URL, defaulthttp://localhost:8080 - A corpus fileset of UTF-8
.txtor.mdfiles, or anhf://URI - An Inference Gateway chat provider, plus the chat and embedding model names it serves
- At least 50 documents, and 500 or more for good domain coverage. Below that, Stage 1 can put nearly every query in the test split
Aim for documents of 200–2,000 tokens that are representative of the domain. Generation costs roughly four model calls per document, covering artifact extraction, Q&A generation, deduplication, and quality judging.
1. Point Stage 0 at a corpus
Upload local documents, or skip the upload and set corpus to an hf:// URI.
NVIDIA’s sample corpus exercises the plumbing without standing in for your domain:
hf://nvidia/Retrieval-Synthetic-NVDocs-v1@1c0d1856f3fb595b2dda98d4b61061fa6d782d51/sample_corpus/nv_pp_random
2. Preview, then generate
retrieval-preview runs a single record through the pipeline so you can read the generated pairs before paying for a full pass; it writes no fileset. The full job writes Q&A JSONL plus generation_result.json, which Stage 1 reads as sdg_input.
Equivalent CLI:
The artifact_url of the artifacts result is the sdg_input for Stage 1.
Next: mine, then fine-tune
Continue in Embedding Model Customization, keeping the fileset-backed Nemotron 3 Embed entity and passing the sdg_input printed above to Stage 1:
Check that training.jsonl has non-empty neg_doc lists before starting Automodel, and freeze the eval_beir/ split so later runs stay comparable.
Reference: Retrieval SDG.