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.
Generation on Platform calls an Inference Gateway provider, typically Nemotron Nano 30B, rather than the Nemotron Ultra 550B endpoint the upstream recipe uses, so quality differs from the published dump. 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.