NeMo Retriever API Reference¶
This page is the public Python SDK contract for NeMo Retriever Library. The generated signatures document create_ingestor() and the concrete objects it returns. They also document Retriever query and answer helpers, generation operators, and parameter models.
Import the factory and GraphIngestionError from nemo_retriever. Import generation operators from nemo_retriever.operators.generation. Import LLM client, task, and result types from nemo_retriever.models.llm.
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.
Configure at least one input source¶
Before you call .ingest(), .ingest_stream(), or .aingest_stream(),
configure at least one input source by calling .files(), .texts(), or
.buffers() with a nonempty value. Omitting input configuration or passing an
empty collection raises ValueError before pipeline execution.
A configured source can legitimately produce blank text or an empty result. For example, OCR can find no text on an image-only page. This outcome does not raise the missing-input error.
A nonempty optional glob passed to .files() also counts as a configured
source. If it matches no files, .ingest() can return an empty result, and the
streaming methods can yield no results.
Select a supported extraction method¶
ExtractParams validates method when you construct the model. For PDF
extraction, use pdfium, pdfium_hybrid, ocr, or nemotron_parse. The
audio value remains available for the legacy params-driven audio path. For
new audio pipelines, use GraphIngestor.extract_audio()
instead.
Any other value raises a Pydantic ValidationError before pipeline setup. The
error lists the supported values, so spelling and configuration errors do not
silently select another extraction path.
For local nemotron_parse extraction in NeMo Retriever Library 26.08, omit
nemotron_parse_model to use the default model, or set it to
nvidia/NVIDIA-Nemotron-Parse-v1.2. Other local model values, including
nvidia/NVIDIA-Nemotron-Parse-2.0, raise a Pydantic ValidationError before pipeline
execution. To use a remote Nemotron Parse endpoint, configure
nemotron_parse_invoke_url or invoke_url and select the model that matches
the endpoint contract.
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 Local and batch ingest in the CLI reference.
Python client (pdf_split_config): Only ServiceIngestor.pdf_split_config() records page-chunking settings in the request pipeline spec for the remote gateway. Obtain that object with create_ingestor(run_mode="service"). Local graph ingest (run_mode="inprocess" or "batch") does not implement this method. PDFs are split automatically on the default graph 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. SummarizeTask inherits from TextGenerationTask and supplies the built-in summarization prompt unless you override prompt on TextGenerationParams.
TextGenerationParams configuration¶
Construct TextGenerationParams with TextGenerationParams.from_kwargs(...). The following fields are supported.
| Field | Purpose |
|---|---|
model |
Required provider model identifier. |
api_base |
Optional OpenAI-compatible API base URL. |
api_key |
Optional credential or os.environ/<NAME> reference. Literal keys are not written to persisted graph JSON. |
temperature |
Optional sampling override. Valid values are 0.0 through 2.0. |
top_p |
Optional sampling override. Valid values are 0.0 through 1.0. |
max_tokens |
Optional positive token-limit override. Omit the field to inherit the task default. |
extra_params |
Optional provider-specific request keys. Dedicated fields such as model, messages, sampling, and credentials must not be duplicated here. |
num_retries |
Transport retry count. The default is 3. The value must be 0 or greater. |
timeout |
Transport timeout in seconds. The default is 120.0. The value must be greater than 0. |
prompt |
Optional user prompt or prompt template. GenericGenerationOperator requires this field. |
system_prompt |
Optional system prompt. |
rag_system_prompt |
Optional retrieval-augmented generation (RAG) system prompt. |
rag_system_prompt_prefix |
Optional prefix applied to the RAG system prompt. |
reasoning_enabled |
Optional reasoning toggle. When unset, transport reasoning defaults to true. |
max_workers |
Concurrent row workers. The default is 8. The value must be 1 or greater. |
Sampling fields that you omit inherit the task defaults. temperature, top_p, and max_tokens are applied only when you pass them explicitly.
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.
Generated signatures for TextGenerationOperator, GenericGenerationOperator, and SummarizationOperator appear in Generation operators. Generated signatures for TextGenerationTask, LiteLLMClient, LLMClient, AnswerJudge, AnswerResult, and related types appear in LLM clients, tasks, and results. Retriever.answer() requires an LLMClient and returns AnswerResult.
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",
)
For LiteLLM nvidia_nim/... models, including the default LiteLLMClient and LLMJudge models, use os.environ/NVIDIA_API_KEY. Refer to Authentication and API keys.
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.
Generated Python API¶
The signatures below are the supported public ingest, retrieve, generation, and parameter surfaces. Private helpers, module loggers, and duplicate re-exports are omitted.
Use the following public import paths:
- Import
create_ingestorandGraphIngestionErrorfromnemo_retriever. - Import
GraphIngestorfromnemo_retriever.ingestor.graph_ingestor. - Import
ServiceIngestorfromnemo_retriever.service.service_ingestor. - Import generation operators from
nemo_retriever.operators.generation. - Import LLM client, task, and result types from
nemo_retriever.models.llm. - Import parameter models from
nemo_retriever.common.params. - Import
RetrieveVdbOperatorfromnemo_retriever.operators.vdb. - Import
NemotronRerankActorfromnemo_retriever.operators.rerank.
Public ingestion factory¶
create_ingestor() returns a concrete ingestion client from run_mode. The supported values are inprocess, batch, and service.
run_mode |
Runtime type | Execution |
|---|---|---|
inprocess |
GraphIngestor |
Local in-process graph. This is the default. |
batch |
GraphIngestor |
Ray Data graph. |
service |
ServiceIngestor |
Remote Retriever service. |
The function is annotated as returning the shared Ingestor interface. At runtime it returns GraphIngestor or ServiceIngestor. Use the generated class entries below for run-mode-specific methods.
Factory keyword arguments merge into IngestorCreateParams. Common fields include documents, base_url, api_key, error_policy, ray_address, and max_concurrency. Refer to IngestorCreateParams in Parameter models.
from nemo_retriever import GraphIngestionError, create_ingestor
graph = create_ingestor(run_mode="inprocess")
batch = create_ingestor(run_mode="batch")
service = create_ingestor(run_mode="service", base_url="http://localhost:7670")
nemo_retriever.ingestor.core.create_ingestor(*, run_mode='inprocess', params=None, **kwargs)
¶
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 | |
Graph ingest¶
create_ingestor(run_mode="inprocess") and create_ingestor(run_mode="batch") return GraphIngestor. Import the class from nemo_retriever.ingestor.graph_ingestor when you need the type explicitly. Import GraphIngestionError from nemo_retriever.
GraphIngestor methods include extract_html(), extract_audio(), extract_video(), get_error_rows(), and get_dataset(). get_error_rows() filters rows that contain stage error payloads from a pandas DataFrame or Ray Dataset. If you omit dataset, it uses the dataset retained from the last ingest() call. get_dataset() returns that retained dataset.
nemo_retriever.ingestor.graph_ingestor.GraphIngestor
¶
Bases: ingestor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_mode
|
str
|
|
'inprocess'
|
ray_address
|
Optional[str]
|
Ray cluster address. |
None
|
batch_size
|
int
|
Default |
1
|
num_cpus
|
float
|
Default CPU resources per operator node (batch mode). |
1
|
num_gpus
|
float
|
Default GPU resources per operator node (batch mode). |
0
|
node_overrides
|
Optional[Dict[str, Dict[str, Any]]]
|
Per-node resource/batching overrides forwarded to
:class: |
None
|
show_progress
|
bool
|
Show a tqdm progress bar when running in inprocess mode. |
True
|
error_policy
|
str
|
|
'raise'
|
Source code in nemo_retriever/ingestor/graph_ingestor.py
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 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 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 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 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 848 849 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 905 906 907 908 909 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 973 974 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 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 | |
RUN_MODE = 'graph'
class-attribute
instance-attribute
¶
files(documents)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
526 527 528 529 | |
texts(texts)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
531 532 533 534 535 536 537 538 539 540 541 | |
buffers(buffers)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 | |
extract(params=None, *, split_config=None, extraction_mode=None, text_params=None, html_params=None, audio_chunk_params=None, asr_params=None, video_frame_params=None, video_text_dedup_params=None, av_fuse_params=None, **kwargs)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
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 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 | |
extract_image_files(params=None, *, split_config=None, **kwargs)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
624 625 626 627 628 629 630 631 632 633 634 635 636 | |
extract_html(params=None, **kwargs)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
638 639 640 641 642 643 | |
extract_audio(params=None, *, asr_params=None, split_config=None, **kwargs)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 | |
extract_video(params=None, *, asr_params=None, video_frame_params=None, video_text_dedup_params=None, av_fuse_params=None, extract_params=None, split_config=None, **kwargs)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
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 | |
dedup(params=None, **kwargs)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
708 709 710 711 712 | |
caption(params=None, **kwargs)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
714 715 716 717 718 | |
store(params=None, **kwargs)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
720 721 722 723 724 | |
embed(params=None, **kwargs)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
726 727 728 729 730 | |
vdb_upload(params=None, **kwargs)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
732 733 734 735 736 737 738 739 740 741 742 | |
webhook(params=None, **kwargs)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
744 745 746 747 748 749 750 751 752 | |
ingest(params=None, **kwargs)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
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 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 | |
extract_error_rows(batch)
staticmethod
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 | |
get_error_rows(dataset=None)
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 | |
get_dataset()
¶
Source code in nemo_retriever/ingestor/graph_ingestor.py
1394 1395 | |
nemo_retriever.ingestor.graph_ingestor.GraphIngestionError
¶
Bases: RuntimeError
Source code in nemo_retriever/ingestor/graph_ingestor.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
Service ingest¶
create_ingestor(run_mode="service") returns ServiceIngestor. Import the class from nemo_retriever.service.service_ingestor. ingest() returns ServiceIngestResult.
Service-only methods include split(), pdf_split_config(), save_to_disk(), ingest_stream(), aingest_stream(), and cancel(). cancel() is part of the public class. It currently raises NotImplementedError because the service does not expose a cancel endpoint.
nemo_retriever.service.service_ingestor.ServiceIngestor
¶
Bases: ingestor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_url
|
str
|
Base URL of the retriever service (default |
'http://localhost:7670'
|
documents
|
Optional[List[str]]
|
Initial list of file paths to ingest; may also be set/extended via
:meth: |
None
|
max_concurrency
|
int
|
Maximum concurrent document uploads (default 8). |
8
|
request_timeout_s
|
float
|
Per-request HTTP timeout (default 600s for large documents). |
600.0
|
api_token
|
str | None
|
Optional bearer token for service authentication. |
None
|
Source code in nemo_retriever/service/service_ingestor.py
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 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 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 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 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 848 849 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 905 906 907 908 909 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 973 974 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 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 | |
RUN_MODE = 'service'
class-attribute
instance-attribute
¶
files(documents)
¶
Source code in nemo_retriever/service/service_ingestor.py
614 615 616 617 618 619 620 | |
texts(texts)
¶
Source code in nemo_retriever/service/service_ingestor.py
622 623 624 625 | |
buffers(buffers)
¶
Source code in nemo_retriever/service/service_ingestor.py
627 628 629 630 631 632 633 634 635 636 637 638 639 640 | |
load()
¶
Source code in nemo_retriever/service/service_ingestor.py
642 643 644 | |
all_tasks()
¶
Source code in nemo_retriever/service/service_ingestor.py
650 651 652 653 654 655 656 657 658 659 660 | |
dedup(params=None, **kwargs)
¶
Source code in nemo_retriever/service/service_ingestor.py
662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 | |
embed(params=None, **kwargs)
¶
Source code in nemo_retriever/service/service_ingestor.py
678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 | |
extract(params=None, *, split_config=None, extraction_mode='auto', **kwargs)
¶
Source code in nemo_retriever/service/service_ingestor.py
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 | |
extract_image_files(params=None, *, split_config=None, **kwargs)
¶
Source code in nemo_retriever/service/service_ingestor.py
734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 | |
filter()
¶
Source code in nemo_retriever/service/service_ingestor.py
755 756 757 758 | |
split(params=None, **kwargs)
¶
Source code in nemo_retriever/service/service_ingestor.py
760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 | |
pdf_split_config(pages_per_chunk=32)
¶
Source code in nemo_retriever/service/service_ingestor.py
777 778 779 780 781 782 783 784 785 | |
store(params=None, **kwargs)
¶
Source code in nemo_retriever/service/service_ingestor.py
791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 | |
store_embed()
¶
Source code in nemo_retriever/service/service_ingestor.py
816 817 818 819 820 821 822 823 824 | |
udf(udf_function, udf_function_name=None, phase=None, target_stage=None, run_before=False, run_after=False)
¶
Source code in nemo_retriever/service/service_ingestor.py
826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 | |
vdb_upload(params=None, **kwargs)
¶
Source code in nemo_retriever/service/service_ingestor.py
847 848 849 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 | |
save_intermediate_results(output_dir)
¶
Source code in nemo_retriever/service/service_ingestor.py
966 967 968 969 970 971 972 973 974 975 976 | |
save_to_disk(output_directory=None, cleanup=True, compression='gzip')
¶
Source code in nemo_retriever/service/service_ingestor.py
978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 | |
caption(params=None, **kwargs)
¶
Source code in nemo_retriever/service/service_ingestor.py
1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 | |
webhook(params=None, **kwargs)
¶
Source code in nemo_retriever/service/service_ingestor.py
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 | |
ingest(params=None, **kwargs)
¶
Source code in nemo_retriever/service/service_ingestor.py
1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 | |
ingest_stream(*, retain_results=False, result_schema='legacy', return_embeddings=False, return_images=False)
¶
Source code in nemo_retriever/service/service_ingestor.py
1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 | |
aingest_stream(*, retain_results=False, result_schema='legacy', return_embeddings=False, return_images=False)
async
¶
Source code in nemo_retriever/service/service_ingestor.py
1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 | |
ingest_async(*, return_failures=False, return_traces=False, return_results=True, result_schema='legacy', return_embeddings=False, return_images=False)
¶
Source code in nemo_retriever/service/service_ingestor.py
1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 | |
get_status()
¶
Source code in nemo_retriever/service/service_ingestor.py
1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 | |
completed_jobs()
¶
Source code in nemo_retriever/service/service_ingestor.py
1582 1583 | |
failed_jobs()
¶
Source code in nemo_retriever/service/service_ingestor.py
1585 1586 | |
cancelled_jobs()
¶
Source code in nemo_retriever/service/service_ingestor.py
1588 1589 | |
remaining_jobs()
¶
Source code in nemo_retriever/service/service_ingestor.py
1591 1592 | |
cancel(job_id=None)
¶
Source code in nemo_retriever/service/service_ingestor.py
1598 1599 1600 1601 1602 | |
nemo_retriever.service.service_ingestor.ServiceIngestResult
¶
Bases: list
Attributes:
| Name | Type | Description |
|---|---|---|
job_id |
str | None
|
The server-assigned job aggregate id for this |
failures |
list[tuple[str, str]]
|
|
document_ids |
list[str]
|
Document identifiers returned by the server, in upload order. |
document_filenames |
dict[str, str]
|
Mapping from server document id to the source filename submitted for that document. |
elapsed_s |
float
|
Wall-clock seconds from first upload to last result. |
job_status |
str | None
|
Final aggregate status reported by the server
( |
trace_id |
str | None
|
Trace id returned by the server on the |
dataframe |
Any
|
When :meth: |
Source code in nemo_retriever/service/service_ingestor.py
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 | |
job_id = None
instance-attribute
¶
failures = []
instance-attribute
¶
document_ids = []
instance-attribute
¶
document_filenames = {}
instance-attribute
¶
elapsed_s = 0.0
instance-attribute
¶
job_status = None
instance-attribute
¶
trace_id = None
instance-attribute
¶
dataframe = None
instance-attribute
¶
Retrieve¶
Retriever embeds queries, retrieves from a vector database, and can rerank results. Pass embed_kwargs that match EmbedParams, vdb_kwargs for RetrieveVdbOperator, and rerank_kwargs for NemotronRerankActor.
Retriever.answer() requires an LLMClient and returns AnswerResult. Pass an AnswerJudge only when you also pass reference. Those types are documented in LLM clients, tasks, and results.
Retriever.pipeline() returns RetrieverPipelineBuilder. generate() accepts a LiteLLMClient instance or model= keyword arguments. judge() accepts an LLMJudge instance or model= keyword arguments.
The package exports nemo_retriever.retriever as a default Retriever() instance. Construct Retriever directly when you need a configured object.
nemo_retriever.graph.retriever.Retriever
dataclass
¶
Source code in nemo_retriever/graph/retriever.py
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 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 | |
run_mode = 'local'
class-attribute
instance-attribute
¶
top_k = 10
class-attribute
instance-attribute
¶
rerank = False
class-attribute
instance-attribute
¶
graph = None
class-attribute
instance-attribute
¶
embed_kwargs = field(default_factory=dict)
class-attribute
instance-attribute
¶
vdb_kwargs = field(default_factory=dict)
class-attribute
instance-attribute
¶
rerank_kwargs = field(default_factory=dict)
class-attribute
instance-attribute
¶
query(query, *, top_k=None, candidate_k=None, page_dedup=False, content_types=None, vdb_kwargs=None, embed_kwargs=None)
¶
Source code in nemo_retriever/graph/retriever.py
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 | |
queries(queries, *, top_k=None, candidate_k=None, page_dedup=False, content_types=None, vdb_kwargs=None, embed_kwargs=None)
¶
Source code in nemo_retriever/graph/retriever.py
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 | |
retrieve(query, top_k=None, *, vdb_kwargs=None, embed_kwargs=None)
¶
Source code in nemo_retriever/graph/retriever.py
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 | |
retrieve_batch(queries, *, top_k=None, vdb_kwargs=None, embed_kwargs=None)
¶
Source code in nemo_retriever/graph/retriever.py
541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 | |
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
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 597 598 599 600 601 602 603 604 605 606 607 608 609 | |
pipeline(*, top_k=None)
¶
Source code in nemo_retriever/graph/retriever.py
611 612 613 | |
generate_sql(query)
¶
Source code in nemo_retriever/graph/retriever.py
615 616 617 618 | |
nemo_retriever.graph.retriever.RetrieverPipelineBuilder
¶
Source code in nemo_retriever/graph/retriever.py
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 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 | |
with_retrieval(*, top_k)
¶
Source code in nemo_retriever/graph/retriever.py
643 644 645 646 | |
generate(llm=None, /, *, model=None, **kwargs)
¶
Raises:
| Type | Description |
|---|---|
ValueError
|
If neither |
Source code in nemo_retriever/graph/retriever.py
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 | |
score()
¶
Source code in nemo_retriever/graph/retriever.py
695 696 697 698 699 700 | |
judge(judge=None, /, *, model=None, **kwargs)
¶
Raises:
| Type | Description |
|---|---|
ValueError
|
If neither |
Source code in nemo_retriever/graph/retriever.py
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 | |
run(queries, *, reference=None)
¶
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
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 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 | |
Generation operators¶
Import these classes from nemo_retriever.operators.generation. Usage notes and parameter-field tables appear in One-shot text generation.
nemo_retriever.operators.generation.TextGenerationOperator
¶
Bases: AbstractOperator, CPUOperator
Source code in nemo_retriever/operators/generation/base.py
31 32 33 34 35 36 37 38 39 40 41 42 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 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 | |
required_columns = tuple(dict.fromkeys(logical_columns.values()))
class-attribute
instance-attribute
¶
output_columns = output_columns
class-attribute
instance-attribute
¶
get_constructor_kwargs()
¶
Source code in nemo_retriever/operators/generation/base.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | |
preprocess(data, **kwargs)
¶
Source code in nemo_retriever/operators/generation/base.py
234 235 236 | |
process(data, **kwargs)
¶
Source code in nemo_retriever/operators/generation/base.py
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 | |
postprocess(data, **kwargs)
¶
Source code in nemo_retriever/operators/generation/base.py
334 335 | |
nemo_retriever.operators.generation.GenericGenerationOperator
¶
Bases: TextGenerationOperator
Source code in nemo_retriever/operators/generation/generic.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
nemo_retriever.operators.generation.SummarizationOperator
¶
Bases: TextGenerationOperator
Source code in nemo_retriever/operators/generation/summarization.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | |
LLM clients, tasks, and results¶
Import these names from nemo_retriever.models.llm. That package path is the supported public import. LiteLLMClient and LLMJudge load from implementation submodules. Import those classes from nemo_retriever.models.llm. Use from_kwargs() for a flat constructor.
nemo_retriever.models.llm
¶
AnswerJudge
¶
Bases: Protocol
Source code in nemo_retriever/models/llm/types.py
71 72 73 74 75 | |
judge(query, reference, candidate)
¶
Source code in nemo_retriever/models/llm/types.py
75 | |
AnswerRequest
¶
Bases: BaseModel
Source code in nemo_retriever/models/llm/types.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
model_config = ConfigDict(extra='forbid')
class-attribute
instance-attribute
¶
query
instance-attribute
¶
top_k = Field(default=5, ge=1)
class-attribute
instance-attribute
¶
reasoning_enabled = None
class-attribute
instance-attribute
¶
reference = None
class-attribute
instance-attribute
¶
judge_enabled = False
class-attribute
instance-attribute
¶
AnswerResult
¶
Bases: BaseModel
Attributes:
| Name | Type | Description |
|---|---|---|
query |
str
|
The question that was answered. |
answer |
str
|
The generated answer text. |
chunks |
Optional[list[str]]
|
Retrieved chunk texts used as context, in rank order. |
metadata |
Optional[list[dict[str, Any]]]
|
Per-chunk metadata (source, page_number, etc.), aligned
with |
model |
str
|
Model identifier that produced |
latency_s |
float
|
Wall-clock latency of the generation call in seconds. |
chunk_count |
int
|
Number of retrieved chunks used for generation. |
error |
Optional[str]
|
Non-None when generation failed. Scoring and judge are
skipped when |
judge_score |
Optional[float]
|
ragas AnswerAccuracy Tier-3 score (0.0-1.0) when a judge was run. |
judge_reasoning |
Optional[str]
|
Empty -- AnswerAccuracy emits only a numeric rating. |
judge_error |
Optional[str]
|
Non-None when the judge call failed. |
token_f1 |
Optional[float]
|
Tier-2 token-level F1 between |
exact_match |
Optional[bool]
|
Tier-2 normalised exact-match flag. |
answer_in_context |
Optional[bool]
|
Tier-1 flag -- True if at least half of the reference answer's content words appear in the retrieved chunks. |
failure_mode |
Optional[str]
|
Classification produced by
:func: |
Source code in nemo_retriever/models/llm/types.py
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 | |
model_config = ConfigDict(extra='forbid')
class-attribute
instance-attribute
¶
query
instance-attribute
¶
answer
instance-attribute
¶
model
instance-attribute
¶
latency_s
instance-attribute
¶
chunk_count
instance-attribute
¶
chunks = None
class-attribute
instance-attribute
¶
metadata = None
class-attribute
instance-attribute
¶
error = None
class-attribute
instance-attribute
¶
judge_score = None
class-attribute
instance-attribute
¶
judge_reasoning = None
class-attribute
instance-attribute
¶
judge_error = None
class-attribute
instance-attribute
¶
token_f1 = None
class-attribute
instance-attribute
¶
exact_match = None
class-attribute
instance-attribute
¶
answer_in_context = None
class-attribute
instance-attribute
¶
failure_mode = None
class-attribute
instance-attribute
¶
GeneratedTextResult
dataclass
¶
Source code in nemo_retriever/models/llm/types.py
127 128 129 130 131 132 133 134 | |
GenerationRequest
dataclass
¶
Source code in nemo_retriever/models/llm/types.py
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 | |
GenerationResult
dataclass
¶
Source code in nemo_retriever/models/llm/types.py
86 87 88 89 90 91 92 93 | |
GenerationTaskError
¶
Bases: RuntimeError
Source code in nemo_retriever/models/llm/tasks/base.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
GenericPromptTask
dataclass
¶
Bases: TextGenerationTask
Source code in nemo_retriever/models/llm/tasks/generic.py
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 105 106 107 108 109 110 | |
prompt
instance-attribute
¶
required_inputs
instance-attribute
¶
system_prompt
instance-attribute
¶
reasoning_enabled
instance-attribute
¶
build_request(**inputs)
¶
Source code in nemo_retriever/models/llm/tasks/generic.py
94 95 96 97 98 99 100 101 102 103 104 105 106 | |
parse(raw_text)
¶
Source code in nemo_retriever/models/llm/tasks/generic.py
108 109 110 | |
JudgeResult
dataclass
¶
Source code in nemo_retriever/models/llm/types.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 | |
LLMClient
¶
Bases: Protocol
Source code in nemo_retriever/models/llm/types.py
30 31 32 33 34 35 36 37 38 39 40 | |
generate(query, chunks, *, reasoning_enabled=None)
¶
Source code in nemo_retriever/models/llm/types.py
34 35 36 37 38 39 40 | |
RagAnswerTask
dataclass
¶
Bases: TextGenerationTask
Source code in nemo_retriever/models/llm/tasks/rag_answer.py
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 | |
prompt = None
class-attribute
instance-attribute
¶
system_prompt = None
class-attribute
instance-attribute
¶
system_prompt_prefix = None
class-attribute
instance-attribute
¶
reasoning_enabled = None
class-attribute
instance-attribute
¶
required_inputs = ('query', 'chunks')
class-attribute
¶
empty_output_error = 'thinking_truncated'
class-attribute
¶
build_request(**inputs)
¶
Source code in nemo_retriever/models/llm/tasks/rag_answer.py
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 | |
parse(raw_text)
¶
Source code in nemo_retriever/models/llm/tasks/rag_answer.py
162 163 164 | |
RetrievalResult
dataclass
¶
Source code in nemo_retriever/models/llm/types.py
78 79 80 81 82 83 | |
RetrieverStrategy
¶
Bases: Protocol
Source code in nemo_retriever/models/llm/types.py
23 24 25 26 27 | |
retrieve(query, top_k)
¶
Source code in nemo_retriever/models/llm/types.py
27 | |
SummarizeTask
dataclass
¶
Bases: TextGenerationTask
Source code in nemo_retriever/models/llm/tasks/summarize.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 85 86 87 | |
prompt = None
class-attribute
instance-attribute
¶
system_prompt = None
class-attribute
instance-attribute
¶
reasoning_enabled = None
class-attribute
instance-attribute
¶
required_inputs = ('text',)
class-attribute
¶
build_request(**inputs)
¶
Source code in nemo_retriever/models/llm/tasks/summarize.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
parse(raw_text)
¶
Source code in nemo_retriever/models/llm/tasks/summarize.py
85 86 87 | |
TextCompletionClient
¶
Bases: Protocol
Source code in nemo_retriever/models/llm/types.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
model
property
¶
complete(messages, max_tokens=None, extra_params=None)
¶
Source code in nemo_retriever/models/llm/types.py
57 58 59 60 61 62 63 64 | |
TextGenerationTask
¶
Bases: ABC
Source code in nemo_retriever/models/llm/tasks/base.py
42 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 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 | |
required_inputs = ()
class-attribute
instance-attribute
¶
empty_output_error = 'empty_output'
class-attribute
¶
default_sampling
property
¶
build_request(**inputs)
abstractmethod
¶
Source code in nemo_retriever/models/llm/tasks/base.py
58 59 60 | |
parse(raw_text)
¶
Source code in nemo_retriever/models/llm/tasks/base.py
62 63 64 | |
invoke(client, **inputs)
¶
Source code in nemo_retriever/models/llm/tasks/base.py
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 | |
execute(client, **inputs)
¶
Source code in nemo_retriever/models/llm/tasks/base.py
196 197 198 199 200 201 202 203 204 205 206 | |
nemo_retriever.models.llm.clients.litellm.LiteLLMClient
¶
Source code in nemo_retriever/models/llm/clients/litellm.py
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 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 | |
supports_concurrent_calls = True
class-attribute
instance-attribute
¶
transport = transport
instance-attribute
¶
sampling = sampling if sampling is not None else LLMInferenceParams(temperature=0.0, max_tokens=4096)
instance-attribute
¶
model
property
¶
from_kwargs(*, model=_DEFAULT_MODEL, api_base=None, api_key=None, temperature=0.0, top_p=None, max_tokens=4096, extra_params=None, num_retries=3, timeout=120.0, rag_system_prompt=None, rag_system_prompt_prefix=None, reasoning_enabled=True)
classmethod
¶
Source code in nemo_retriever/models/llm/clients/litellm.py
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 | |
complete(messages, max_tokens=None, extra_params=None)
¶
Source code in nemo_retriever/models/llm/clients/litellm.py
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 | |
generate(query, chunks, *, reasoning_enabled=None)
¶
Source code in nemo_retriever/models/llm/clients/litellm.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | |
nemo_retriever.models.llm.clients.judge.LLMJudge
¶
Source code in nemo_retriever/models/llm/clients/judge.py
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 | |
transport = transport
instance-attribute
¶
sampling = sampling if sampling is not None else self._DEFAULT_SAMPLING
instance-attribute
¶
model
property
¶
from_kwargs(*, model=_DEFAULT_MODEL, api_base=None, api_key=None, extra_params=None, num_retries=3, timeout=120.0, temperature=None, max_tokens=None)
classmethod
¶
Source code in nemo_retriever/models/llm/clients/judge.py
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 | |
judge(query, reference, candidate)
¶
Source code in nemo_retriever/models/llm/clients/judge.py
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | |
Parameter models¶
nemo_retriever.common.params
¶
IngestorRunMode = Literal['inprocess', 'batch', 'service']
module-attribute
¶
NO_API_KEY = ''
module-attribute
¶
MetaJoinKey = Literal['auto', 'source_id', 'source_name']
module-attribute
¶
SPLIT_CONFIG_VALID_KEYS = frozenset({'text', 'html', 'pdf', 'audio', 'image', 'video'})
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
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | |
audio_endpoints = (None, None)
class-attribute
instance-attribute
¶
audio_infer_protocol = 'grpc'
class-attribute
instance-attribute
¶
audio_infer_mode = 'auto'
class-attribute
instance-attribute
¶
function_id = None
class-attribute
instance-attribute
¶
auth_token = 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
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | |
AudioVisualFuseParams
¶
Bases: _ParamsModel
Toggle for :class:~nemo_retriever.video.AudioVisualFuser.
Source code in nemo_retriever/common/params/models.py
454 455 456 457 | |
enabled = True
class-attribute
instance-attribute
¶
BatchTuningParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
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 | |
debug_run_id = 'unknown'
class-attribute
instance-attribute
¶
pdf_split_batch_size = 1
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
¶
page_elements_batch_size = 24
class-attribute
instance-attribute
¶
detect_batch_size = 24
class-attribute
instance-attribute
¶
ocr_inference_batch_size = None
class-attribute
instance-attribute
¶
page_elements_workers = None
class-attribute
instance-attribute
¶
ocr_workers = None
class-attribute
instance-attribute
¶
detect_workers = None
class-attribute
instance-attribute
¶
page_elements_cpus_per_actor = 1
class-attribute
instance-attribute
¶
ocr_cpus_per_actor = 1
class-attribute
instance-attribute
¶
table_structure_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
¶
embed_workers = None
class-attribute
instance-attribute
¶
embed_batch_size = 32
class-attribute
instance-attribute
¶
embed_cpus_per_actor = 1
class-attribute
instance-attribute
¶
gpu_page_elements = None
class-attribute
instance-attribute
¶
gpu_ocr = None
class-attribute
instance-attribute
¶
gpu_table_structure = None
class-attribute
instance-attribute
¶
gpu_embed = None
class-attribute
instance-attribute
¶
nemotron_parse_workers = None
class-attribute
instance-attribute
¶
gpu_nemotron_parse = None
class-attribute
instance-attribute
¶
nemotron_parse_batch_size = None
class-attribute
instance-attribute
¶
store_workers = None
class-attribute
instance-attribute
¶
inference_batch_size = 8
class-attribute
instance-attribute
¶
CaptionParams
¶
Bases: LLMInferenceParams
Source code in nemo_retriever/common/params/models.py
997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 | |
endpoint_url = 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
¶
api_key = None
class-attribute
instance-attribute
¶
prompt = 'Caption the content of this image:'
class-attribute
instance-attribute
¶
system_prompt = '/no_think'
class-attribute
instance-attribute
¶
batch_size = 8
class-attribute
instance-attribute
¶
device = None
class-attribute
instance-attribute
¶
hf_cache_dir = None
class-attribute
instance-attribute
¶
context_text_max_chars = 0
class-attribute
instance-attribute
¶
tensor_parallel_size = 1
class-attribute
instance-attribute
¶
gpu_memory_utilization = Field(default=None, gt=0, le=1, description='Fraction of GPU memory reserved for local vLLM captioning; defaults to the model profile.')
class-attribute
instance-attribute
¶
caption_infographics = False
class-attribute
instance-attribute
¶
extra_body = Field(default_factory=dict)
class-attribute
instance-attribute
¶
ChartParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
778 779 780 781 | |
DedupParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
1046 1047 1048 1049 | |
EmbedParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
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 | |
model_name = None
class-attribute
instance-attribute
¶
embedding_endpoint = None
class-attribute
instance-attribute
¶
embed_invoke_url = None
class-attribute
instance-attribute
¶
embed_model_name = None
class-attribute
instance-attribute
¶
embed_model_revision = None
class-attribute
instance-attribute
¶
embed_model_provider_prefix = None
class-attribute
instance-attribute
¶
api_key = None
class-attribute
instance-attribute
¶
input_type = 'passage'
class-attribute
instance-attribute
¶
embed_modality = 'text'
class-attribute
instance-attribute
¶
embed_granularity = 'element'
class-attribute
instance-attribute
¶
text_elements_modality = None
class-attribute
instance-attribute
¶
structured_elements_modality = None
class-attribute
instance-attribute
¶
text_column = 'text'
class-attribute
instance-attribute
¶
inference_batch_size = 32
class-attribute
instance-attribute
¶
output_column = 'text_embeddings_1b_v2'
class-attribute
instance-attribute
¶
embedding_dim_column = 'text_embeddings_1b_v2_dim'
class-attribute
instance-attribute
¶
has_embedding_column = 'text_embeddings_1b_v2_has_embedding'
class-attribute
instance-attribute
¶
embed_output_column = 'text_embeddings_1b_v2'
class-attribute
instance-attribute
¶
embed_inference_batch_size = 16
class-attribute
instance-attribute
¶
local_ingest_embed_backend = 'vllm'
class-attribute
instance-attribute
¶
query_max_length = 128
class-attribute
instance-attribute
¶
dimensions = None
class-attribute
instance-attribute
¶
nim_http_max_concurrent = 32
class-attribute
instance-attribute
¶
request_timeout_s = 600.0
class-attribute
instance-attribute
¶
runtime = Field(default_factory=ModelRuntimeParams)
class-attribute
instance-attribute
¶
batch_tuning = Field(default_factory=BatchTuningParams)
class-attribute
instance-attribute
¶
ExtractParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
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 597 598 599 600 601 602 603 604 605 | |
extract_text = True
class-attribute
instance-attribute
¶
extract_images = True
class-attribute
instance-attribute
¶
extract_tables = True
class-attribute
instance-attribute
¶
extract_charts = True
class-attribute
instance-attribute
¶
extract_infographics = False
class-attribute
instance-attribute
¶
extract_page_as_image = True
class-attribute
instance-attribute
¶
method = Field(default='pdfium', description="Extraction method. PDF extraction supports 'pdfium', 'pdfium_hybrid', 'ocr', and 'nemotron_parse'; 'audio' is retained for the legacy params-driven audio path.")
class-attribute
instance-attribute
¶
use_page_elements = True
class-attribute
instance-attribute
¶
use_table_structure = False
class-attribute
instance-attribute
¶
table_output_format = None
class-attribute
instance-attribute
¶
dpi = 200
class-attribute
instance-attribute
¶
image_format = 'jpeg'
class-attribute
instance-attribute
¶
jpeg_quality = 100
class-attribute
instance-attribute
¶
render_mode = 'fit_to_model'
class-attribute
instance-attribute
¶
inference_batch_size = 8
class-attribute
instance-attribute
¶
ocr_model_dir = None
class-attribute
instance-attribute
¶
ocr_version = 'v2'
class-attribute
instance-attribute
¶
ocr_lang = None
class-attribute
instance-attribute
¶
invoke_url = None
class-attribute
instance-attribute
¶
api_key = None
class-attribute
instance-attribute
¶
request_timeout_s = 60.0
class-attribute
instance-attribute
¶
page_elements_invoke_url = None
class-attribute
instance-attribute
¶
page_elements_api_key = None
class-attribute
instance-attribute
¶
page_elements_request_timeout_s = None
class-attribute
instance-attribute
¶
ocr_invoke_url = None
class-attribute
instance-attribute
¶
ocr_api_key = None
class-attribute
instance-attribute
¶
ocr_request_timeout_s = None
class-attribute
instance-attribute
¶
table_structure_invoke_url = None
class-attribute
instance-attribute
¶
nemotron_parse_invoke_url = None
class-attribute
instance-attribute
¶
nemotron_parse_model = None
class-attribute
instance-attribute
¶
output_column = 'page_elements_v3'
class-attribute
instance-attribute
¶
num_detections_column = 'page_elements_v3_num_detections'
class-attribute
instance-attribute
¶
counts_by_label_column = 'page_elements_v3_counts_by_label'
class-attribute
instance-attribute
¶
remote_retry = Field(default_factory=RemoteRetryParams)
class-attribute
instance-attribute
¶
batch_tuning = Field(default_factory=BatchTuningParams)
class-attribute
instance-attribute
¶
GpuAllocationParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
508 509 510 | |
HtmlChunkParams
¶
Bases: TextChunkParams
Source code in nemo_retriever/common/params/models.py
358 359 | |
IngestExecuteParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 | |
show_progress = False
class-attribute
instance-attribute
¶
return_failures = False
class-attribute
instance-attribute
¶
return_traces = False
class-attribute
instance-attribute
¶
return_results = True
class-attribute
instance-attribute
¶
result_schema = 'legacy'
class-attribute
instance-attribute
¶
return_embeddings = False
class-attribute
instance-attribute
¶
return_images = False
class-attribute
instance-attribute
¶
parallel = False
class-attribute
instance-attribute
¶
max_workers = None
class-attribute
instance-attribute
¶
gpu_devices = Field(default_factory=list)
class-attribute
instance-attribute
¶
page_chunk_size = 32
class-attribute
instance-attribute
¶
runtime_metrics_dir = None
class-attribute
instance-attribute
¶
runtime_metrics_prefix = None
class-attribute
instance-attribute
¶
IngestorCreateParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
313 314 315 316 317 318 319 320 321 322 323 324 325 326 | |
documents = Field(default_factory=list)
class-attribute
instance-attribute
¶
ray_address = None
class-attribute
instance-attribute
¶
ray_log_to_driver = True
class-attribute
instance-attribute
¶
debug = False
class-attribute
instance-attribute
¶
base_url = 'http://localhost:7670'
class-attribute
instance-attribute
¶
allow_no_gpu = False
class-attribute
instance-attribute
¶
node_overrides = None
class-attribute
instance-attribute
¶
api_key = None
class-attribute
instance-attribute
¶
error_policy = 'raise'
class-attribute
instance-attribute
¶
max_concurrency = None
class-attribute
instance-attribute
¶
LanceDbParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 | |
lancedb_uri = 'lancedb'
class-attribute
instance-attribute
¶
table_name = 'nv-ingest'
class-attribute
instance-attribute
¶
overwrite = True
class-attribute
instance-attribute
¶
create_index = True
class-attribute
instance-attribute
¶
index_type = 'IVF_HNSW_SQ'
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
¶
embedding_column = 'text_embeddings_1b_v2'
class-attribute
instance-attribute
¶
embedding_key = 'embedding'
class-attribute
instance-attribute
¶
include_text = True
class-attribute
instance-attribute
¶
text_column = 'text'
class-attribute
instance-attribute
¶
hybrid = False
class-attribute
instance-attribute
¶
fts_language = 'English'
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
784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 | |
temperature = 1.0
class-attribute
instance-attribute
¶
top_p = None
class-attribute
instance-attribute
¶
max_tokens = 1024
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
816 817 818 819 820 821 822 823 824 825 826 827 828 | |
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
831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 | |
model
instance-attribute
¶
api_base = None
class-attribute
instance-attribute
¶
api_key = None
class-attribute
instance-attribute
¶
num_retries = 3
class-attribute
instance-attribute
¶
timeout = 120.0
class-attribute
instance-attribute
¶
extra_params = Field(default_factory=dict)
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
¶
LLMSamplingOverrides
¶
Bases: _ParamsModel
Partial sampling overrides resolved on top of task-specific defaults.
Source code in nemo_retriever/common/params/models.py
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 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 | |
temperature = None
class-attribute
instance-attribute
¶
top_p = None
class-attribute
instance-attribute
¶
max_tokens = None
class-attribute
instance-attribute
¶
resolve(defaults)
¶
Apply explicitly supplied fields to defaults.
Source code in nemo_retriever/common/params/models.py
920 921 922 923 924 925 926 | |
ModelRuntimeParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
303 304 305 306 307 308 309 310 | |
device = None
class-attribute
instance-attribute
¶
hf_cache_dir = None
class-attribute
instance-attribute
¶
normalize = True
class-attribute
instance-attribute
¶
max_length = 8192
class-attribute
instance-attribute
¶
model_name = None
class-attribute
instance-attribute
¶
gpu_memory_utilization = 0.45
class-attribute
instance-attribute
¶
enforce_eager = False
class-attribute
instance-attribute
¶
OcrParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
760 761 762 763 764 765 766 | |
remote = Field(default_factory=RemoteInvokeParams)
class-attribute
instance-attribute
¶
remote_retry = Field(default_factory=RemoteRetryParams)
class-attribute
instance-attribute
¶
inference_batch_size = 8
class-attribute
instance-attribute
¶
extract_tables = False
class-attribute
instance-attribute
¶
extract_charts = False
class-attribute
instance-attribute
¶
extract_infographics = False
class-attribute
instance-attribute
¶
PageElementsParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
751 752 753 754 755 756 757 | |
remote = Field(default_factory=RemoteInvokeParams)
class-attribute
instance-attribute
¶
remote_retry = Field(default_factory=RemoteRetryParams)
class-attribute
instance-attribute
¶
inference_batch_size = 8
class-attribute
instance-attribute
¶
output_column = 'page_elements_v3'
class-attribute
instance-attribute
¶
num_detections_column = 'page_elements_v3_num_detections'
class-attribute
instance-attribute
¶
counts_by_label_column = 'page_elements_v3_counts_by_label'
class-attribute
instance-attribute
¶
PdfSplitParams
¶
RemoteInvokeParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
297 298 299 300 | |
RemoteRetryParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
291 292 293 294 | |
StoreParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
736 737 738 739 740 741 742 743 744 745 746 747 748 | |
storage_uri = 'stored_images'
class-attribute
instance-attribute
¶
storage_options = Field(default_factory=dict)
class-attribute
instance-attribute
¶
image_format = 'png'
class-attribute
instance-attribute
¶
strip_base64 = True
class-attribute
instance-attribute
¶
batch_tuning = Field(default_factory=BatchTuningParams)
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
1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 | |
TableParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
769 770 771 772 773 774 775 | |
remote = Field(default_factory=RemoteInvokeParams)
class-attribute
instance-attribute
¶
remote_retry = Field(default_factory=RemoteRetryParams)
class-attribute
instance-attribute
¶
inference_batch_size = 8
class-attribute
instance-attribute
¶
output_column = 'table_structure_v1'
class-attribute
instance-attribute
¶
num_detections_column = 'table_structure_v1_num_detections'
class-attribute
instance-attribute
¶
counts_by_label_column = 'table_structure_v1_counts_by_label'
class-attribute
instance-attribute
¶
TextChunkParams
¶
Bases: _ParamsModel
Source code in nemo_retriever/common/params/models.py
350 351 352 353 354 355 | |
TextGenerationParams
¶
Bases: _ParamsModel
Transport, task controls, and partial sampling for text generation.
Source code in nemo_retriever/common/params/models.py
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 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 | |
transport
instance-attribute
¶
sampling = Field(default_factory=LLMSamplingOverrides)
class-attribute
instance-attribute
¶
prompt = None
class-attribute
instance-attribute
¶
system_prompt = None
class-attribute
instance-attribute
¶
reasoning_enabled = None
class-attribute
instance-attribute
¶
max_workers = Field(default=8, ge=1)
class-attribute
instance-attribute
¶
resolve_sampling(defaults)
¶
Resolve explicit sampling fields over a task's defaults.
Source code in nemo_retriever/common/params/models.py
942 943 944 | |
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
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 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 | |
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
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 | |
vdb_op = 'lancedb'
class-attribute
instance-attribute
¶
vdb_kwargs = Field(default_factory=dict)
class-attribute
instance-attribute
¶
meta_dataframe = None
class-attribute
instance-attribute
¶
Path to csv/json/parquet or an in-memory :class:pandas.DataFrame.
meta_source_field = None
class-attribute
instance-attribute
¶
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).
to_ingest_operator_kwargs()
¶
Flatten into kwargs for :class:~nemo_retriever.vdb.IngestVdbOperator.
Source code in nemo_retriever/common/params/models.py
725 726 727 728 729 730 731 732 733 | |
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
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 | |
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
¶
dedup = True
class-attribute
instance-attribute
¶
dedup_max_hamming_distance = 5
class-attribute
instance-attribute
¶
dedup_max_dropped_frames = 2
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
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 | |
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
1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 | |
endpoint_url = None
class-attribute
instance-attribute
¶
columns = Field(default_factory=list)
class-attribute
instance-attribute
¶
headers = Field(default_factory=dict)
class-attribute
instance-attribute
¶
timeout_s = 30.0
class-attribute
instance-attribute
¶
max_retries = 3
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
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 | |
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
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 | |