Build a Multimodal RAG Pipeline with NVIDIA NeMo Retriever and LanceDB
Step-by-step guide to building a multimodal RAG pipeline using NVIDIA NeMo Retriever, hosted NIMs, LanceDB, vision-language reranking, and grounded generation.

A new tutorial from Marktechpost walks through building a multimodal retrieval-augmented generation (RAG) pipeline using NVIDIA NeMo Retriever, hosted NIM API endpoints, and LanceDB as the vector store. The guide covers offline PDF text extraction without a GPU, then expands to full multimodal ingestion covering tables, charts, and infographics. It finishes with dense retrieval, vision-language reranking, metadata-filtered search, grounded response generation with inline citations, and a recall-at-k evaluation to verify retrieval quality.
What happened
| Detail | Value |
|---|---|
| Required Python version | 3.12.x |
| Vector database | LanceDB (IVF_HNSW_SQ index, L2 metric) |
| Embedding model | nvidia/llama-nemotron-embed-1b-v2 |
| Reranking model | nvidia/llama-nemotron-rerank-vl-1b-v2 |
| Generation model | nvidia/llama-3.3-nemotron-super-49b-v1.5 |
| Chunk size | 512 tokens, 64-token overlap |
| Embedding batch size | 16, with 8 concurrent HTTP requests |
The tutorial is structured in two distinct stages. Stage 1 runs entirely offline using PDFium for basic text extraction, with no API key and no GPU required. Stage 2 activates hosted NVIDIA NIM endpoints to handle the full multimodal workload: page layout detection (nemotron-page-elements-v3), OCR (nemotron-ocr-v1), table structure parsing (nemotron-table-structure-v1), and graphic element analysis (nemotron-graphic-elements-v1).
After extraction, the pipeline deduplicates content using content hashing and bounding-box intersection-over-union (IoU) with a threshold of 0.45, generates dense vector embeddings, and uploads everything to a LanceDB table named “colab_demo”.
How each stage of the pipeline works
Stage 1: Offline text extraction
This stage requires only the nemo-retriever package and a Python 3.12 environment. The ingestor runs in-process with allow_no_gpu=True and calls PDFium to pull plain text from each PDF page. Tables, charts, images, and infographics are disabled here. It is useful for quickly validating that your document loads and that the row/column structure looks correct before spending API credits.
Stage 2: Multimodal ingest via hosted NIMs
With a valid NVIDIA API key (prefix: nvapi-), the pipeline switches to hosted inference. Each page is processed by five separate NIM endpoints in sequence. Tables are extracted as Markdown. The resulting chunks are embedded at https://integrate.api.nvidia.com/v1/embeddings and stored in LanceDB with an IVF_HNSW_SQ index for fast approximate nearest-neighbour search.
Retrieval, reranking, and generation
Dense retrieval fetches candidate chunks from LanceDB. A vision-language reranker (llama-nemotron-rerank-vl-1b-v2) then re-scores those candidates, accounting for both text and image content. The top results can be filtered further by metadata fields before being passed as context to llama-3.3-nemotron-super-49b-v1.5, which produces a grounded answer with inline citations pointing back to specific document pages. A recall-at-k evaluation checks whether the correct pages appear in the top-k retrieved results.
Why it matters
Most RAG pipelines handle text well but fall apart on documents that mix tables, charts, and prose. This tutorial shows a practical path around that problem using commercially available hosted APIs, so you do not need to run your own GPU cluster to get multimodal retrieval working.
For businesses dealing with dense technical documents, financial reports, or product catalogues, the ability to query tables and charts alongside text is a meaningful capability upgrade. The modular endpoint design also means you can swap individual NIM endpoints as newer model versions appear, without rebuilding the whole pipeline. If you are exploring how to bring this kind of capability into your own products, our AI integration services cover exactly this kind of retrieval-augmented workflow.
The offline fallback is also worth noting. Being able to validate document structure without consuming API credits lowers the cost of experimentation, particularly when testing with large or poorly formatted PDFs.
Our take
The architecture here is solid and the component choices are defensible. LanceDB is a good fit for local or embedded vector storage, the IVF_HNSW_SQ index is a reasonable default for moderate-scale retrieval, and having a vision-language reranker in the loop is the right call for documents with charts and tables.
That said, the pipeline leans heavily on NVIDIA’s hosted NIM endpoints, which means your production costs and latency are tied to NVIDIA’s API pricing and availability. Before committing to this stack, it is worth benchmarking the recall-at-k scores against a simpler text-only baseline on your actual documents. If your PDFs are mostly prose, the added complexity of multimodal extraction may not move the needle much. If they are chart-heavy or table-dense, the reranker step is where most of the quality gain will come from.
The 512-token chunk size with 64-token overlap is a reasonable starting point, but it is worth tuning that against your specific document types. Shorter chunks tend to improve precision at the cost of recall for long-form answers. You can read more about how we approach these tradeoffs in our coverage of AI agent adoption gaps and what realistic production deployments actually look like.
What to do about it
- Set up a Python 3.12 environment and install
nemo-retrieverto test Stage 1 offline extraction on your own PDFs before touching the API. - Get an NVIDIA API key (nvapi- prefix) and run Stage 2 on a small sample document to estimate per-page API costs before scaling up.
- Run the recall-at-k evaluation on a set of ground-truth question/page pairs from your actual documents, not just the tutorial’s sample PDF.
- Tune chunk size and overlap tokens against your evaluation results before indexing your full document corpus.
- If vision-language reranking adds latency you cannot absorb, test whether a text-only reranker meets your quality bar at lower cost.
Start with the offline stage on your real documents. How the extractor handles your specific tables and charts will tell you more than any benchmark.
Frequently asked questions
What is a multimodal RAG pipeline?
A multimodal RAG (retrieval-augmented generation) pipeline retrieves relevant content from documents that include text, tables, charts, and images, then uses that content as context for a language model to generate grounded answers. Unlike text-only RAG, it can interpret and retrieve visual elements like charts and infographics.
Do I need a GPU to use NVIDIA NeMo Retriever?
No. The offline Stage 1 mode runs CPU-based text extraction via PDFium with no GPU and no API key required. Multimodal features like table and chart extraction require an NVIDIA API key to access hosted NIM endpoints, but still no local GPU.
What models does this pipeline use for embedding and reranking?
Embeddings are generated with nvidia/llama-nemotron-embed-1b-v2. Reranking uses nvidia/llama-nemotron-rerank-vl-1b-v2, a vision-language model that can score chunks containing both text and images. Final answers are produced by nvidia/llama-3.3-nemotron-super-49b-v1.5.
Why use LanceDB instead of other vector databases?
The tutorial uses LanceDB for its embedded, file-based storage which works well in local and notebook environments without a separate server. The pipeline stores vectors with an IVF_HNSW_SQ index and L2 distance metric for approximate nearest-neighbour retrieval.


