NeMo Retriever API Reference
Error and failure contract
The Python API does not define a separate set of numeric NeMo Retriever extraction error codes. Depending on the run mode and failing stage, callers observe one or more of the following:
- Python configuration or dependency exceptions, such as
ValueError,ImportError, orRuntimeError. GraphIngestionErrorfor row-level failures from explicitly configured remote NIM stages inrun_mode="inprocess"or"batch"whenerror_policy="raise"(the default).- HTTP status codes or gRPC errors returned by a remote NIM or by the Retriever service. These are transport or upstream-service statuses, not NeMo Retriever-specific error codes.
- Per-document failures in
ServiceIngestResult.failureswhenrun_mode="service".
The generated API signatures and parameter models below are the API contract. Exception text and upstream response bodies can change between releases; do not parse them as stable codes. The stable text-generation codes documented in One-shot text generation apply to generation operator output columns, not to document extraction.
Choose raise or collect behavior
For graph run modes, error_policy="raise" raises GraphIngestionError when
an explicitly configured remote NIM stage reports a row-level error. The
exception retains the underlying records in exc.records. When available, its
message identifies the stage, invoke URL, and HTTP status in a form similar to
[stage=OCR NIM url=https://... http=503], followed by a troubleshooting hint.
Use error_policy="collect" when partial results are useful and your
application inspects the error fields in every returned row. Alternatively,
pass return_failures=True to .ingest() to receive a (result, failures)
tuple. When no remote invoke URL is configured, return_failures=True scans
all output columns for row-level error fields so local failures are still
visible. In service mode, failures are also available from
ServiceIngestResult.failures.
What the raise error policy covers
The strict policy applies only to stages where you explicitly configure a remote NIM invoke URL. It does not raise for local-only PDFium parsing, caption, audio or video, or ASR failures, even when those stages populate row-level error fields.
| Configured invoke URL | DataFrame column scanned | Stage label in messages |
|---|---|---|
page_elements_invoke_url |
output_column (default page_elements_v3) |
Page Elements NIM |
ocr_invoke_url |
ocr |
OCR NIM |
table_structure_invoke_url |
table_structure_ocr_v1 |
Table Structure NIM |
nemotron_parse_invoke_url or invoke_url |
nemotron_parse_v1_2 |
Nemotron Parse NIM |
embed_invoke_url or embedding_endpoint |
output_column (default text_embeddings_1b_v2) |
Embedding NIM |
Caption and ASR use remote endpoints but are outside this raise path today. Remote caption failures can abort the whole ingest instead of returning a partial DataFrame. ASR failures can omit affected rows while logging a warning, which can look like an empty transcript unless you inspect logs.
Row-level error payloads
Most extraction stages write errors into the result row instead of raising immediately. The common nested shape is:
{
"error": {
"stage": "ocr_page_elements",
"type": "HTTPError",
"message": "HTTP 503 from https://example/v1/infer: ...",
"traceback": "..."
}
}
The stage string is a semi-stable operator identifier (for example
remote_inference, nemotron_parse_pages, or split_pdf). It is not a
product-wide error-code enum. HTTP status codes usually appear inside
message text rather than as a separate status_code field; when a
structured status is present, GraphIngestionError can include it in the
rendered exception.
import os
from nemo_retriever import GraphIngestionError, create_ingestor
from nemo_retriever.common.params import ExtractParams
pipeline = (
create_ingestor(run_mode="inprocess", error_policy="raise")
.files(["document.pdf"])
.extract(
ExtractParams(
method="ocr",
ocr_invoke_url=os.environ["OCR_INVOKE_URL"],
)
)
)
try:
result = pipeline.ingest()
except GraphIngestionError as exc:
# Records can contain source paths, endpoint details, and upstream
# response text. Extract only known-safe diagnostic fields before
# logging or sending them to your support workflow.
for record in exc.records:
payload = record.get("error") if isinstance(record, dict) else record
if isinstance(payload, dict):
print(
{
"column": record.get("column"),
"stage": payload.get("stage"),
"type": payload.get("type"),
"message": payload.get("message"),
}
)
else:
print(
{
"column": record.get("column") if isinstance(record, dict) else None,
"message": str(payload),
}
)
For a support-oriented mapping of extraction paths, error signals, corrective actions, and escalation criteria, refer to Python API error triage.
Version-specific behavior
This reference describes the current NeMo Retriever Library. Older
NV-Ingest releases, including 25.4.2, can use different exception text
and result shapes and might not include enriched GraphIngestionError
diagnostics. When troubleshooting an older deployment, use the package and
container versions from that deployment and include them in the support
case.
PDF pre-splitting for parallel ingest
Large PDFs are split into page batches before Ray processing so extraction can run in parallel. This happens on the default ingest path; you do not need extra configuration for typical workloads.
To tune splitter throughput from the CLI, use --pdf-split-batch-size (Ray actor batch size for the splitter stage). Refer to Text chunking and PDF page batches in the CLI reference.
Python client (pdf_split_config): Only create_ingestor(run_mode="service") implements .pdf_split_config(pages_per_chunk=...), which records page-chunking settings in the request pipeline spec for the remote gateway. Local graph ingest (run_mode="inprocess" or "batch") raises NotImplementedError if you call this method; PDFs are split automatically on the default ingest path without client-side configuration.
One-shot text generation
TextGenerationOperator is the reusable base for synchronous, one-request-per-row text generation. It is a provisional text-only API: it does not support tool calls, agent loops, streaming, multiple choices, or structured domain results.
Concrete operators construct an immutable TextGenerationTask and provide reconstructible constructor state. Runtime task and client objects must not be included in graph constructor arguments. A custom completion client must be safe for concurrent calls or report that it does not support concurrent calls so the operator serializes access.
Embedding and captioning remain separate operator families because they use modality grouping, native batching, and specialized CPU/GPU lifecycles.
Generic generation and summarization
Both operators consume a pandas DataFrame and add text, latency, model, and error columns without changing the input rows:
import pandas as pd
from nemo_retriever.common.params import TextGenerationParams
from nemo_retriever.operators.generation import GenericGenerationOperator, SummarizationOperator
summary_params = TextGenerationParams.from_kwargs(
model="openai/gpt-4o-mini",
api_key="os.environ/OPENAI_API_KEY",
temperature=0.0,
max_tokens=512,
)
summaries = SummarizationOperator(summary_params).run(
pd.DataFrame({"text": ["A long document to summarize."]})
)
prompt_params = TextGenerationParams.from_kwargs(
model="openai/gpt-4o-mini",
api_key="os.environ/OPENAI_API_KEY",
prompt="Write a {tone} title for: {text}",
)
titles = GenericGenerationOperator(
prompt_params,
input_columns={"tone": "style", "text": "document"},
output_column="title",
).run(pd.DataFrame({"style": ["concise"], "document": ["Quarterly results"]}))
SummarizationOperator defaults to text, summary, summary_latency_s, summary_model, and summary_error. GenericGenerationOperator maps each named prompt placeholder to a physical DataFrame column and derives the metadata column names from output_column. Prompt contracts are validated when the operator is constructed, before any provider request runs.
To define another one-request/one-text-result task, subclass TextGenerationTask, declare required_inputs, and implement build_request(). Then construct it from a TextGenerationOperator subclass with explicit logical-input-to-DataFrame-column mappings. This abstraction is intentionally text-only; use a separate operator family for embeddings, captioning, tools, streaming, or structured domain results.
Generation failures are collected per row using stable error codes: empty_input, request_error, transport_error, unsupported_response, parse_error, empty_output, and the RAG-specific thinking_truncated. Raw provider exceptions and credentials are not written to DataFrame outputs.
Persisted graphs are trusted configuration
Graph loading imports operator classes and invokes their constructors. Load graph JSON only from trusted sources; do not expose graph payloads, callable references, or class names as model- or user-controlled agent tools.
Version 2 graph files preserve shared-node DAG identity and reject cycles. Constructor state must consist of supported JSON-native values, typed Pydantic models, paths, sets and tuples, or importable type/callable references. Runtime data such as DataFrames and opaque client objects is not persistable.
API keys are never written into graph JSON. Use an explicit environment reference in persisted configuration:
QAGenerationOperator(
model="openai/gpt-4o-mini",
api_key="os.environ/OPENAI_API_KEY",
)
Serializing a graph containing a literal API key fails with a contextual error instead of guessing which provider credential should be used on a worker.
Ingestor bucket: ingestion orchestration, planning, manifests and results.
The public ingestor API lives in :mod:nemo_retriever.ingestor.core and is
re-exported here so that nemo_retriever.ingestor keeps the exact module-level
surface it had before the reorganization (create_ingestor, ingestor /
Ingestor, _merge_params and the re-exported param models such as
IngestorCreateParams).
Ingestor = ingestor
module-attribute
IngestorRunMode = Literal['inprocess', 'batch', 'service']
module-attribute
__all__ = ['create_ingestor', 'ingestor', 'Ingestor']
module-attribute
CaptionParams
Bases: LLMInferenceParams
Source code in nemo_retriever/common/params/models.py
975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 | |
api_key = None
class-attribute
instance-attribute
batch_size = 8
class-attribute
instance-attribute
caption_infographics = False
class-attribute
instance-attribute
context_text_max_chars = 0
class-attribute
instance-attribute
device = None
class-attribute
instance-attribute
endpoint_url = None
class-attribute
instance-attribute
extra_body = Field(default_factory=dict)
class-attribute
instance-attribute
gpu_memory_utilization = 0.5
class-attribute
instance-attribute
hf_cache_dir = None
class-attribute
instance-attribute
model_name = Field(default=DEFAULT_LOCAL_CAPTION_MODEL_ID, description='Caption model identifier. The default local BF16 checkpoint has approximately 62 GiB of weights; set this explicitly to select a smaller local model or an API model for a remote endpoint.')
class-attribute
instance-attribute
prompt = 'Caption the content of this image:'
class-attribute
instance-attribute
system_prompt = '/no_think'
class-attribute
instance-attribute
tensor_parallel_size = 1
class-attribute
instance-attribute
_require_temperature(value)
classmethod
Source code in nemo_retriever/common/params/models.py
996 997 998 999 1000 1001 | |
DedupParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
1019 1020 1021 1022 | |
bbox_iou = True
class-attribute
instance-attribute
content_hash = True
class-attribute
instance-attribute
iou_threshold = Field(default=0.45, ge=0.0, le=1.0)
class-attribute
instance-attribute
EmbedParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 | |
api_key = None
class-attribute
instance-attribute
batch_tuning = Field(default_factory=BatchTuningParams)
class-attribute
instance-attribute
dimensions = None
class-attribute
instance-attribute
embed_granularity = 'element'
class-attribute
instance-attribute
embed_inference_batch_size = 16
class-attribute
instance-attribute
embed_invoke_url = None
class-attribute
instance-attribute
embed_modality = 'text'
class-attribute
instance-attribute
embed_model_name = None
class-attribute
instance-attribute
embed_model_provider_prefix = None
class-attribute
instance-attribute
embed_model_revision = None
class-attribute
instance-attribute
embed_output_column = 'text_embeddings_1b_v2'
class-attribute
instance-attribute
embedding_dim_column = 'text_embeddings_1b_v2_dim'
class-attribute
instance-attribute
embedding_endpoint = None
class-attribute
instance-attribute
has_embedding_column = 'text_embeddings_1b_v2_has_embedding'
class-attribute
instance-attribute
inference_batch_size = 32
class-attribute
instance-attribute
input_type = 'passage'
class-attribute
instance-attribute
local_ingest_embed_backend = 'vllm'
class-attribute
instance-attribute
model_name = None
class-attribute
instance-attribute
nim_http_max_concurrent = 32
class-attribute
instance-attribute
output_column = 'text_embeddings_1b_v2'
class-attribute
instance-attribute
query_max_length = 128
class-attribute
instance-attribute
request_timeout_s = 600.0
class-attribute
instance-attribute
runtime = Field(default_factory=ModelRuntimeParams)
class-attribute
instance-attribute
structured_elements_modality = None
class-attribute
instance-attribute
text_column = 'text'
class-attribute
instance-attribute
text_elements_modality = None
class-attribute
instance-attribute
_validate_local_ingest_embed_backend(v)
classmethod
Source code in nemo_retriever/common/params/models.py
624 625 626 627 628 629 630 631 632 633 634 635 636 637 | |
_validate_modality(v)
classmethod
Source code in nemo_retriever/common/params/models.py
639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 | |
_warn_page_granularity_overrides()
Source code in nemo_retriever/common/params/models.py
656 657 658 659 660 661 662 663 664 665 666 667 | |
ExtractParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 | |
api_key = None
class-attribute
instance-attribute
batch_tuning = Field(default_factory=BatchTuningParams)
class-attribute
instance-attribute
counts_by_label_column = 'page_elements_v3_counts_by_label'
class-attribute
instance-attribute
dpi = 200
class-attribute
instance-attribute
extract_charts = True
class-attribute
instance-attribute
extract_images = True
class-attribute
instance-attribute
extract_infographics = False
class-attribute
instance-attribute
extract_page_as_image = True
class-attribute
instance-attribute
extract_tables = True
class-attribute
instance-attribute
extract_text = True
class-attribute
instance-attribute
image_format = 'jpeg'
class-attribute
instance-attribute
inference_batch_size = 8
class-attribute
instance-attribute
invoke_url = None
class-attribute
instance-attribute
jpeg_quality = 100
class-attribute
instance-attribute
method = 'pdfium'
class-attribute
instance-attribute
nemotron_parse_invoke_url = None
class-attribute
instance-attribute
nemotron_parse_model = None
class-attribute
instance-attribute
num_detections_column = 'page_elements_v3_num_detections'
class-attribute
instance-attribute
ocr_api_key = None
class-attribute
instance-attribute
ocr_invoke_url = None
class-attribute
instance-attribute
ocr_lang = None
class-attribute
instance-attribute
ocr_model_dir = None
class-attribute
instance-attribute
ocr_request_timeout_s = None
class-attribute
instance-attribute
ocr_version = 'v2'
class-attribute
instance-attribute
output_column = 'page_elements_v3'
class-attribute
instance-attribute
page_elements_api_key = None
class-attribute
instance-attribute
page_elements_invoke_url = None
class-attribute
instance-attribute
page_elements_request_timeout_s = None
class-attribute
instance-attribute
remote_retry = Field(default_factory=RemoteRetryParams)
class-attribute
instance-attribute
render_mode = 'fit_to_model'
class-attribute
instance-attribute
request_timeout_s = 60.0
class-attribute
instance-attribute
table_output_format = None
class-attribute
instance-attribute
table_structure_invoke_url = None
class-attribute
instance-attribute
use_page_elements = True
class-attribute
instance-attribute
use_table_structure = False
class-attribute
instance-attribute
_auto_enable_features()
Auto-configure feature flags from remote endpoints.
- Enable
use_table_structurewhentable_structure_invoke_urlis provided. - Default
table_output_formatto"markdown"when the stage is enabled and the caller did not explicitly choose a format.
Source code in nemo_retriever/common/params/models.py
556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 | |
IngestExecuteParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
325 326 327 328 329 330 331 332 333 334 335 336 337 338 | |
gpu_devices = Field(default_factory=list)
class-attribute
instance-attribute
max_workers = None
class-attribute
instance-attribute
page_chunk_size = 32
class-attribute
instance-attribute
parallel = False
class-attribute
instance-attribute
result_schema = 'legacy'
class-attribute
instance-attribute
return_embeddings = False
class-attribute
instance-attribute
return_failures = False
class-attribute
instance-attribute
return_images = False
class-attribute
instance-attribute
return_results = True
class-attribute
instance-attribute
return_traces = False
class-attribute
instance-attribute
runtime_metrics_dir = None
class-attribute
instance-attribute
runtime_metrics_prefix = None
class-attribute
instance-attribute
show_progress = False
class-attribute
instance-attribute
IngestorCreateParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 | |
allow_no_gpu = False
class-attribute
instance-attribute
api_key = None
class-attribute
instance-attribute
base_url = 'http://localhost:7670'
class-attribute
instance-attribute
debug = False
class-attribute
instance-attribute
documents = Field(default_factory=list)
class-attribute
instance-attribute
error_policy = 'raise'
class-attribute
instance-attribute
max_concurrency = None
class-attribute
instance-attribute
node_overrides = None
class-attribute
instance-attribute
ray_address = None
class-attribute
instance-attribute
ray_log_to_driver = True
class-attribute
instance-attribute
StoreParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
714 715 716 717 718 719 720 721 722 723 724 725 726 | |
batch_tuning = Field(default_factory=BatchTuningParams)
class-attribute
instance-attribute
image_format = 'png'
class-attribute
instance-attribute
storage_options = Field(default_factory=dict)
class-attribute
instance-attribute
storage_uri = 'stored_images'
class-attribute
instance-attribute
strip_base64 = True
class-attribute
instance-attribute
_resolve_local_storage_uri()
Resolve relative local paths to absolute so they survive Ray serialization.
Source code in nemo_retriever/common/params/models.py
721 722 723 724 725 726 | |
VdbUploadParams
Bases: _ParamsModel
Post-graph vector DB upload configuration.
Sidecar metadata (meta_*) matches nv_ingest_client / metadata_and_filtered_search.ipynb:
all three fields must be set together to merge columns into each chunk's content_metadata.
Source code in nemo_retriever/common/params/models.py
673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 | |
meta_dataframe = None
class-attribute
instance-attribute
Path to csv/json/parquet or an in-memory :class:pandas.DataFrame.
meta_fields = None
class-attribute
instance-attribute
meta_join_key = 'auto'
class-attribute
instance-attribute
How to match rows to documents: source_id (full path), source_name (basename), or auto (try both).
meta_source_field = None
class-attribute
instance-attribute
vdb_kwargs = Field(default_factory=dict)
class-attribute
instance-attribute
vdb_op = 'lancedb'
class-attribute
instance-attribute
_validate_sidecar_triplet()
Source code in nemo_retriever/common/params/models.py
689 690 691 692 693 694 695 696 697 698 699 700 701 | |
to_ingest_operator_kwargs()
Flatten into kwargs for :class:~nemo_retriever.vdb.IngestVdbOperator.
Source code in nemo_retriever/common/params/models.py
703 704 705 706 707 708 709 710 711 | |
WebhookParams
Bases: _ParamsModel
Configuration for the webhook notification stage.
When endpoint_url is set, selected columns from the processed batch
are serialised to JSON and HTTP-POSTed to that URL. If endpoint_url
is None the stage is a no-op.
Source code in nemo_retriever/common/params/models.py
1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 | |
columns = Field(default_factory=list)
class-attribute
instance-attribute
endpoint_url = None
class-attribute
instance-attribute
headers = Field(default_factory=dict)
class-attribute
instance-attribute
max_retries = 3
class-attribute
instance-attribute
timeout_s = 30.0
class-attribute
instance-attribute
ingestor
Interface base class. All methods intentionally raise NotImplementedError.
Each runmode should subclass this and eventually provide working behavior.
Source code in nemo_retriever/ingestor/core.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | |
RUN_MODE = 'interface'
class-attribute
instance-attribute
_buffers = []
instance-attribute
_documents = list(documents or [])
instance-attribute
__init__(documents=None)
Source code in nemo_retriever/ingestor/core.py
96 97 98 | |
_not_implemented(method_name)
Source code in nemo_retriever/ingestor/core.py
100 101 102 103 | |
all_tasks()
Record the default task chain (placeholder).
Source code in nemo_retriever/ingestor/core.py
144 145 146 | |
buffers(buffers)
Add in-memory buffers for processing.
Source code in nemo_retriever/ingestor/core.py
113 114 115 | |
cancelled_jobs()
Return cancelled job count (placeholder until backend populates job state).
Source code in nemo_retriever/ingestor/core.py
224 225 226 | |
caption(params=None, **kwargs)
Record a caption task configuration.
Source code in nemo_retriever/ingestor/core.py
202 203 204 205 | |
completed_jobs()
Return completed job count (placeholder until backend populates job state).
Source code in nemo_retriever/ingestor/core.py
216 217 218 | |
dedup(params=None, **kwargs)
Record a dedup task configuration.
Source code in nemo_retriever/ingestor/core.py
148 149 150 151 | |
embed(params=None, **kwargs)
Record an embedding task configuration.
Source code in nemo_retriever/ingestor/core.py
153 154 155 156 | |
extract(params=None, **kwargs)
Record an extract task configuration.
Source code in nemo_retriever/ingestor/core.py
158 159 160 161 | |
extract_image_files(params=None, **kwargs)
Record an extract-image-files task configuration.
Source code in nemo_retriever/ingestor/core.py
163 164 165 166 | |
failed_jobs()
Return failed job count (placeholder until backend populates job state).
Source code in nemo_retriever/ingestor/core.py
220 221 222 | |
files(documents)
Add document paths/URIs for processing.
Source code in nemo_retriever/ingestor/core.py
105 106 107 | |
filter()
Record a filter task configuration.
Source code in nemo_retriever/ingestor/core.py
168 169 170 | |
get_status()
Return per-document status mapping (placeholder).
Once Ray execution is wired, this should reflect actual job/task state.
Source code in nemo_retriever/ingestor/core.py
232 233 234 235 236 237 238 | |
ingest(params=None, **kwargs)
Execute the configured ingestion pipeline (placeholder).
In run_mode='service', return_results (default True)
controls whether completed rows are fetched into
ServiceIngestResult.dataframe.
Source code in nemo_retriever/ingestor/core.py
126 127 128 129 130 131 132 133 134 135 136 137 138 | |
ingest_async(*, return_failures=False, return_traces=False)
Asynchronously execute ingestion (placeholder).
Source code in nemo_retriever/ingestor/core.py
140 141 142 | |
load()
Placeholder for remote fetch/localization.
The client-side Ingestor supports downloading remote URIs locally. In this system, each runmode may handle remote inputs differently.
Source code in nemo_retriever/ingestor/core.py
117 118 119 120 121 122 123 124 | |
remaining_jobs()
Return remaining job count (placeholder until backend populates job state).
Source code in nemo_retriever/ingestor/core.py
228 229 230 | |
save_intermediate_results(output_dir)
Record intermediate results persistence configuration.
Source code in nemo_retriever/ingestor/core.py
198 199 200 | |
store(params=None, **kwargs)
Record a store task configuration for extracted image assets.
Source code in nemo_retriever/ingestor/core.py
172 173 174 175 | |
store_embed()
Record a store-embed task configuration.
Source code in nemo_retriever/ingestor/core.py
177 178 179 | |
texts(texts)
Set raw inline text documents for processing.
Source code in nemo_retriever/ingestor/core.py
109 110 111 | |
udf(udf_function, udf_function_name=None, phase=None, target_stage=None, run_before=False, run_after=False)
Record a UDF task configuration.
Source code in nemo_retriever/ingestor/core.py
181 182 183 184 185 186 187 188 189 190 191 | |
vdb_upload(params=None, **kwargs)
Record a vector DB upload configuration (execution TBD).
Source code in nemo_retriever/ingestor/core.py
193 194 195 196 | |
webhook(params=None, **kwargs)
Record a webhook notification configuration.
Source code in nemo_retriever/ingestor/core.py
207 208 209 210 | |
create_ingestor(*, run_mode='inprocess', params=None, **kwargs)
Graph-only ingestion factory.
Source code in nemo_retriever/ingestor/core.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |
logger = logging.getLogger(__name__)
module-attribute
retriever = Retriever
module-attribute
Retriever
dataclass
Graph-based query helper: batch embed → VDB retrieve [→ Nemotron rerank].
Configuration is passed through embed_kwargs (:class:~nemo_retriever.params.EmbedParams),
vdb_kwargs (constructor kwargs for :class:~nemo_retriever.vdb.operators.RetrieveVdbOperator),
and optional rerank_kwargs for :class:~nemo_retriever.rerank.rerank.NemotronRerankActor.
See retriever.md for examples.
Source code in nemo_retriever/graph/retriever.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 | |
embed_kwargs = field(default_factory=dict)
class-attribute
instance-attribute
graph = None
class-attribute
instance-attribute
Custom :class:~nemo_retriever.graph.pipeline_graph.Graph. When set, embed_kwargs /
vdb_kwargs default-graph fields are ignored for construction (you still pass execute kwargs).
rerank = False
class-attribute
instance-attribute
When True, append :class:~nemo_retriever.rerank.rerank.NemotronRerankActor after retrieval.
rerank_kwargs = field(default_factory=dict)
class-attribute
instance-attribute
run_mode = 'local'
class-attribute
instance-attribute
local uses archetype batch embed resolution; service forces CPU HTTP embed.
top_k = 10
class-attribute
instance-attribute
vdb_kwargs = field(default_factory=dict)
class-attribute
instance-attribute
__init__(run_mode='local', top_k=10, rerank=False, graph=None, embed_kwargs=dict(), vdb_kwargs=dict(), rerank_kwargs=dict())
__post_init__()
Source code in nemo_retriever/graph/retriever.py
101 102 103 | |
answer(query, *, llm, judge=None, reference=None, top_k=None, reasoning_enabled=None, vdb_kwargs=None, embed_kwargs=None)
Source code in nemo_retriever/graph/retriever.py
542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 | |
generate_sql(query)
Source code in nemo_retriever/graph/retriever.py
593 594 595 596 | |
pipeline(*, top_k=None)
Source code in nemo_retriever/graph/retriever.py
589 590 591 | |
queries(queries, *, top_k=None, candidate_k=None, page_dedup=False, content_types=None, vdb_kwargs=None, embed_kwargs=None)
Run retrieval for multiple query strings and return shaped hits.
top_k is the final number of hits to return. candidate_k is the
wider pre-filter/pre-dedup candidate pool and must be greater than or
equal to top_k. Increase it when page deduplication or content-type
filtering would otherwise reduce the final hit count. page_dedup
keeps the first hit per document page. content_types accepts a
comma-separated string or sequence of content types to keep, such as
"text,table", and normalizes values to the canonical content types
stored in hit metadata. Hits with missing or unknown content types are
excluded while this filter is active. Page deduplication and
content-type filtering are applied after vector retrieval, preserving
retriever ranking order.
Source code in nemo_retriever/graph/retriever.py
402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 | |
query(query, *, top_k=None, candidate_k=None, page_dedup=False, content_types=None, vdb_kwargs=None, embed_kwargs=None)
Run one retrieval query and return shaped hits.
top_k is the final number of hits to return. candidate_k is the
wider pre-filter/pre-dedup candidate pool and must be greater than or
equal to top_k. Increase it when page deduplication or content-type
filtering would otherwise reduce the final hit count. page_dedup
keeps the first hit per document page. content_types accepts a
comma-separated string or sequence of content types to keep, such as
"text,table", and normalizes values to the canonical content types
stored in hit metadata. Hits with missing or unknown content types are
excluded while this filter is active. Page deduplication and
content-type filtering are applied after vector retrieval, preserving
retriever ranking order.
Source code in nemo_retriever/graph/retriever.py
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | |
retrieve(query, top_k=None, *, vdb_kwargs=None, embed_kwargs=None)
Source code in nemo_retriever/graph/retriever.py
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 | |
retrieve_batch(queries, *, top_k=None, vdb_kwargs=None, embed_kwargs=None)
Source code in nemo_retriever/graph/retriever.py
519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 | |
RetrieverPipelineBuilder
Fluent builder for live-RAG batch operator graphs.
Returned from :meth:Retriever.pipeline. Each builder method appends
an :class:~nemo_retriever.evaluation.eval_operator.EvalOperator to an
internal list; :meth:run composes them into a graph via the existing
>> chaining and executes it on a DataFrame built from the provided
queries.
Example
builder = retriever.pipeline() # doctest: +SKIP df = builder.generate(llm).score().judge(judge).run( # doctest: +SKIP ... queries=["q1", "q2"], ... reference=["r1", "r2"], ... )
Source code in nemo_retriever/graph/retriever.py
599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 | |
__init__(retriever, *, top_k=5)
Source code in nemo_retriever/graph/retriever.py
616 617 618 619 | |
generate(llm=None, /, *, model=None, **kwargs)
Append a :class:QAGenerationOperator step.
Accepts either a pre-built
:class:~nemo_retriever.llm.clients.LiteLLMClient (whose transport
and sampling params are unpacked onto the operator) or the flat
model=..., api_base=..., ... kwargs forwarded to the operator
constructor directly.
Raises:
| Type | Description |
|---|---|
ValueError
|
If neither |
Source code in nemo_retriever/graph/retriever.py
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 | |
judge(judge=None, /, *, model=None, **kwargs)
Append a :class:JudgingOperator step (Tier 3).
Accepts either a pre-built
:class:~nemo_retriever.llm.clients.judge.LLMJudge (whose transport params
are unpacked onto the operator) or the flat model=... kwargs
forwarded to the operator constructor.
Raises:
| Type | Description |
|---|---|
ValueError
|
If neither |
Source code in nemo_retriever/graph/retriever.py
680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 | |
run(queries, *, reference=None)
Execute the composed graph on queries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
queries
|
Any
|
A single query string, a list of query strings, or a
pre-built |
required |
reference
|
Any
|
Optional ground-truth answer(s). Accepts a single
string (applied to all queries), a list aligned with
|
None
|
Returns:
| Type | Description |
|---|---|
'pd.DataFrame'
|
A |
'pd.DataFrame'
|
appended step (always |
'pd.DataFrame'
|
|
'pd.DataFrame'
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in nemo_retriever/graph/retriever.py
719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 | |
score()
Append a :class:ScoringOperator step (Tier 1 + Tier 2).
Source code in nemo_retriever/graph/retriever.py
673 674 675 676 677 678 | |
with_retrieval(*, top_k)
Override the top_k used for the live retrieval source.
Source code in nemo_retriever/graph/retriever.py
621 622 623 624 | |
IngestorRunMode = Literal['inprocess', 'batch', 'service']
module-attribute
MetaJoinKey = Literal['auto', 'source_id', 'source_name']
module-attribute
NO_API_KEY = ''
module-attribute
SPLIT_CONFIG_VALID_KEYS = frozenset({'text', 'html', 'pdf', 'audio', 'image', 'video'})
module-attribute
__all__ = ['ASRParams', 'AudioChunkParams', 'AudioVisualFuseParams', 'BatchTuningParams', 'CaptionParams', 'ChartParams', 'DedupParams', 'EmbedParams', 'ExtractParams', 'GpuAllocationParams', 'HtmlChunkParams', 'IngestExecuteParams', 'IngestorCreateParams', 'IngestorRunMode', 'LanceDbParams', 'LLMInferenceParams', 'LLMRemoteClientParams', 'LLMSamplingOverrides', 'ModelRuntimeParams', 'NO_API_KEY', 'OcrParams', 'PageElementsParams', 'PdfSplitParams', 'RemoteInvokeParams', 'RemoteRetryParams', 'SPLIT_CONFIG_VALID_KEYS', 'StoreParams', 'TabularExtractParams', 'TableParams', 'TextChunkParams', 'TextGenerationParams', 'MetaJoinKey', 'VdbUploadParams', 'VideoFrameParams', 'VideoFrameTextDedupParams', 'WebhookParams', 'build_embed_option_kwargs', 'resolve_split_params']
module-attribute
ASRParams
Bases: _ParamsModel
Params for ASR (Parakeet/Riva gRPC or local transformers backend).
Choice of remote-NIM vs local-model is made by the :class:ASRActor
archetype (CPU variant = remote, GPU variant = local), not by a flag here.
Pass audio_endpoints to force the remote variant on any host; leave
them empty to let the archetype pick GPU (local) when a GPU is present
and fall back to remote (NVCF default) when not.
Source code in nemo_retriever/common/params/models.py
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | |
audio_endpoints = (None, None)
class-attribute
instance-attribute
audio_infer_mode = 'auto'
class-attribute
instance-attribute
audio_infer_protocol = 'grpc'
class-attribute
instance-attribute
auth_token = None
class-attribute
instance-attribute
function_id = None
class-attribute
instance-attribute
segment_audio = False
class-attribute
instance-attribute
AudioChunkParams
Bases: _ParamsModel
Params for media chunking (audio/video split). Aligned with nemo_retriever.api dataloader.
Set enabled=False (when wired through VideoSplitActor) to skip
audio chunking and ASR on a video pipeline — useful for visual-only
recall benchmarks. MediaChunkActor ignores this flag for the
audio-only pipeline since chunking is the whole point there.
audio_only=True on a video input extracts only the audio track,
runs ASR over it, and skips the visual branch entirely — no frame
extraction, no OCR, no audio/visual fusion.
video_audio_separate is accepted for compatibility but ignored by
MediaChunkActor on video inputs: this ASR chunking path always demuxes
videos to ASR-safe audio chunks and does not emit video-container chunks.
Use VideoSplitActor or the video pipeline when you need audio+visual
video processing.
Source code in nemo_retriever/common/params/models.py
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | |
audio_only = False
class-attribute
instance-attribute
enabled = True
class-attribute
instance-attribute
split_interval = 450
class-attribute
instance-attribute
split_type = 'size'
class-attribute
instance-attribute
video_audio_separate = False
class-attribute
instance-attribute
AudioVisualFuseParams
Bases: _ParamsModel
Toggle for :class:~nemo_retriever.video.AudioVisualFuser.
Source code in nemo_retriever/common/params/models.py
450 451 452 453 | |
enabled = True
class-attribute
instance-attribute
BatchTuningParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 | |
debug_run_id = 'unknown'
class-attribute
instance-attribute
detect_batch_size = 24
class-attribute
instance-attribute
detect_workers = None
class-attribute
instance-attribute
embed_batch_size = 32
class-attribute
instance-attribute
embed_cpus_per_actor = 1
class-attribute
instance-attribute
embed_workers = None
class-attribute
instance-attribute
gpu_embed = None
class-attribute
instance-attribute
gpu_nemotron_parse = None
class-attribute
instance-attribute
gpu_ocr = None
class-attribute
instance-attribute
gpu_page_elements = None
class-attribute
instance-attribute
gpu_table_structure = None
class-attribute
instance-attribute
inference_batch_size = 8
class-attribute
instance-attribute
nemotron_parse_batch_size = None
class-attribute
instance-attribute
nemotron_parse_workers = None
class-attribute
instance-attribute
ocr_cpus_per_actor = 1
class-attribute
instance-attribute
ocr_inference_batch_size = None
class-attribute
instance-attribute
ocr_workers = None
class-attribute
instance-attribute
page_elements_batch_size = 24
class-attribute
instance-attribute
page_elements_cpus_per_actor = 1
class-attribute
instance-attribute
page_elements_workers = None
class-attribute
instance-attribute
pdf_extract_batch_size = 4
class-attribute
instance-attribute
pdf_extract_num_cpus = 2
class-attribute
instance-attribute
pdf_extract_workers = None
class-attribute
instance-attribute
pdf_split_batch_size = 1
class-attribute
instance-attribute
store_workers = None
class-attribute
instance-attribute
table_structure_batch_size = None
class-attribute
instance-attribute
table_structure_cpus_per_actor = 1
class-attribute
instance-attribute
table_structure_workers = None
class-attribute
instance-attribute
CaptionParams
Bases: LLMInferenceParams
Source code in nemo_retriever/common/params/models.py
975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 | |
api_key = None
class-attribute
instance-attribute
batch_size = 8
class-attribute
instance-attribute
caption_infographics = False
class-attribute
instance-attribute
context_text_max_chars = 0
class-attribute
instance-attribute
device = None
class-attribute
instance-attribute
endpoint_url = None
class-attribute
instance-attribute
extra_body = Field(default_factory=dict)
class-attribute
instance-attribute
gpu_memory_utilization = 0.5
class-attribute
instance-attribute
hf_cache_dir = None
class-attribute
instance-attribute
model_name = Field(default=DEFAULT_LOCAL_CAPTION_MODEL_ID, description='Caption model identifier. The default local BF16 checkpoint has approximately 62 GiB of weights; set this explicitly to select a smaller local model or an API model for a remote endpoint.')
class-attribute
instance-attribute
prompt = 'Caption the content of this image:'
class-attribute
instance-attribute
system_prompt = '/no_think'
class-attribute
instance-attribute
tensor_parallel_size = 1
class-attribute
instance-attribute
ChartParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
756 757 758 759 | |
inference_batch_size = 8
class-attribute
instance-attribute
remote = Field(default_factory=RemoteInvokeParams)
class-attribute
instance-attribute
remote_retry = Field(default_factory=RemoteRetryParams)
class-attribute
instance-attribute
DedupParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
1019 1020 1021 1022 | |
bbox_iou = True
class-attribute
instance-attribute
content_hash = True
class-attribute
instance-attribute
iou_threshold = Field(default=0.45, ge=0.0, le=1.0)
class-attribute
instance-attribute
EmbedParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 | |
api_key = None
class-attribute
instance-attribute
batch_tuning = Field(default_factory=BatchTuningParams)
class-attribute
instance-attribute
dimensions = None
class-attribute
instance-attribute
embed_granularity = 'element'
class-attribute
instance-attribute
embed_inference_batch_size = 16
class-attribute
instance-attribute
embed_invoke_url = None
class-attribute
instance-attribute
embed_modality = 'text'
class-attribute
instance-attribute
embed_model_name = None
class-attribute
instance-attribute
embed_model_provider_prefix = None
class-attribute
instance-attribute
embed_model_revision = None
class-attribute
instance-attribute
embed_output_column = 'text_embeddings_1b_v2'
class-attribute
instance-attribute
embedding_dim_column = 'text_embeddings_1b_v2_dim'
class-attribute
instance-attribute
embedding_endpoint = None
class-attribute
instance-attribute
has_embedding_column = 'text_embeddings_1b_v2_has_embedding'
class-attribute
instance-attribute
inference_batch_size = 32
class-attribute
instance-attribute
input_type = 'passage'
class-attribute
instance-attribute
local_ingest_embed_backend = 'vllm'
class-attribute
instance-attribute
model_name = None
class-attribute
instance-attribute
nim_http_max_concurrent = 32
class-attribute
instance-attribute
output_column = 'text_embeddings_1b_v2'
class-attribute
instance-attribute
query_max_length = 128
class-attribute
instance-attribute
request_timeout_s = 600.0
class-attribute
instance-attribute
runtime = Field(default_factory=ModelRuntimeParams)
class-attribute
instance-attribute
structured_elements_modality = None
class-attribute
instance-attribute
text_column = 'text'
class-attribute
instance-attribute
text_elements_modality = None
class-attribute
instance-attribute
ExtractParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 | |
api_key = None
class-attribute
instance-attribute
batch_tuning = Field(default_factory=BatchTuningParams)
class-attribute
instance-attribute
counts_by_label_column = 'page_elements_v3_counts_by_label'
class-attribute
instance-attribute
dpi = 200
class-attribute
instance-attribute
extract_charts = True
class-attribute
instance-attribute
extract_images = True
class-attribute
instance-attribute
extract_infographics = False
class-attribute
instance-attribute
extract_page_as_image = True
class-attribute
instance-attribute
extract_tables = True
class-attribute
instance-attribute
extract_text = True
class-attribute
instance-attribute
image_format = 'jpeg'
class-attribute
instance-attribute
inference_batch_size = 8
class-attribute
instance-attribute
invoke_url = None
class-attribute
instance-attribute
jpeg_quality = 100
class-attribute
instance-attribute
method = 'pdfium'
class-attribute
instance-attribute
nemotron_parse_invoke_url = None
class-attribute
instance-attribute
nemotron_parse_model = None
class-attribute
instance-attribute
num_detections_column = 'page_elements_v3_num_detections'
class-attribute
instance-attribute
ocr_api_key = None
class-attribute
instance-attribute
ocr_invoke_url = None
class-attribute
instance-attribute
ocr_lang = None
class-attribute
instance-attribute
ocr_model_dir = None
class-attribute
instance-attribute
ocr_request_timeout_s = None
class-attribute
instance-attribute
ocr_version = 'v2'
class-attribute
instance-attribute
output_column = 'page_elements_v3'
class-attribute
instance-attribute
page_elements_api_key = None
class-attribute
instance-attribute
page_elements_invoke_url = None
class-attribute
instance-attribute
page_elements_request_timeout_s = None
class-attribute
instance-attribute
remote_retry = Field(default_factory=RemoteRetryParams)
class-attribute
instance-attribute
render_mode = 'fit_to_model'
class-attribute
instance-attribute
request_timeout_s = 60.0
class-attribute
instance-attribute
table_output_format = None
class-attribute
instance-attribute
table_structure_invoke_url = None
class-attribute
instance-attribute
use_page_elements = True
class-attribute
instance-attribute
use_table_structure = False
class-attribute
instance-attribute
GpuAllocationParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
504 505 506 | |
gpu_devices = Field(default_factory=list)
class-attribute
instance-attribute
startup_timeout = 600.0
class-attribute
instance-attribute
HtmlChunkParams
Bases: TextChunkParams
Source code in nemo_retriever/common/params/models.py
354 355 | |
IngestExecuteParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
325 326 327 328 329 330 331 332 333 334 335 336 337 338 | |
gpu_devices = Field(default_factory=list)
class-attribute
instance-attribute
max_workers = None
class-attribute
instance-attribute
page_chunk_size = 32
class-attribute
instance-attribute
parallel = False
class-attribute
instance-attribute
result_schema = 'legacy'
class-attribute
instance-attribute
return_embeddings = False
class-attribute
instance-attribute
return_failures = False
class-attribute
instance-attribute
return_images = False
class-attribute
instance-attribute
return_results = True
class-attribute
instance-attribute
return_traces = False
class-attribute
instance-attribute
runtime_metrics_dir = None
class-attribute
instance-attribute
runtime_metrics_prefix = None
class-attribute
instance-attribute
show_progress = False
class-attribute
instance-attribute
IngestorCreateParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 | |
allow_no_gpu = False
class-attribute
instance-attribute
api_key = None
class-attribute
instance-attribute
base_url = 'http://localhost:7670'
class-attribute
instance-attribute
debug = False
class-attribute
instance-attribute
documents = Field(default_factory=list)
class-attribute
instance-attribute
error_policy = 'raise'
class-attribute
instance-attribute
max_concurrency = None
class-attribute
instance-attribute
node_overrides = None
class-attribute
instance-attribute
ray_address = None
class-attribute
instance-attribute
ray_log_to_driver = True
class-attribute
instance-attribute
LLMInferenceParams
Bases: _ParamsModel
Reusable LLM sampling / generation parameters.
Inherit from this model to add temperature, top_p, and max_tokens to any task that invokes an LLM (captioning, summarization, etc.).
Source code in nemo_retriever/common/params/models.py
762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 | |
max_tokens = 1024
class-attribute
instance-attribute
temperature = 1.0
class-attribute
instance-attribute
top_p = None
class-attribute
instance-attribute
to_sampling_kwargs()
Build a dict of sampling parameters suitable for LLM inference calls.
top_p is only included when explicitly set (not None), because
many backends (vLLM, OpenAI, NIM) change behaviour when the key is
present vs. absent.
Source code in nemo_retriever/common/params/models.py
794 795 796 797 798 799 800 801 802 803 804 805 806 | |
LLMRemoteClientParams
Bases: _ParamsModel
Transport / connection parameters for any remote LLM client.
Pairs with :class:LLMInferenceParams (sampling) to fully specify a
call. api_key=None is left unset so LiteLLM can perform provider-native
environment lookup on the worker.
Source code in nemo_retriever/common/params/models.py
809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 | |
api_base = None
class-attribute
instance-attribute
api_key = None
class-attribute
instance-attribute
extra_params = Field(default_factory=dict)
class-attribute
instance-attribute
model
instance-attribute
num_retries = 3
class-attribute
instance-attribute
rag_system_prompt = None
class-attribute
instance-attribute
rag_system_prompt_prefix = None
class-attribute
instance-attribute
reasoning_enabled = True
class-attribute
instance-attribute
timeout = 120.0
class-attribute
instance-attribute
LLMSamplingOverrides
Bases: _ParamsModel
Partial sampling overrides resolved on top of task-specific defaults.
Source code in nemo_retriever/common/params/models.py
850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 | |
max_tokens = None
class-attribute
instance-attribute
temperature = None
class-attribute
instance-attribute
top_p = None
class-attribute
instance-attribute
__eq__(other)
Source code in nemo_retriever/common/params/models.py
893 894 895 896 | |
resolve(defaults)
Apply explicitly supplied fields to defaults.
Source code in nemo_retriever/common/params/models.py
898 899 900 901 902 903 904 | |
LanceDbParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 | |
create_index = True
class-attribute
instance-attribute
embedding_column = 'text_embeddings_1b_v2'
class-attribute
instance-attribute
embedding_key = 'embedding'
class-attribute
instance-attribute
fts_language = 'English'
class-attribute
instance-attribute
hybrid = False
class-attribute
instance-attribute
include_text = True
class-attribute
instance-attribute
index_type = 'IVF_HNSW_SQ'
class-attribute
instance-attribute
lancedb_uri = 'lancedb'
class-attribute
instance-attribute
metric = 'l2'
class-attribute
instance-attribute
num_partitions = 16
class-attribute
instance-attribute
num_sub_vectors = 256
class-attribute
instance-attribute
overwrite = True
class-attribute
instance-attribute
table_name = 'nv-ingest'
class-attribute
instance-attribute
text_column = 'text'
class-attribute
instance-attribute
ModelRuntimeParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
299 300 301 302 303 304 305 306 | |
device = None
class-attribute
instance-attribute
enforce_eager = False
class-attribute
instance-attribute
gpu_memory_utilization = 0.45
class-attribute
instance-attribute
hf_cache_dir = None
class-attribute
instance-attribute
max_length = 8192
class-attribute
instance-attribute
model_name = None
class-attribute
instance-attribute
normalize = True
class-attribute
instance-attribute
OcrParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
738 739 740 741 742 743 744 | |
extract_charts = False
class-attribute
instance-attribute
extract_infographics = False
class-attribute
instance-attribute
extract_tables = False
class-attribute
instance-attribute
inference_batch_size = 8
class-attribute
instance-attribute
remote = Field(default_factory=RemoteInvokeParams)
class-attribute
instance-attribute
remote_retry = Field(default_factory=RemoteRetryParams)
class-attribute
instance-attribute
PageElementsParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
729 730 731 732 733 734 735 | |
counts_by_label_column = 'page_elements_v3_counts_by_label'
class-attribute
instance-attribute
inference_batch_size = 8
class-attribute
instance-attribute
num_detections_column = 'page_elements_v3_num_detections'
class-attribute
instance-attribute
output_column = 'page_elements_v3'
class-attribute
instance-attribute
remote = Field(default_factory=RemoteInvokeParams)
class-attribute
instance-attribute
remote_retry = Field(default_factory=RemoteRetryParams)
class-attribute
instance-attribute
PdfSplitParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
341 342 343 | |
end_page = None
class-attribute
instance-attribute
start_page = None
class-attribute
instance-attribute
RemoteInvokeParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
293 294 295 296 | |
api_key = None
class-attribute
instance-attribute
invoke_url = None
class-attribute
instance-attribute
request_timeout_s = 60.0
class-attribute
instance-attribute
RemoteRetryParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
287 288 289 290 | |
remote_max_429_retries = 3
class-attribute
instance-attribute
remote_max_pool_workers = 32
class-attribute
instance-attribute
remote_max_retries = 5
class-attribute
instance-attribute
StoreParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
714 715 716 717 718 719 720 721 722 723 724 725 726 | |
batch_tuning = Field(default_factory=BatchTuningParams)
class-attribute
instance-attribute
image_format = 'png'
class-attribute
instance-attribute
storage_options = Field(default_factory=dict)
class-attribute
instance-attribute
storage_uri = 'stored_images'
class-attribute
instance-attribute
strip_base64 = True
class-attribute
instance-attribute
TableParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
747 748 749 750 751 752 753 | |
counts_by_label_column = 'table_structure_v1_counts_by_label'
class-attribute
instance-attribute
inference_batch_size = 8
class-attribute
instance-attribute
num_detections_column = 'table_structure_v1_num_detections'
class-attribute
instance-attribute
output_column = 'table_structure_v1'
class-attribute
instance-attribute
remote = Field(default_factory=RemoteInvokeParams)
class-attribute
instance-attribute
remote_retry = Field(default_factory=RemoteRetryParams)
class-attribute
instance-attribute
TabularExtractParams
Bases: _ParamsModel
Params for step 1: extract schema metadata and write to Neo4j.
Covers SQLAlchemy reflection of a live database and/or parsing of pre-existing SQL DDL/query files. Produces Database, Schema, Table, Column, View and Query nodes together with their relationships. The Neo4j connection is provided by get_neo4j_conn() (see tabular_data.neo4j) and is not configured here.
Source code in nemo_retriever/common/params/models.py
1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 | |
connector = None
class-attribute
instance-attribute
model_config = ConfigDict(extra='forbid', arbitrary_types_allowed=True)
class-attribute
instance-attribute
TextChunkParams
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
346 347 348 349 350 351 | |
encoding = 'utf-8'
class-attribute
instance-attribute
max_tokens = 1024
class-attribute
instance-attribute
overlap_tokens = 0
class-attribute
instance-attribute
tokenizer_cache_dir = None
class-attribute
instance-attribute
tokenizer_model_id = None
class-attribute
instance-attribute
TextGenerationParams
Bases: _ParamsModel
Transport, task controls, and partial sampling for text generation.
Source code in nemo_retriever/common/params/models.py
910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 | |
max_workers = Field(default=8, ge=1)
class-attribute
instance-attribute
prompt = None
class-attribute
instance-attribute
reasoning_enabled = None
class-attribute
instance-attribute
sampling = Field(default_factory=LLMSamplingOverrides)
class-attribute
instance-attribute
system_prompt = None
class-attribute
instance-attribute
transport
instance-attribute
from_kwargs(*, model, api_base=None, api_key=None, temperature=_SAMPLING_UNSET, top_p=_SAMPLING_UNSET, max_tokens=_SAMPLING_UNSET, extra_params=None, num_retries=3, timeout=120.0, rag_system_prompt=None, rag_system_prompt_prefix=None, reasoning_enabled=None, prompt=None, system_prompt=None, max_workers=8)
classmethod
Construct structured text-generation params from flat kwargs.
Source code in nemo_retriever/common/params/models.py
924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 | |
resolve_sampling(defaults)
Resolve explicit sampling fields over a task's defaults.
Source code in nemo_retriever/common/params/models.py
920 921 922 | |
VdbUploadParams
Bases: _ParamsModel
Post-graph vector DB upload configuration.
Sidecar metadata (meta_*) matches nv_ingest_client / metadata_and_filtered_search.ipynb:
all three fields must be set together to merge columns into each chunk's content_metadata.
Source code in nemo_retriever/common/params/models.py
673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 | |
meta_dataframe = None
class-attribute
instance-attribute
Path to csv/json/parquet or an in-memory :class:pandas.DataFrame.
meta_fields = None
class-attribute
instance-attribute
meta_join_key = 'auto'
class-attribute
instance-attribute
How to match rows to documents: source_id (full path), source_name (basename), or auto (try both).
meta_source_field = None
class-attribute
instance-attribute
vdb_kwargs = Field(default_factory=dict)
class-attribute
instance-attribute
vdb_op = 'lancedb'
class-attribute
instance-attribute
to_ingest_operator_kwargs()
Flatten into kwargs for :class:~nemo_retriever.vdb.IngestVdbOperator.
Source code in nemo_retriever/common/params/models.py
703 704 705 706 707 708 709 710 711 | |
VideoFrameParams
Bases: _ParamsModel
Params for video frame extraction (ffmpeg fps + perceptual-hash dedup).
Set enabled=False to skip frame extraction entirely; the video
pipeline then produces only audio (ASR) rows — no frame OCR, no
audio+visual fusion. Useful for ablating the visual modality or for
audio-only recall benchmarks against video corpora.
dedup activates perceptual-hash (dhash) dedup before OCR. dhash
catches visually-identical adjacent frames that byte-level hashing
misses (encoder noise, brightness drift, etc.). On a 60s slide-heavy
sample we measured ~91% duplicates collapsed at distance 5 vs ~11%
for MD5 — a near-10x cut in OCR cost on slide content. Tune
dedup_max_hamming_distance upward for more aggressive merging or
down to 0 to require exact perceptual-hash matches.
Source code in nemo_retriever/common/params/models.py
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 | |
dedup = True
class-attribute
instance-attribute
dedup_max_dropped_frames = 2
class-attribute
instance-attribute
dedup_max_hamming_distance = 5
class-attribute
instance-attribute
enabled = True
class-attribute
instance-attribute
fps = Field(default=1.0, gt=0.0)
class-attribute
instance-attribute
max_frames = None
class-attribute
instance-attribute
VideoFrameTextDedupParams
Bases: _ParamsModel
Params for merging consecutive video_frame rows with identical OCR text.
After full-frame OCR, slides that are visible for many seconds produce a
flood of frames with the same text (image-hash dedup misses them when
encoder noise differs frame-to-frame). This stage groups by
(source_path, text) and merges adjacent runs into a single row whose
segment_start_seconds / segment_end_seconds cover the union of
the run.
Tolerance is expressed in dropped frames, not seconds, so it scales
with video_frame_fps: at runtime the dedup reads each group's
metadata.fps and converts to max_gap_seconds = max_dropped_frames / fps.
Default 2 means we bridge gaps of up to 2 missing frames in a run —
a typical safety margin for image-hash dedup leaving small holes.
Source code in nemo_retriever/common/params/models.py
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | |
enabled = True
class-attribute
instance-attribute
max_dropped_frames = 2
class-attribute
instance-attribute
WebhookParams
Bases: _ParamsModel
Configuration for the webhook notification stage.
When endpoint_url is set, selected columns from the processed batch
are serialised to JSON and HTTP-POSTed to that URL. If endpoint_url
is None the stage is a no-op.
Source code in nemo_retriever/common/params/models.py
1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 | |
columns = Field(default_factory=list)
class-attribute
instance-attribute
endpoint_url = None
class-attribute
instance-attribute
headers = Field(default_factory=dict)
class-attribute
instance-attribute
max_retries = 3
class-attribute
instance-attribute
timeout_s = 30.0
class-attribute
instance-attribute
build_embed_option_kwargs(embed_invoke_url, embed_model_name, local_ingest_embed_backend=None, embed_api_key=None, embed_model_provider_prefix=None, embed_modality=None, text_elements_modality=None, structured_elements_modality=None, embed_granularity=None, embed_workers=None, embed_batch_size=None, embed_cpus_per_actor=None, embed_gpus_per_actor=None, embed_model_revision=None)
Build EmbedParams kwargs from CLI/request option values.
Source code in nemo_retriever/common/params/utils.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
resolve_split_params(split_config)
Resolve a user-supplied split_config dict into per-key effective params.
Returns a dict keyed by every entry in SPLIT_CONFIG_VALID_KEYS. Each
value is one of: a TextChunkParams / HtmlChunkParams instance
(chunking enabled for that key), None (key absent — chunking off
via the default), or False (explicit opt-out sentinel).
Per-key values supplied by the caller may be a plain dict of
chunk-params fields, a pre-built TextChunkParams /
HtmlChunkParams instance (passed through verbatim), None, or
False.
Source code in nemo_retriever/common/params/utils.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |